Coming from Python/Django, I forgot that the Rails crowd does not have a templating language (as part of the framework, at least). So I was kinda wondering what "future" was being talked about. Even Java frameworks have many template systems.
My quest now is to actually push all the rendering logic to the client. The project I am currently working on is already very heavy on javascript, so there is no way to do "graceful degradation" for browsers without javascript enabled. Ideally, my server should just respond with JSON (or XML), and the client takes the response and renders the HTML.
So far, the biggest pain with this is to debug a template. Using the jquery tmpl plugin, you just get a blank screen if your template is wrong.
If someone knows of a good js templating language that offers some decent debugging functionality, I'm all ears.
We have built a web app like you describe, without any HTML coming from the server.
We use pure.js (our lib), 3 things can happen when you debug:
- the selector is wrong, you get an exception
- the data you want to read is not in the JSON, eg: an input value is blank
- there is an error in a JS function, you can debug it like any JS code
That was exactly my goal when I first experiment with the concepts [1][2]. As far I as I'm concerned, I think this design strategies is just the next logical step. New javascript frameworks [2] [3] geared toward this paradigm are now getting out of their infancy and are fun to work with.
My quest now is to actually push all the rendering logic to the client. The project I am currently working on is already very heavy on javascript, so there is no way to do "graceful degradation" for browsers without javascript enabled. Ideally, my server should just respond with JSON (or XML), and the client takes the response and renders the HTML.
So far, the biggest pain with this is to debug a template. Using the jquery tmpl plugin, you just get a blank screen if your template is wrong.
If someone knows of a good js templating language that offers some decent debugging functionality, I'm all ears.