views:

41

answers:

3

Hi, I have a website which is developed using Java/Spring. We are about to develop an iphone application for the same. How do we make the phone communicate with the web application? 1) Use http get/post from objective c 2) Create web services for all the features provided (each user action) and then call those from objective c.

Any thoughts on the above or better ways to do this?

A: 

I would use some form of web service. It's the easiest way to ensure that any future applications can also speak to the server without rewriting things yet again. For example, what happens when you want to release a Windows Mobile app, or an Android app down the road? Plus, with modern tools and frameworks, it's pretty easy to write a web service, and easy to consume it on the client side. That makes more sense than overcomplicating things with something not quite as standard.

drharris
A: 

If you already have full support for http get/post you will be able to use that fairly easily on the iPhone. NSMutableHTTPURLRequest through NSURLConnection is how you do a post.

It also depends on the nature of the data your are sending and returning. If the posts or responses are complex data structures, then using web services will package those up nicely. If you already have xml or json, or are just passing around blocks of text, then web services is not needed.

drawnonward
A: 

http get/post is web service.

if by web service you meant these complicated ws-* crap, don't. especially on a phone.

irreputable
REST , can also be considered web service , not only SOAP/WSDL
pastjean