So, almost three months ago, I said I was starting to “explore” Ruby on Rails. Well, I was kind of exaggerating. I never actually RAN anything on it. Today, I seriously sat down to run through the wonderful O’Reilly tutorial for getting started, and damned if it didn’t nearly make me break down and weep.
When developing any serious web application, a huge, huge, HUGE amount of time is spent building basic functionality for creating, reading, updating, and deleting database records. Even though this framework (often referred to as “CRUD”) is the backbone of nearly every web application out there, you’ve always had to manually build it yourself, often involving especially ugly and arcane database access code.
Sometimes this process would get so frustrating that I’d abandon a project before I even finished the basic CRUD interfaces. Then, no matter how clever my idea was, all I’d be left with was a dead pile of code that does stuff every other web application out there does. How depressing!
Enter Ruby on Rails. Rails is the first application framework to acknowledge this. With Ruby, once you set up your database, the code required to develop a complete user-friendly CRUD frameworks is literally ONE LINE OF CODE. Read that again - ONE LINE OF CODE. With one line of code, you are immediately are able to add, change, list, and delete the contents of your database, within your web site.
Of course, every site is unique, and you may want the interface to operate a bit differently than what Rails automatically spits out. That’s no problem. You can easily override each piece of the CRUD puzzle with your own modified UI - when you’re ready. It’s a hell of a lot more interesting to beautify the interface of some interesting application AFTER you’ve got it doing something cool, rather than slogging through tons of database code before you can even decide if your idea is even worth the effort.
If you develop web applications, run through this tutorial. You will want to use Rails for everything and never want to look back. I guarantee it. Rails fans are an obsessively fanatical lot. Use it and you’ll see why.
Filed under Web Development