EDIT: We decided against using something like PhantomJS or node-chimera because why deal with a DOM if you don't have to? DOM is complicated and slow, compared to string-based templating. Plus, it's another moving part, another process to keep up and running. The Meteor guys aren't too excited about the PhantomJS approach either, and IIRC they'd like to be able to serve HTML without firing up a DOM.
http://nerds.airbnb.com/weve-launched-our-first-nodejs-app-t...
This is what GitHub uses between tabs on its Pull Requests page. I love how simple the implementation is.
Your app still needs to follow the convention of having links going to different pages with URLs. I know it's not "single page" and the interaction is not that "rich." But it's nice because all your logic is still on the server, all rendering and templates are on the server and the server responds with either a full page of HTML or a partial page of HTML depending on an HTTP header you set.
Oh yeah, it also works without Javascript, crazy!
These days, there are so many JavaScript frameworks for web development, it's starting to make my head spin a little bit.
Does anyone have a link to a good rundown of where everyone stands?
I agree that there are so many JS libs/frameworks now that it is hard to keep up with! I actually started on a super simple script for myself to compare git repos general stats.
Well, even if I had one, it would be outdated in 2 weeks..
But if you're not on Backbone, or don't want to add another constraint to how your app is built, it's pretty easy to set up your own PhantomJS server; I presented on this very topic at TXJS this week[1], and created a library[2] that makes it a snap to set up.
[1] http://www.flickr.com/photos/tr4nslator/sets/721576332659462...
It would be very slow if you were doing this dynamically so you would probably want to regularly compile and cache your pages.
Some links on this topic: https://github.com/steeve/angular-seo http://www.yearofmoo.com/2012/11/angularjs-and-seo.html
I assume Node/JavaScript will render HTML faster than ruby/rails. Do you have benchmarks?
Regarding string based templates, they are really implementation dependant, and there are tons of options available. Right now some common ones for NodeJS are probably Bliss (Razor inspired), Nunjucks (jinja2 inspired), Mustache/Handlebars and Jade (Haml inspired), and EJS (similar to PHP, or classic ASP).
Probably the most broadly available is Mustache, which has implementations in about every language under the sun, and probably could make a decent benchmark to compare string processing in different languages.
All of the above simply bring me, to use what you feel comfortable with and what feels right.