This past weekend I started really digging into Ruby on Rails. For a
while now, I have known a little bit of ruby (by reading Why's Poignant
Guide and messing around a little with Rails), however, I wanted to
have a much stronger understanding in it — even if it's only for the
concepts.
Why Rails — Why Now?
Rails has been publicly available since July 2004; some may ask why
I am just now becoming interested in the framework. There are actually
several main reasons…
- It is a good educational
resource in the MVC Pattern. This applies to many implementations such
as Microsoft MVC, Symfony and Cake on PHP and a whole slew of other
frameworks. - Rails is becoming a more viable option with JRuby and the forthcoming releases of IronRuby.
- The concept of DB Migrations is very nice — especially when you
have encountered the difficulty involved in placing your database under source control.
Setting up the environment
-
I needed to configure my computer to run the rails apps. NetBeans
seemed like a good idea to me because of the simple JRuby integration
(other options Aptana Studio, Eclipse, your favorite text editor w/ Instant rails). -
Created a series of databases (as needed) for the various test rails apps to write to.
-
Downloaded and installed MySqlYog Community edition. I knew I was
going to be handling most of my database stuff with the Rails
ActiveRecord implementation and db migrations BUT I still wanted to see
what was going on inside the db.
Initial Impressions
After the initial hour or so of
setting up my environment, I wrote some quick test applications
(following some tutorials, at first obviously). I really liked the
principle of Convention over Configuration. This was apparent in many
areas of the framework such as the generator / rake tools and the easy
application configuration in the .yaml files. I can see how this may
not be the best choice for certain applications but for a lot of web
applications, it seems like it will be a good fit.