The latest on Ruby on Rails 2

Last week I spent three days at the Rails Edge conference. This was a great event for learning about the latest developments in Ruby on Rails and meeting with some of the leading folks from that community.

This three-day event was produced by Pragmatic Studio, which is sort of a sister company to Pragmatic Bookshelf that publishes several of the key Rails books. The lead presenters at the conference were Dave Thomas, coauthor of Agile Web Development with Rails as well as Programming Ruby, and Mike Clark, who is the producer of the event, an active Rails developer, coauthor of Agile Web Development with Rails, and author of Pragmatic Project Automation and other Java books. Other presenters included:

  • Chad Fowler, author of Rails Recipies, coauthor of Programming Ruby, cofounder of Ruby Central
  • James Duncan Davidson, perhaps best known as the author of Tomcat and an expert on deploying Rails apps
  • Justin Gehtland and Stuart Halloway of Relevance LLC, consultants who have been very active in the Rails community and have a lot of experience deploying enterprise applications
  • Marcel Molina, Jr. from 37Signals, who is part of the Rails core team
  • Bruce Williams, a designer/developer working on a very large Rails application
  • Jim Weirich, author of the Rake utility and an expert in Ruby programming

If the people in this room couldn’t answer your questions on Ruby on Rails, you’d be hard pressed to find someone who could. With the unusual format of single-track, one-hour presentations separated by half-hour breaks, there was plenty of time to talk with the speakers and the roughly 100 participants. Some of the talks were entirely understandable by relative newbies such as myself, while others were clearly aimed at folks with substantial experience building Rails applications and programming in Ruby.

This event was a striking contrast to the previous week’s Web 2.0 Summit. This was obviously a much smaller and much more technical event, but what struck me was the center of interest: the Web 2.0 Summit was about, first and foremost, money, whereas the Rails Edge event was about ideas and craftsmanship. Both were interesting, but they’re about as different as two events could be.

In talking with folks in the evening and during the breaks; many of them seemed to fall into one of two camps:

  • People actively developing with Rails as a corporate employee or as a consultant
  • People who are using Java at their day job and building a web app with Rails at night, hoping to get to the point where they can quit their day job

More than once, speakers and participants pointed out that building a web application in Java as a spare-time activity wasn’t very likely; the fact that Rails makes it so much easier, and more fun, is encouraging and enabling a lot of niche applications to be built, often as hobbies that might someday create meaningful revenue. While the folks at the Web 2.0 Summit were more likely to be involved with heavily funded, well-staffed efforts going after big wins, the Rails Edge revealed a variety of small, enthusiast-created apps with more modest ambitions (like ShowerinaBox). I’d bet this latter source could be just as important to the future of the Web as the big efforts.

If you missed this event and wish that you hadn’t, there’s another chance: it will be repeated in Reston, VA on January 25-27. You can register here.

If you’re early in your Rails learning, then I’d recommend the Rails Studio instead; I’m planning to attend this on February 12-14 in Bellevue, Washington. It’s also being offered in January in Minneapolis.

Sites built with Ruby on Rails 5

Update: I published this quick list some time ago, and I’ve noticed it continues to get a fair amount of traffic. It is woefully incomplete, and new sites are being added daily. There’s a great site that is devoted to nothing but listing other Rails sites, and I highly recommend it as a superior alternative to this list: HappyCodr.

Here’s a partial list of sites built with Ruby on Rails, ranging from highly polished sites with hundreds of thousands of users to rough new sites that may have only dozens of users so far.

Please leave comments with others and I’ll extend and annotate this list over time.

Technorati:

New edition of Rails book now at the printer 0

Agile Web Development with Rails, by Dave Thomas (of Pragmatic Programmers) and David Heinemeier Hansson (the original creator of Rails) has been the framework’s bible since the publication of the first edition in mid-2005. With the rapid evolution of the framework, the book didn’t last long before a second edition was badly needed.

To meet the urgent need of the community and gain feedback at the same time, Pragmatic Programmers has been publishing “beta books” in PDF form. All of us who have downloaded multiple versions and awaited a nicely bound, proofread, and indexed copy can finally rest easy: the book went to the printer yesterday.

If you can’t wait a few more weeks, you can buy the PDF-plus-printed-book package and get the PDF right away, with the book to follow when it’s back from the printer.

A brief intro to Ruby on Rails 5

I’m currently at the Rails Edge conference, an interesting gathering of about 100 Ruby on Rails aficionados, newbies, and everything in between, in Denver. I’m excited about this framework and plan to use it for my future web development work.

For those of you who know about Rails, this post isn’t going to tell you much; I’ll have some deeper content later. But for everyone who may have heard of Rails but can’t quite make sense of it, I hope you’ll have a much better idea of what it is and why it is important by the end of this short article, even though it only scratches the surface.

Ruby is a pure object-oriented programming language, sometimes called “post-modern” and the object of an amazing amount of genuine affection. Programmers who have switched to Ruby really love this language. Ruby fans call themselves Rubyists and users groups go by the Ruby Brigade moniker. It’s attracting a lot of defectors from the Java and PHP communities, as well as from Python and Perl. I believe it is poised to become the most important language for the next wave of innovative web applications.

What’s so great about Ruby? It is clean and easy to read and to write (once you get accustomed to it), and it encourages good object-oriented programming practices without being overly constraining. It is a dynamic scripting language, which means that there’s no compilation required, no strict typing, and classes and objects can be extended dynamically at runtime. Programmers from a C++ background may find some of these freedoms horrifying and fear that they make it too easy to insert hard-to-find bugs, but the Ruby community would strongly disagree.

One of the benefits of Ruby is that it’s easy extensibility and minimalist syntax allows you to turn in into a domain specific language. In essence, this means your code can stay at a high level of abstraction, with terms that match the real-world names of the things in the domain your code deals with and a bare minimum of language-specific complexity to get in the way.

In this short piece, I’m going to have to ask you to take all this Ruby affection on faith for now, and move on to Rails, which is the short name for Ruby on Rails.

Ruby on Rails is a framework for writing web applications in Ruby. It was created by 37Signals as part of their Basecamp web-based collaboration tool. They didn’t set out to write a general-purpose framework; rather, they built the framework that they wanted for the application they were building, and when they were done, they extracted the framework from the application and published it as open source. Since then, a vibrant open-source community has helped rapidly enrich the framework. There’s a stunning amount of brainpower being applied to moving this technology forward.

Rails implements a design pattern well know to most experienced programmers, called Model-View-Controller (MVC). The code is divided into these three categories, with the following separation of responsibilities:

  • Models: Models are the only code that talks to the database. They maintain the integrity of the data and do all the heavy lifting when it comes to manipulating data.
  • Controllers: The controllers sit between the views and the models, making requests from the database and preparing the results for use by the views.
  • Views: As the name suggests, the views are responsible for presenting information and accepting user input. Everything that is visible comes from a view.

It is certainly possible to write MVC applications in other languages, but none makes it as easy and natural as Ruby on Rails, and none has nearly as large and enthusiastic a community behind it. You can use Struts with Java to write MVC applications, but the amount of complex Java code and XML configuration that is required can be literally a factor of ten times greater than that for Rails. You can write MVC applications in PHP, but unless you work hard to avoid it, PHP’s natural path is to lure you into rolling everything into the view.

People with substantial experience building Java applications claim true order-of-magnitude improvements in productivity after moving to Rails. Perhaps even more significant, and also a source of this productivity improvement, they love doing it. Many people respect Java, and value what it can do, but few love writing programs in it. Barely a decade after its birth and rapid rise to the server programming language of choice, Java has become the old-school way of doing things that many Ruby converts say they will never go back to.

Rails encourages Agile development practices because it makes it so easy to make changes. This supports the iterative development style that is at the heart of most great applications today.

There’s lots more, from simple implementation of Ajax user interfaces to built-in templating and testing frameworks, but since this is a blog post and not a book, I’d better stop here.

Of course, Ruby on Rails is not without its drawbacks. Ruby is relatively slow, and this has been the source of much disparagement. In response, however, advocates note that while it may not make as good a use of CPU cycles as Java, it makes far better use of programmer cycles, and those are a lot more expensive and harder to scale. And there are efforts under way to increase its performance dramatically. The framework is also relatively young and rapidly evolving, which sometimes makes life challenging for developers. But to the converted, Rails has become the Holy Grail.

Technorati: