CodeIgniter for Ruby?
Posted 2008-03-17 04:09 AMCalm down, nobody is building a CodeIgniter for Ruby, but I think I found a close equivalent. First some background on why I am writing this entry.
When the Ruby mad rush began with the Rails “build a blog in 15 minutes” video was posted to the net I have to admit that I was impressed. But I was impressed more with Ruby than the Rails framework. I dug the syntax and some things about Ruby such as “everything is an oject” appealed to me. Unfortunately what did not appeal to me was the lack of documentation and the difficulty of setting up a good hosting environment. I had also not been much of a programmer and even installing Rails on my local Linux machine was a huge pain. I barely knew Linux and I only wrote snippets of PHP. Rather than picking up Ruby and running with it I continued with homework and fiddling with ExpressionEngine as a hobby.
Approximately a year after the Rails 15 minute video, Rick Ellis posted his own 20 minute video for a PHP framework called CodeIgniter. I was on it immediately and I even made the first community post to the forum, Rick made web apps fun to write in PHP. Some time later that year I was hired by pMachine to do technical support on the forums. I then began doing ExpressionEngine freelance work on the side (and now full time after leaving Ellislab.) With all these changes I went from being okay with PHP to good enough to do what I needed to get things done with PHP. Today I am busy building ExpressionEngine modules and I even created this blog in CodeIgniter.
My fascination with Ruby never left though. I just couldn’t get into Rails because it felt like it was everything that CodeIgniter was not. Rails got in the way and seemed to require too much configuration. The bells and whistles didn’t seem worth the hassle. By contrast, CodeIgniter did just what I needed it to, provided great documentation and it was built by a bald headed CEO whom I am very fond of. I largely learned PHP from CodeIgniter and now I am looking to learn Ruby much the same way.
There seems to be a large number of Ruby frameworks popping up lately. One upstart which many call “a better Rails than Rails” is Merb. Unfortunately, Merb seems to be too much like Rails even if it is a “better Rails.” I tried other frameworks such as Camping and Sinatra which are small and simple but seem to lack the community and documentation of CodeIgniter. Finally, I think I have found a winner, and the framework is called Ramaze.
Ramaze, like CodeIgniter, is lightweight, flexible and seems to be gaining some momentum. Ramaze is not as polished, the site is not as pretty, the documentation is not as complete and the community is not as active (running on Google groups) but all the main components are there. With the examples I was able to get a simple blog up in minutes. I posted my first blog entry using using the Sequel ORM (like CodeIgniter’s active record library), displayed the output with the Erubis templating system and ran the actual framework with Mongrel (Ruby web server.) One of the things that makes Ramaze so flexible is that it allows developers to choose from a list of popular ORM’s, templating systems and web servers.
Ruby itself is also great because there are a ton of libraries available for the language which takes care of common needs. I have had to do a lot of searching on the PHP side to take care of things that are shipped with Ruby by default. Also, because of the popularity of Ruby I can count on a Ruby library being available for new API’s.
So now after just one weekend I am well on my way to learning Ruby. That does not mean I will be packing up my PHP world to settle in Ruby. My bread still comes from the CodeIgniter and ExpessionEngine communities but learning Ruby will only help my PHP skills. The Ruby world has great ideas which was partly an inspiration for CodeIgniter. Other things like Capistrano and Erubis can also be used with PHP. Ramaze is helping me with Ruby just as CodeIgniter helped me with PHP. Both are great frameworks which I will be using in the future. Thanks for the developers of each!