Good things come to he who waits 2

Posted by Colin A. Bartlett Tue, 05 May 2009 18:31:00 GMT

When the merger of Merb and Rails was announced a few months ago, I don’t think anyone really expected the goal of having Rails 3 released at RailsConf to be met. Alas, it was not. But David announced today that much of the groundwork to combining the two frameworks has already been done. Most of the work has been behind the scenes refactoring—the kind of changes that developers will likely never notice. But other features that are in the codebase and coming soon include:

  • An all-new router, with an improve DSL that’s more merbish. It will include routing based on subdomains and user gents, and the ability to mount multiple apps side by side.
  • Since many developers aren’t consistently using the h() helper method to escape potential script injections, the default behavior will now be to escape everything except when an all-new raw() method is utilized.
  • Much of the code to make Rails JS framework agnostic is complete. New features include using data=remote=”true” and data-method=”delete” (which validate in HTML5) to allow unobtrusive binding of JS events.

David equated the new Rails philosophy to Burger King’s “Have it Your Way” concept. If I want a great burger, I can order a Whopper. But, if I have specific tastes, I can order it without pickles. Or with extra ketchup. Rails will allow you to get a great framework out of the box for users that just want it to work. But, for those that are passionate about a particular JS framework or other toolset, they can freely customize their Rails.

Toward the end of David’s keynote, he relayed a couple experiences he’s had. He reminded us to make sure that, as developers, we don’t accept the requirements bestowed upon us by stakeholders at face value. We need to constantly offer up alternatives and input. In his experience, many times when you relay to the stakeholder a different, sometimes lest costly, way to do things, their response is often: “Sure, whatever”.

This approach can save we developers hours of wasted time. That’s because, when stuck on a tough challenge, as time drags on, our motivation drops. We try to keep up our spirits but, when it looks like the challenge is impossible, we end up burning needless hours. We should quit at the point our mind checks out and reexamine the problem. David gave an example of a tough issue he worked on for two weeks and he explained that only a week and half of it he was really working and after that the rest was just goofing around because he already had given up. He should have gone back to stakeholders right then rather than burning a few more days with zero motivation.

Comments

Leave a response

  1. Avatar
    Mat Schaffer about 10 hours later:
    Thanks for the writeup! I think my inner troll balked at that auto-escaping thing, but then I realized that is indeed what I want 95% of the time. Thanks rails.
  2. Avatar
    Dan Kubb about 13 hours later:
    I usually end up turning on auto-escaping anyway, so this is good to see becoming the default. I also really like the move away from inline JS in the HTML to an unobtrusive approach. All in all I like DHH's announcements.
Comments