rohitnaidu19
rohitnaidu19

Reputation: 693

Web services for mobile necessity

I have a website and i need to make an app on android and iphone and the app has to communicate with the server,similar to facebook app.Do i need web services like SOAP for this.I read their documentation but how necessary are they and what is their main purpose? Can I do the same without using web services? my website is in codeigniter

Upvotes: 1

Views: 518

Answers (3)

Ali
Ali

Reputation: 9994

Benefits of using a Web Service:

1 - Usability: You can develop Android and iOS apps, and both of them can use the same Web Service. Other smart phone platforms can also be developed later and use the same Web Service.

2 - Flexibility: For instance, you need to have a mechanism to talk with the database. You can implement the database transaction in your Web Service. (I have experience in using hibernate) You do not have to create a database configuration in every smart phone app. If you decide to change your database, then you just need to modify your database configuration in the Web Service - nothing changes on the client sides.

3 - Security: It is not a good mechanism to connect directly from a Mobile app to your database server. You need to have some kind of Authentication mechanism that can be provided by a Web Service.

Which kind of Web Service is better? I agree with @Justin that REST is a good approach since it is lighter, simpler to implement and more flexible.

SOAP can be a better approach when Security is the most important thing, for instance in certain enterprise scenarios. REST vs. SOAP

Upvotes: 3

Code Droid
Code Droid

Reputation: 10472

Are webservices necessary? Well the correct answer to your question is it depends on the app. Most apps that connect to a server to get some information use web services. However, no you don't need to write your own web services. Increasingly people are using platforms like agigee http://apigee.com/about/products/usergrid/

So no you would not need to write your own api if you used usergrid, but you might want to if you wanted to keep the data all within your own infrastructure.

Upvotes: 0

Justin Ethier
Justin Ethier

Reputation: 134255

If you need to implement web services for your app, I recommend taking a look at CodeIgniter Rest Server. This provides an easy way to implement REST web services, which are lighter weight, easier to work with, and more flexibile than SOAP.

Upvotes: 3

Related Questions