Templates Offer Rails New Path to Ubiquity

By Simon St. Laurent
December 16, 2008 | Comments: 2

I've been very excited about Rails for a long time - you pretty much have to be excited about a subject to write a book about it. At the same time, though, I've been getting more and more nervous about the long-term future of Rails.


Because the initial excitement over Rails has faded, as is normal after a few years. The big question is whether Rails sustains real momentum after the hype reaches its natural end, or whether something new comes along with its own cycle to leave Rails in the dust. Lately, watching things like Sproutcore (though it leaves work for Rails) and Cappuccino has me thinking about the future of frameworks on both the server and the client, and thinking we're going to see a new level of integration. Server-side frameworks seem likely to continue making it easier to specify what happens in the client, with less need for developers to create Ajax code explicitly.

Rails was a pioneer in this integration, as its RJS templates let developers create complex interactive client-side interfaces without leaving Ruby or the server to do so. RJS is still very cool, and jRails refreshes it some with jQuery tools, but it works at a fairly low level of abstraction. It does a great job of hiding JavaScript under Ruby to a certain point, but then eventually you likely do need JavaScript again as you push beyond what the abstractions can manage.

It doesn't seem likely that Rails is going to try to become an end-to-end framework all by itself. Its creators have stayed focused, thoroughly opinionated, and wary of expanding the framework's scope. This has been, I think, a brilliant strategy so far, ensuring that people know what they're getting when they talk about Rails, keeping the project's scope and goals clear. However, it's made me nervous as its competition becomes more ambitious.

I'm feeling better now, though, because it looks to me like Rails has figured out a way to have the best of both worlds. The new approach keeps a core that does what it does very well, but makes it much easier to maintain and deploy larger toolsets on top of it. Rails has been extensible for a long time, but it isn't fun to apply extensions from the command line every time you start a new app, or even to maintain shell scripts that automate the process.

Rails templates, or application generators, don't change Rails itself much, but they should greatly simplify the process of deploying applications built on Rails. Not necessarily complete applications, but rather the components needed to build applications that use Rails plus a kit of additional components.

The new tools, though currently only in Edge Rails, don't so much create new functionality as put on a sign on Rails that says:

Welcome. Please innovate on top of what we've already created.

I'm not sure how it will pan out - perhaps an all-JavaScript solution or something completely new is on the horizon waiting to take over regardless - but I'm at least feeling like a lot more options have opened. It would be great to work with a framework that builds on Rails but adds features needed for specific kinds of projects. Authentication is the classic "missing piece", but there's a huge range of possibilities for building on and going beyond the solid foundations that are already there.

I hope we'll see some templates aimed at making it easy for developers to get started in Rails, and also some templates aimed at ninja features, maximizing the power developers can get from Rails.

We'll see!

You might also be interested in:


Out of curiosity: how is this different from what most Python frameworks have been able to do for a couple years now through Paste application templates?

In terms of what it's capable of, I don't think this looks that terribly different from Paste.

The main differences seem to be that it's more tightly bound to a particular framework, and the expectations of that framework for things like gems and plug-ins.

Packages is packages in some sense, but the details all work out differently.

News Topics

Recommended for You

Got a Question?