Sunday, September 30, 2007

For the Love of Rails..

2 comments
Most people who know me personally know that I'm an Open Source enthusiast. And they probably know that I'm more of a SysAdmin than a developer. Well, thats quite true. Eventhough I enjoyed programming, my main interest was always System (especially Linux) administration. However in the last 6-8 months aor so I've started getting more and more into Open Source development. A major breakthrough for me was getting selected for Google Summer of Code 2007, to participate in Nmap! (Nmap is much like a grail among SysAdmins :) Unfortunately my persoanl circumstances didn't allow me to finish the work with them. Family matters and other things piled up and I have to give up. Nmap people has been very supportive though and the same was true about the Google people. So after some weeks here I was trying to look more into Nmap, Metasploit and other things. Then I realized that I could give sometime to this Ruby thing which I heard was on Rails or something.

Here I am now, after a few months. Although my software developing exposure hasn't seen a lot more, I've ventured into it. And I have to admit, that Ruby as a language and Rails as a framework has changed my view about the whole software development arena. So what's new? Another fanboy article about Ruby on Rails? Not really. I just want to thank Ruby on Rails. :) If you are offended by Rails please skip this post. I promise there are couple of posts about other things coming up shortly. :)

First I thought of following J2EE and web services, because I knew virtually nothing about them. You know, I can't stop myself getting interested in new technologies. (For example I've started with the Xen tools in Linux and got to like it very much........ Ok, not so new :). But before I did that I gave Ruby a try, and started using Rails to create simple things (which is what I still do. :) And what else? I simply love it. Ruby as a language helped me grok more of OOP concepts. And when I got to try Rails, I just had to hold my breath in amazement (and amusement too).

I always felt that business application level programming was messy, tedious and boring, partially due to the way we were taught about them. However after Rails, I just feel it's not that bad afterall. I'm not saying that J2EE is a bad platform, not even being funny as RailsEnvy people. :) Just as a user, after using Rails I feel, "why the hell it has to be more obscure or tedious?"

Rails uses DRY and Convention Over Configuration concepts. DRY means don't repeat yourself. And Convention over Configuration means unless you make specific changes, there's no need to worry about grunt work in configuration files, XML and etc. Everything has a conventional way of doing it. And if you choose to differ you may well do it.

The scaffolding is great to learn Rails and also give a good idea of how to organize a web app. And migrations!!! Just have to say wow. With migrations one can use the database without worrying about changing database level things. Object-Relational mapping is implemented using a design pattern called "Active Record" opposed to the hibernate technology in Java. With these thing, a Rails developer don't have to worry about the underlying database or the DBMS for that matter. Now, doesn't it sound good? All in all, I've so far loved the learning process, and I have a feeling that I'm going to remain so. For Java, .NET and other framework users, I'm not asking you to throw away your tools. Just give Rails a fair try, totally worth it.

More I use Rails, more I realize that it isn't a toy. It's a serious framework which is giving other frameworks a serious run for their money. As far as I can say, you cannot appreciate the power and ease of Rails without getting your hands dirty with some coding.

For a quick peek of Rails try Rolling with Ruby on Rails short tutorial.

2 comments:

  1. No doubt RR is simple and a very popular framework for doing web apps but you can't get the correct idea by just following the OnLAMP's tutorial.

    It simplifies the development a lot as a result of the example (as is in many introductory tutorials) it uses but in reality developing a complex app is still going to be complex. The Q is how well the framework will assist you in such a situation as opposed to hinder you by making you jump through several hoops.

    I am no Ruby developer so I cant say with certainty but I'd resever my judgement till I'd build a real world app.

    ReplyDelete
  2. Very true, that you cannot see whats worth till you try it. So I'm doing it. :) Sure, the OnLamp article can't give the complete picture, I just mentioned it because it shows a taste of what is convention over configuration.

    As far as I know Rails is not another wrapper which simplifies common operations. Rails has design principles of it's own which help to improve the productivity. These things are factors when you have to do a complex system. Even the things like, not having to worry about configuration is a plus for me in such cases. A lot of these advantages have roots in the Ruby language. And as a framework, ..... well I'm not going (and by this point I actually am not competent enough in other frameworks) to tell how it makes things better. As you say I'd just try it more and more. More I try it more I realize that it is actually a full-stack web application framework.

    I'm a SysAdmin, so I'm also no Ruby developer, but I'm becoming one rapidly than I thought. Anyway, you guys have played long enough with WS and frameworks to be far far ahead of me. :) I also hope that you'd give it a try.


    PS: And.. oh, I wrote that in a hurry, even more hurry than the Git article, and I also think the Git article is better in standards.

    And,... why, I almost forgot to thank you for your comments. So Thanks a lot. :)

    ReplyDelete