Yes, the industry has moved that way. It's been found to be a better separation of concerns. The server deals with data and the client deals with presentation of that data. Specifically, what if you want to use the same server back end to drive a native mobile app as well as your site? That xhtml response from the server just became a bit of a liability vs a simple and direct data response.
Also, it's common to use html templates like handlebars or underscore to make this easier. That way you have your html template stored in an html file. You can compile the template and reuse it. Each response from the server can just get fed into the appropriate template and it's very automated and clean.
Industry, too. We have a mature, 15-20 year-old B2B software package that has gone through several transformations with regards to the UI. Right now, we're migrating a lot of Flex into modern HTML5/js screens and communicating via ajax/json. Obviously, this is an extremely long-term effort and we're doing it in pieces, but it's definitely the direction.
Additionally, new products we make keep popping up and they're all using the same model: REST services that return JSON and the UI communicates with those. Completely separation of roles makes for easier separation of development efforts -- you just work on the interface between the back and front ends.
Again, this is a 30 year-old B2B software company that's publicly traded, not some start-up.
9
u/passwordissame Mar 18 '14
did everyone move away from AJAX as in server responding with (x)html/xsl and client applying those to update DOM?
looks like it's all JSON and manual DOM manipulation.