March 5, 2008

Why I Decided To Use Ruby On Rails

Filed under: rails, ruby — oomoo @ 11:44 pm

Many people say that choosing a tool for creating web-based applications is a "personal" decision. Well, for me it was all "business". I am a consultant first, and a programmer second. I have to be able to solve my clients problems, giving them a "best fit" solution as quickly and inexpensively as possible. You have to ask yourself what kinds of clients you have and what are the types and sizes of projects you work on. I work mostly on database applications for small to mid-size companies. This means a small team, short development cycles, and "the database is king". This is an absolutely perfect fit for Ruby on Rails.

I wanted to find a web development "package" that came as close as I could get to using my favorite desktop  tool Visual Foxpro (VFP). Yes, I also use .NET, but it really does not lend itself to the short development cycles and easy maintainability that I need.  I also wanted to push my personal envelope and see if there was life outside of Microsoft.  So, I researched (and used) Python and Django, Pearl, PHP, OpenLaszlo, and Flex/Flash before deciding to use Ruby On Rails.

First, you must note that ALL browser-based "languages" and "application frameworks" end up doing nothing more than feeding a combination of JavaScript, HTML, and XML (AJAX) to the browser. That’s it because that is all that browsers natively understand! If you use Flash, Silverlight, or ActiveX controls, those are pseudo-exceptions to the rule, but have their own baggage.  I have included some Flash into my coding toolbox for certain suitable things like charts and dashboards.

Rails is an "web application framework" that uses the Ruby "language" under the covers. The job of a framework is to hide complexity and pull together additionally required technologies into a cohesive package. Rails integrates and extends core web presentation technologies like JavaScript, HTML, CSS, and XML.  It insulates me from the details of HTTP server conversations.  Rails modules like ActiveRecord let me treat database records like objects, automate testing, perform data migrations, detail data relationships, handle near all my SQL calls, perform logging, have built-in session security, etc. Rails makes it easy to find database records, display them to users, allow users to edit them, validate the input, then save the results back to the database.

But, as with all programming frameworks, when you use a framework, you must "buy in" to certain ways of doing things to really make it shine. If you follow the Rails conventions for naming tables, primary keys, program files, web files, etc. you can do an extraordinary amount of work with very few lines of code. Rails does have builders and generators to help you follow the rules fairly easily. If you are migrating a legacy application, things get a little more verbose, but I have some notes on that in other posts on this blog.

One of the biggest hills I had to climb was learning so many new things all at the same time. I had been writing fat-client HTTP/SOAP applications for years, just using the Internet like a wide-area-network.  I had done very little browser-based development work, so I had to get a better handle on HTML and CSS for page design, JavaScript, XML, the document object model (DOM), MySQL for my database back-end, the Rails framework modules, and finally Ruby for my language.

Then, I had to sort through the different web page design/layout packages, database management applications, and biggest of all, which IDE to use for editing/debugging my applications. Finally, I had to select a hosting site and learn their server management tools.  Luckily, I have background in server management, web server deployment, and Unix/Linux.

I must say, that it has proven to be very exciting and fulfilling.  I stepped out of my comfort zone and I don’t regret it!  We didn’t choose this field of work for comfort now did we?

If you are going to try your hand at Ruby and/or Ruby On Rails and you want some tips-and-tricks to help get you started, just have a look around this blog and the many other fine resources out here on the web.  You can also comment or ask me questions here on my blog and I will be happy to help you any way I can!


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: