Aside from the googlebot - there are quite a few platforms that don't always behave as expected with lots of javascript. Hello smartphones and tablets... but there are also other things like rendering email templates as well.
I've been working on a template system that can run on either client or server. I get a bit worried that I'm reinventing a very old (and heavily reinvented) wheel, but I still haven't found anything that was a clear match. Perhaps the closest thing is using phantomjs to generate pages.
The crux of my approach is dead simple; all templates are defined using standard HTML. In full javascript mode, all links, buttons and forms are detected/intercepted and when clicked, they turn into events. The events run some logic that will eventually render events to update the page HTML. In server mode, those page elements act in their traditional HTML like manner, generating a new page render - which is produced by running the same events/logic that would run in the browser.
Sure, there are limitations to this, primarily, you don't want dozens of page fetches in a short time, or small pieces of page update, and you need to keep some UI context/state on the server for each user (or somehow encode it in a cookie/URL/etc). However, I've been surprised at how much of this has worked quite well with this pattern.... so far, anyway, I've spent less than a week making a server version out of my client code.
I'm using
vertx.io (which could run javascript on the server) and GWT in the browser (which runs logic code written in Java which is translated to javascript). I think GWT is brilliant for client-side logic but the UI components in GWT don't do it for me and lag behind other JS components.
I once thought about porting Cambridge to GWT, which would let it run client-side, and while that is probably possible, it could be a lot of work for each expression language. Right now I'm using dust.js - which is not without issues, but is pretty good because it has quite good template composition features - and I've sunk enough time into it that I can hack it into doing what I want.
Tom