anthonypliu
anthonypliu

Reputation: 12437

Architechting a complete web service, website, and iphone app

I am trying to architect a system that will have a website and an iphone app that will be driven off the same data. I understand how I would create and architect the website, but when it comes to adding the iphone app I am unsure on how it will apply.

My considerations for design:

-Using C#, SQL Server, asp.net for the website (would try to get most of my data using web services where I could)

-Using Objective-C, x-code, etc for the iphone app development

1.) Will I need to expose a web service for the iphone to interact with? If so, would that be considered a seperate web app from the actual website? Or would the webservice be built in with the website and then the iphone would interact with that web service as well?

2.) What do I need to consider, security wise, when it comes to exposing a web service?

3.) Any other architecture advice for building a system such as this? Maybe personal experiences with doing a website/iphone app that runs off the same database.

Upvotes: 1

Views: 502

Answers (3)

Ozgur Dogus
Ozgur Dogus

Reputation: 921

At first use use just one data source for all your projects. Expose the database with webservices. User authentication to invoke webservice procedures for security.

Upvotes: 0

Omar Abdelhafith
Omar Abdelhafith

Reputation: 21221

Will I need to expose a web service for the iphone to interact with? If so, would that be considered a seperate web app from the actual website? Or would the webservice be built in with the website and then the iphone would interact with that web service as well?

It depends, if you want a native application, then you would expose the service, else you can develop an iPhone web app

What do I need to consider, security wise, when it comes to exposing a web service?

Normal security consideration as if you would develop a web service to a windows desktop application

Any other architecture advice for building a system such as this? Maybe personal experiences with doing a website/iphone app that runs off the same database.

Try to make the web service as clear and light as you can

Upvotes: 0

melodiouscode
melodiouscode

Reputation: 2069

  1. Yes you will need to expose a webservice for the application to bind/talk to. I would suggest that the service be run as a separate site (such as data.yourdomain.com, where as the site would run on yourdomain.com) which the website also uses for it's data. That way you share the same architecture for both your "end points" (site and app).

  2. Ensuring that you webservice takes a authentication token (username/password or oauth/etc) with each call will help to prevent any unauthorised calls to the service/database. Also ensuing that your service is exposed via a valid HTTPS connection (and only https) will prevent sniffing of the data to get passwords.

  3. As I said in point 1, build the service in such a way that it does not matter what "end point" is accessing it. That way should you add an android app or windows phone app (or even a second website) you will not need to make a fresh service. Perhaps tie each applications "account" to a "end point type" (such as Android/iPhone/WinPhone/WebSite) that will allow you to customise the data objects that you return if needed.

Upvotes: 4

Related Questions