Should all new web projects build their backend based on xml/json result sets?

Posted by Blankman on Programmers See other posts from Programmers or by Blankman
Published on 2012-09-16T19:09:02Z Indexed on 2012/09/16 21:51 UTC
Read the original article Hit count: 383

Filed under:
|
|

If you were building a new Saas project, would it make sense to start with all of the backend services returning xml/json?

Because these days you need to build for both the web and mobile devices, and having a backend that is build from the start to return xml and json, you are ready to go mobile (all services have the business logic, so you won't be repeating anything).

Now the web would be MVC, so the controller would just be routing the request to your service backend, and converting the json or xml to html.

The obviousl downside is that you have to build a backend, and then another web project that calls your backend. But this also goes to you favor as it forces you to seperate your concerns, and not leak business logic in your controller/view layer.

Thoughts?

© Programmers or respective owner

Related posts about Xml

Related posts about JSON