Rapid development frameworks – CakePHP, Django, RoR

Last month I blogged about a comparing rapid development frameworks. These are tools that help you develop web-based applications. They provide building blocks of functionality that you can readily glue together in a larger conceptual framework [like Lego, you can build complex machines from simple blocks]. This is opposite to other tools, like “Content Management Systems” (e.g. Drupal, Joomla) which are less flexible, one-size-fits-all approaches, which make some assumptions about how you want to organise your content [like those scale model cars, they're intended to be used with the supplier's other accessories].

So in that blog post … we didn’t get to much of a conclusion, except that “It Depends”. Depends on what kind of resources you have available, what kind of deployment options you want, whether you’re more comfortable with PHP, Python or Ruby, etc etc.

After playing around a bit with these 3x frameworks, I’m going to be concentrating more on RoR (Ruby on Rails).

Continue reading

Merb merges with Rails 3!

In a bit of surprise news, Rails merges with the Merb team.

The implication will be that the efforts of the two frameworks won’t be duplicated across the teams. Users of merb will be able to enjoy the third-party support that Rails enjoys – for example Rails is bundled with the latest Mac OS X, and Eclipse has the awesome RadRails.

My previous reservations re: RoR may now be fast disappearing. Look for future blog post that re-evaluates the position.

From YehudaKatz’s blog: On to the news: beginning today, the Merb team will be working with the Rails core team on a joint project. The plan is to merge in the things that made Merb different. This will make it possible to use Rails 3 for the same sorts of use-cases that were compelling for Merb users. Effectively, Merb 2 is Rails 3.

Experimenting with Ruby and Merb

I’ve been looking through Ruby on Rails and I find many of the conventions fascinating. Convention-over-configuration is cool one … it means instead of having to tirelessly configure every single aspect of your application … RoR does some things automagically, provided you name things correctly. This cuts down on the amount of time spent tinkering with configuration (editing large XML files, a la Hibernate) and more time actually dealing with the problem at hand.

But what is perhaps RoR’s greatest strength is also likely to be it’s greatest weakness. Although you can get apps up and running very fast with a framework like RoR, you may find yourself tied to a certain way of thinking – because the framework was prescriptive like that.

And now Merb comes along. Although it’s not got as big a user base as RoR, Merb seems to have a lot of good potential. Losing some of the “automagical” convention-over-configuration pixie dust has its downsides, but the upside is that Merb seems to be a lot more flexible and lightweight, and less prescriptive. We shall see the results of these new experiments …

Fedora 10 w/ Aptana Studio 1.2 & RadRails

Here’s a short recipe for getting Fedora 10 up and running, with RadRails. Fedora 10 comes with Eclipse 3.4, so for this we’re going to use the stock MySQL & Eclipse from the repositories, then add the Aptana Plugin to Eclipse, then add the relevant Ruby Gems to the root filesystem.

I’ve done it this way because: Eclipse from the repositories also includes some nice Fedora niceties, Aptana’s PHP editor has a unique cloud feature, and Fedora’s repositories don’t have all the Ruby Gems required. Using the RubyGems package manager in this instance is better than using the Fedora one.

1. yum install mysql-server eclipse-pde ruby ruby-devel ruby-mysql [if you get problems w/ sqlite3 and directory names, go with MySQ. You need the "SDK" version of eclipse, not the "Platform" version , and I think PDE provides it. You'll need a Ruby interpreter (this one is the slower stable 1.8 interpreter, not the newer 1.9 development interpreter) and the Ruby header files].

2. Scan through some existing documentation from Aptana. Follow the steps documented on this page.

3. Once you have Aptana running within Eclipse, open up the “My Aptana” page. Click on the “Plugins” button of the My Aptana page (subtitle: Extensions for Studio. It’s the yellow one, you can’t miss it, the fourth icon from the left).

Screenshot of Eclipse with the My Aptana page open

Screenshot of Eclipse with the My Aptana page open

4. Choose the RadRails plugin. If you also do PHP development, I also recommend installing the PHP Extension. This is unique because you can develop PHP projects locally then deploy to Aptana’s Cloud service in one-click.

5. Once RadRails is installed in Eclipse, you will also need Rails on your local Linux system. Open a terminal, become root (su -), download the latest RubyGems file from RubyForge. You’ll need 1.3.1 or above. Un tar the file (tar -zxf rubygems-1.3.1.tar.gz), then go into the rubygems directory you just created (cd rubygems-1.3.1) and run the setup (ruby setup.rb)

6. Congrats – you have Eclipse w/ Aptana Studio & RadRails set up, and a local install of Ruby w/ RubyGems. Now install all the gems you’ll need for RadRails (gem install actionmailer actionpack activerecord activeresource activesupport cgi_multipart_eof_fix gem_plugin mongrel rails rake ruby-debug-base ruby-debug-ide ruby-prof -V) Note: the -V is the verbose switch.

7. Viola, you should now have a working install. Go to RadRails and create a new project, everything should be automated and Eclipse should create for you a nice shiny new Rails project. Good luck & Have Fun!