0

I'm new to web services. i'm developing a project that includes a website for introducing information (backoffice), and that information will be send to mobile devices.

My Question is, is better to create a website that connects to the database to insert and update information and then create a webservice only for the mobile devices to get that information, or create a webservice that does all the work?(website and mobile devices connected to webservices).

Thank you

3 Answers 3

0

There are many solutions and which you choose depends on how your application will be used.

In any case it is always good to have reusable code, and having single service tending to both web and mobile applications would be good.

If your application is write intensive, data which is passed between user and the website is critical and data integrity must be preserved, then you should go for a single service which runs in the background, takes care of integrity and provides data retrieval and modification methods to clients (web/mobile/desktop applications).

If your application is read intensive, will be mass deployed, with tens or hundreds of thousands of clients, then you should go for each web application which connects directly to database. In this case you need to sacrifice data consistency, because writes made on one node of the web application will not be instantly visible on others. Using this method, when you need to scale out you can add replicated database nodes, and new web application nodes that connect to them.

1
  • Thank you all for the anwsers and help, i'm chosing the method one service for all. i agree that is the best for reusable code and flexibility. Feb 22, 2013 at 22:55
0

If you have a client application running on a mobile device, you want a web service. I recommend a RESTful one using JSON. If you want to access this functionality from a computer browser, you'll want a website - which could be accessed from a browser on a mobile device.

The trade-off is accessibility vs. quality of the client application. A website may work great from a computer browser, but may not be well-suited for mobile access. The website would be a single solution though. If you use a web service, you need a mobile application to consume it (presumably for multiple platforms), plus either a desktop application to consume that web service or a website to run in a browser...

0

In my opinion. You should go with Services Based Architecture. You can use WCF /Asp.net Webapi on MS Stack. Using Services either SOAP Based or REST gives you more Flexibility and a degree of scalability for the consumers to consume your service.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.