views:

272

answers:

1

Hi,

we are developing a website that also have smart phone (starting with iphone but possibly adding android and blackberry later) counterparts (a subset of functions like Yelp or Urbanspoon for example) and we are thinking about following REST paradigm using ASP.NET MVC. Our team is fairly new to this area of software development and we have the following questions:

(1) For the iphone application, we are thinking about developing an application using Objective-C. Actually, our application doesn't need to work in the disconnected mode and the web application paradigm might be better but the only reason that we are thinking about developing Objective-C app is that we want to make it available in the app store so that people can download and have it on their iphone as opposed to having to bookmark it in Safari on iphone. (iphone users don't go and discover new website on the iphone) But this approach suffers from not being able to update and fix the bug on the client side as immediate as we hope. I wonder if there is a way to embed a web page inside an Objective-C app?

(2) Our goal is to follow RESTful paradigm:

- Access resoures through standard method (GET, PUT, POST, DELETE)  
- Multiple representations (XHTML for the website and perhaps POX for the smart phones)
- Statelessness whenever possible

What would be the best approach to provide RESTful service through ASP.NET MVC among these?

  • Use ADO.NET Data Services (We are using Entity Framework for O/R mapping)
  • Implement RESTful services over WCF
  • Use the recently released REST for ASP.NET MVC SDK

(3) How should the ASP.NET MVC receive data from the smart phone? What data format should it be? For the website, we will have to process HTML form POST/PUT but does the same paradigm work for the objective-C client (or other smart phone client)?

Any suggestions/comments about these three questions are highly appreciated!

+1  A: 

Regarding Question 1.

Yes you can embed a webpage inside a native iphone application using UIWebView. It sounds like what you want is known as a hybrid application, where you use a UIWebView to load most of the content and then use native UI controls for providing additional functionality.

See the IPhone HIG for some basic information on this.

Also users on an iphone are able to save bookmarks to their home screen so that loading the page is a lot like launching a native app. They just go to the home screen and click the icon. But if you want to use the app store to market your site, this will probably not suit your needs.

Brandon Bodnár
Thanks bodnarbm, do you know if UIWebView renders page exactly the same way as Safari does?
mwong
I thought it does including recognizing phone numbers and addresses like in mobile safari. However, I have not used it much as my focus was always on native apps, so I may be wrong on that.
Brandon Bodnár