Wow. I’m going to say this again, because it is so rare for me to use this word in relation to programming at all: Wow.
In fact, the last time I used it was in regard to my first view of XCode whose ability to remove the grunt work from creating interfaces and allow you to concentrate on coding instead is amazing (sadly though, I’m not a big fan of ObjectiveC and you really need to code in ObjC to get XCode’s full power… though apparently someone has come up with Ruby bindings for Cocoa which I am also going to check out since Ruby seems to save so much pain.
So, please believe me when I tell you this is something you need to check out if you are in any way involved with web development or shunting stuff in and out of databases over the web.
Rails is a full-stack, open-source web framework in Ruby for writing real-world applications with joy and less code than most frameworks spend doing XML sit-ups.
Ruby on Rails is unbelievably good. It’s too good to be true almost. Rails is a full stack framework, to deal with building web database applications from the ground up in a language I have to admit I am only beginning to love – Ruby is great because it has a simple, painless, understandable and non-anal retentive (surprising for any programming language) syntax and is fully object oriented. That is unusual. A lot of languages claim to be object oriented but are not. Ruby is. And it makes programming with it a freaking snap. I like it even better than PHP which is my weapon of choice for these sorts of tasks. And I have to say, that after playing with it over the weekend, I believe the quotes that it will make you ten times more productive. I’m floored.
Ruby on Rails kind of hit the scene when the excellent project management SaaS basecamp hit the scene and I’ve been hearing about it here and there in places enough from people whose opinion I respect that I took the plunge for an app I need to work on and installed it on the trusty laptop. Fairly painless installation process on OSX, but the thing that blew me away was actually building an application with it.
Quite honestly, in an afternoon I built a completely working web application without the fancy css frills and such mind you, but completely usable that would have taken me the weekend with other methods. Not only that, but the ability to extend what I’ve done is so simply built into the app that I am already thinking of version 2.0 for next weekend.
So, why is it so simple I can hear you asking ? I’ve heard gushy stuff about programming languages before… Well, not from me you haven’t. I hate forcing stupid programming languages to bend to my will and do my bidding. And I hate saying something in 20 lines of code that I should be able to express in 1. The fact Ruby is clean and fully object oriented and packed full of a range of standard libraries is part of why it is so great, but also the fact the Rails framework is built in such a way as to work with you in terms of designing web apps and fully MVC modelled.
So, this means, you create your databases and then generate a model for RoR to deal with. Additions to that model are automagically handled by RoR. Then you generate a Controller. Need to see how it fits together ? Tell the Model how the databases relate to each other relationally through such object constructs as “belongs_to” and “has_many” much as you’ve already done in designing the database and then create scaffolds for the controllers. Instant database application.
Modify the controllers to add functionality and basically your applications is done.
Yeah, it’s that simple. I kid you not.
I’m still kind of in shock as to how productive I was this weekend with RoR. And this was while learning how to program in Ruby.
Anyhow, if you use Perl, Python or PHP for any sort of web related tasks that has a database involved, I enthusiastically recommend you take a look at it. it’s definitely got my attention and I am now going over the full programmer’s guide to Ruby and Rails to add deeper constructs into what I am creating. In fact, it has got me realizing that I can also increase my capacity for a number of projects I’ve got. Which is saying something. Program better, faster and more. It’s a hard argument to ignore. And they are not kidding. I actually enjoyed throwing the app together which is different than my usual love-hate relationship with coding (love what you can do, hate the titchy programming part).
Oh, and the developer community is great. You can catch up literal whack of them on IRC on
#rubyonrails and they are very friendly and amazingly helpful to newbies (and also a big bunch of big Mac heads).