Ruby on Rails Newbie Notes

I recently spent several weeks evaluating Ruby on Rails, and decided to go ahead and use it as the programming framework for some code I’m writing. (Alternatives considered: ASP.NET; PHP; JSP.) My experience thus far has alternated between exhilaration and humbling frustration. Heavy on the humble. Still, there’s more than enough great stuff to keep me hooked.

In the interest of helping other tire-kickers and fledgling Ruby on Rails programmers (RoRlings?) avoid a few pitfalls I’m going to post a few of my own learnings, observations, and embarrassments along the way. This is the first such post.

—-

Q: What the heck is Ruby on Rails, and why are you using it?
A: Ruby is a dynamic programming language, with a very clean and modern object-oriented programming library. See for yourself… there’s a neat interactive tutorial here. Rails is a web application framework written using Ruby.

I’m using it because…

  • I like the Ruby language. It’s clean. Lines of Ruby code read like English sentences. Expressing thoughts in Ruby code feels quite natural to me.
  • The Rails framework is well thought out. Its architecture and conventions make it obvious where to put all the bits and bobs that make up your application. The mesh between app code and the database is elegant. It works.
  • RoR is open source. This has come in handy for debugging a few times… it’s young, so there are functionality holes yet to be plugged, and of course some bugs. When in doubt, read the code. If it’s broken, patch your local installation and submit a fix.
  • There is a large energetic community of people contributing to the Rails libraries and adding third party plugins and integration shims of their own. This makes mundane programming tasks much easier… just search for a plugin that does what you need, install it, tailor if necessary, and go. It also means you can use a lot of other pre-existing software with ease… databases, mapping services, etc.
  • There are several good choices for dev tools, including RadRails, which plugs into the Eclipse IDE. Free. You can also do everything from the command line, including poking at your live app and running code experiments within the development console.
  • Rails is now supported by lots of web hosters, most of whom make it easy to host not only your app but also your development source code, typically using subversion as the repository. (I am blown away by the quality of subversion, by the way.)
  • Dave Thomas, a great computer scientist that I was lucky enough to work for one summer at OTI, is a huge RoR supporter. If it’s good enough for Dave, it’s good enough for me.

More:
Wikipedia has a good brief and factual overview.
These quick screencasts give you a taste for it.
There are several excellent books… the bibles of Ruby and Rails. I’ve found you really cannot learn Rails fully without these books.
There is also a wiki, which leads to everything else.

Is everything about Ruby on Rails this rosy? Well, no, of course not. It’s still young. But it’s worth a look. I’ll leave the shortcomings list for another time.

Follow

Get every new post delivered to your Inbox.

Join 348 other followers