Why should Java developers have all the fun with Ruby on Rails?
Light-weight architectures continue to gain currency, even on the heels of Microsoft's massive .NET framework effort. Two authors say the small-footprint Rails framework can provide more of an "an architecture out-of-the-box" for some Web application development.
Microsoft .NET coders can get on the Rails bandwagon, too, say Jeff Cohen and Brian Eng, authors of a new book,
The two authors had been working with Microsoft development tools for years when they discovered "Rails," as the combination of the Ruby language and the Rails framework are commonly known, and they were immediately impressed with the architectural approach of the new language.
"When we started looking at Rails, one of the appealing things was it gave you an architecture out-of-the-box," Cohen said. "It has a very specific opinion about how you should architect your Web application."
He said until recent updates, ASP.NET did not have anything equivalent to the guidance built into Rails.
Cohen envisions Rails leading the developer through the process: "Here's how you are going to structure your application. It's going to be driven by a database. It gives you an object-relational map and does the mapping for you."
The .NET approach required hand coding, by contrast, to get the same things done, said Cohen, who added that these elements were almost automatic in Rails.
Cohen and Eng both have years of experience with Microsoft application frameworks. Before switching to Rails about three years ago, both authors had been Microsoft Certified Solution Developers (MCSD). They met in Web chats sharing their experiences moving from .NET to Rails and have chronicled their experiences on their blog, Softies on Rails.
The two developers found Rails so much easier to work with that co-author Eng says, "Rails feels like cheating."
To be fair, Eng notes that Microsoft is moving to make architecting Web applications easier as it releases new tools.
He also notes that the scope Microsoft's flagship Web app ASP.NET framework was designed for more wide ranging work than Rails, which he characterizes as being focused on Web applications interacting with databases.
Rails is well suited for Ajax development, Eng said, noting that Rails put emphasis on Ajax and user interface development from the get-go. The authors have dedicated a chapter of the book to Ajax development with Rails for .NET developers who would rather switch than wait for Microsoft to catch up.
Cohen added: "Rails from the beginning had an eye for Ajax. With ASP.NET 2.5 they are starting to add in some plug-ins for Ajax functionality but that is fully baked into Rails."
The authors say that Microsoft is moving to embrace dynamic languages including Ruby. In their book they devote a chapter to IronRuby, the open source initiative led by Microsoft to do what Eng calls "an alternative implementation of the Ruby language designed to interoperate better with Microsoft technologies, including Visual Studio and the .NET framework.
"IronRuby is important because it shows that Microsoft is committed to open source," Eng said. "It also shows that Ruby is moving up in the enterprise world, where it was once more regarded as kind of a toy language. Microsoft's commitment to it is showing that it is growing up to the enterprise."