Skip navigation

I just tried out Ruby on Rails today and I must say it’s pretty fun. I didn’t really have a go at scaffolding because it was deprecated at version 2.0 and I don’t like messing with deprecated things.

That made things a little harder for me to get started but I have a few simple forms that allows me to save stuff to a MySQL database, which is okay. Ruby seems pretty straightforward, reminds me a little bit of the brief stint I had at Python last year. The syntax takes a little getting used to, but that’s the easiest part of learning a new language. The thing I had most trouble getting wrapped around my thick head was the block, but even that is beginning to seem straightforward now.

A suprising thing was that I found it difficult to find up-to-date tutorials for Ruby on Rails, although there’s enough on Ruby. When I was learning CakePHP I seemed to have a lot more information. I miss the CakePHP Cookbook. With Ruby on Rails it seems like I need to do a lot more digging around on the net. I thought it would have been the opposite.

One thing I really like about Ruby on Rails (or more specifically, Ruby), is the solid OO model. While PHP has some OOP support, Ruby has a pure OO model – even numbers are objects. In a language such as PHP or even Java, numbers are so called “primitives”. In fact, even the irb (Interactive ruby) itself is an object. In fact, classes are also objects. Pretty much everything is an object (though I’m sure there are exceptions). The question is – does having a solid object-oriented model really help that much when developing web applications? It does seem to lead to cleaner code – with PHP you have to mess with and manipulate massive arrays instead of just interacting with an object – however I don’t see a huge advantage in having an OO model this solid for a web application. OOP is almost a necessity for custom-built and highly complex systems, but the focus on OO is not a huge issue in a web framework, generally speaking. There really isn’t that much freedom within a domain specific framework to exercise the full extent of the power of OO.

Will I keep using Ruby on Rails. Yeah, of course! I’m always interested in learning new things and building new stuff. Remember, I’m always building new websites/webapps. At times I will make extremely slow or no progress due to other commitments and life and stuff, but expect to see new apps being launched from this blog in the coming months.

P.S I have not left CakePHP. I will continue to use it as well. Both are excellent frameworks. CakePHP I like particularly because of the massive amount of information available on PHP. That is one significant advantage.

Advertisements

2 Comments

  1. Consider also a look at the Seaside framework (http://seaside.st/), which uses the far-simpler-to-learn Smalltalk syntax, and in general has been shown to have better performance and speed of design. Many former RoR programmers are now looking at Seaside.

  2. Yes, I have found the tutorials being out of date a bit of an issue (esp with Rails 1.2 to 2.x changes).

    I have always like Akita’s ones, you need to select in English off course eg http://www.akitaonrails.com/2008/5/25/rolling-with-rails-2-1-the-first-full-tutorial-part-1

    Recently brought the PDF of the 3rd Edition of Agile Web Dev with Rails and that has helped also. At http://www.pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: