Decoupling the view layer in Rails 3 - install UJS and template/css frameworks as gems using generator

Since the idea of UJS is loose coupling, the UJS framework of choice should be installed as a gem, just like we do for markup languages such as Redcloth etc. Same goes for the template language IMO.

Rails doesn't even require any view frontend in many cases, fx when using a javascript framework such as Sproutcore for the view. This kind of approach is the way of the future...

I think there should instead be a GENERATOR to INSTALL the VIEW LAYER (as gems in Gemfile) if required. When run, the user should be given a choice of which template languages to install (ERB as default) and which UJS framework to install (perhaps jQuery as default).

This generator could be run as one of the final steps in the rails app generator.

That's what the prototype legacy helper plugin tends to do (even though it's not a gem) :