Friday, March 16, 2007

Ruby on Rails - the background

So... I'm about four weeks (part time) into trying out Ruby on Rails to see how good it is and if I can use it to develop some web-apps. Certainly the hype was powerful, so I decided to give it a whirl. I started with several books (in no particular order: "Build Your Own Ruby on Rails Web Applications" [Lenz], "Agille Web Development with Rails" [Thomas, Hansson], and "Ruby for Rails" [Black]) I give it a try.

After some fits and starts I get a very simple, one table application up and running on my development system... although it took me longer than that to figure it all out, once I've got the process down, I really can put a simple webapp up in one hour: create the controller; create simple views with scaffolding, create the database table through migrations... pretty slick.

InstantRails for Windows is downright fantastic []... makes the job of getting all this stuff installed pretty simple: and it works, too! I start off with version 1.4 and life is good.

I also install RadRails [ down as I write this] because it wasn't packaged with InstantRails until version 1.5 as I recall. It works fine, although my fingers are still tuned to vi commands. The ruby plugin for gvim [] is pretty slick, but without a directory tree, it's downright tedious to load/save files so I decide to make the switch .

Unfortunately, RadRails isn't so cooperative. Whenever I try to upgrade the software (I'm at version 0.7.2, but attempting to udpate only results in an error message:
'RadRails (0.7.2) requires plug-in "org.eclipse.core.runtime (2.1.0)", or later version.'
I don't want to spend the time researching this and note it for the future. However, it does make me wonder a little about what I'm getting into.

As I'm reading/trying things out, I find that:
1) the rubyonrails wiki [] is being heavily spammed by bots, and sizable chunks of what I'm looking for are nothing by junk. I try to go back thru the history and find the information I want, manage to make some changes, but in a few hours, the spambots have returned. There are pleas on the site to add some security, and there are good intensions, but the problem continued. I still go back there to find things, but I don't expect that all is good there. Too bad; nice idea and some good content.

The other problem is that much of it is outdated... as Rails develops, a fair piece of the content is being obsoleted Sometimes it's posted there; sometimes not. For a nuby, in particular, that makes life quite difficult because you don't know what's right or wrong except by trying things out... and that can take a LONG time to figure out.

The other problem is that material in the books is outdated, as well (even if they just were published... Rails is moving - fast). I spent a fair chunk of time (several days worth) trying to get acts_as_taggable running, based on the comments found in Lenz' book. I finally figured out that there was a much later version that had many more features and I got that to work. However, there were at least two blogs/forums that claimed that acats_as_taggable was deprecated and there was another, more general gem that should be used.

Another example: the login_generator gem. Been around a while, works fine. documented on the site... lots of deprecated code (or so says RadRails).

I searched for and found what was reported to be a better UI scaffold called streamlined [] and worked on that for several days. Finally gave up: it sort of work on FireFox and worked better on IE6, but I never could get everything to work out right and I personally didn't like the way they handled pop-ups... so it was back to the drawing board.

I'm currently trying out AjaxScaffold [] -- so far, I like the more subdued interface and there's LOTS of documentation and a full online demo, so we'll see how this works.

My impression so far: this may be a great web development environment (I like a lot of the structure and ideas behind it), but it's not for the faint of heart.

No comments:

Post a Comment