This concept of 'JS all the way down' is what hooked me on Titanium Mobile (crossplatform app framework) as soon as I started using it. It's a much lighter cognitive load, since I'm not constantly switching between varied featuresets and syntax of templates/HTML/CSS/JS.<p>One of my favorite features, is that any piece of the app can instantly become a reusable, extendable module for another app. Since it's 'just JS' it always ports. In this way I share UI widgets between web apps and mobile apps.<p>Generated CSS and HTML should be syntactically perfect, and JS has much better error handling than either CSS or HTML. With those traits, the resulting code can be better than a human could write on their own.<p>The concept of JSON syntax for DOM creation has been around a long time -- HAML, JsonML, jQuery... And although the JS syntax can be verbose, CoffeeScript object notation is available, and quite similar to HAML and SASS.<p>I hope we see a lot more of this.
I'm a little confused. Didn't ExtJS, Dojo, various jQuery plugins, etc do this same kind of thing years ago? And didn't we kind of find out that JS + CSS + HTML was acually a pretty nice separation of markup, formatting and functionality?