Grails has GSP for server-side templating. That's all great, but once the data gets to the web browser its already "cooked". What if I want to make an AJAX call to update the model, fetch the updated model, and then update the UI. The GSP template is now useless to me.
I would rather not refresh the page. What do people usually do here? Use a templating framework for both the server side and client-side?
It just seems overly complicated to use something like GSP AND JQuery templates.
I guess this question is not specific to Grails, but to the web in general.
I believe people start using client side frameworks to manage growing client side needs (Starting with backbone, ending with Angular/Ember).
If your needs are not so severe then you might want to use client side temples like handlebars or mustache or underscore
You might have one gsp file filled with various client templates included on page, then just use javascript to paint these templates on page using sample data or data from server.
I do not agree that gsp templates lose in this case unless you are building fully dynamic experience or single page app which is usually not the case with grails.
EDIT:
I have just had a project when I had to consider if I need to move to client side templates all together, was using backbone. And there was one case when having server-side templates was faster. I had search form and was retrieving search results via Backbone models so I could either have pure underscore templates being painted based on model data, or have server to send me back html to be included on page. Well those of you who use Backbone already scream that I had to use underscore templates, but because I had to be able to open search result in new tab and doing that in Backbone way, having time constraints, was not the choice, instead if request was xhr I sent html template for Backbone otherwise I did render full page. Although if I would have more time I would do everything using only client-side templates.
Also I use Angular and only using client-side templates. If I would want to use server to build templates for Angular it should be something "I do not even now what".