I’ve been a fan of Ruby on Rails for a while. I’ve not been able to find a hosting solution that keeps on the bleeding edge of Rails development. Most hosts are 2 or 3 years behind, which makes it very difficult to keep your site updated with the latest gems.
I found myself asking, “Why is that?” The answer is pretty simple: Rails has strict conventions. Those conventions tie you into developing on the framework. I have a similar issue currently at work where I’ve worked with PHP in the past, so it was assumed I would quickly and easily pick up on Drupal. For those of you who don’t know, drupal is a fairly large content management system with hooks and interfaces to the core which make it very easy to create modules. And, yet, you’re locked into that convention and tied into whatever modules you devour.
In the case of Ruby, it’s not really ‘difficult’ to make modifications, but doing so can quickly break the mantra of the framework. It’s not really fragile.. stubborn maybe? In Drupal’s case, in order to modify something being done at the core, you have to right a module which uses hooks or other callbacks. If you need to modify a module, you have to write another module. The code you write for Drupal can’t easily be extracted and used elsewhere (unlike Ruby’s gems).
The other day, I came across the Catalyst Framework. I’ve been reading about perl, and hoping to familiarize myself with it. There’s no better time than now.
Here are the steps I’ve taken for getting started with Catalyst Framework, a perl MVC framework.
- Install ‘cpan’: sudo apt-get install cpan
$ sudo apt-get install perl-doc
Set policy to follow:
cpan> o conf prerequisites_policy follow cpan> o conf commit
$ curl -L http://cpanmin.us | perl - --sudo App::cpanminus
$ cpanm --sudo YAML
$ cpanm --sudo Catalyst::Manual
To view the manual, run:
$ perldoc Catalyst::Manual
$ cpanm --sudo Pod::Browser $ pod_browser_server.pl
Install ‘Catalyst::Runtime’ and ‘Catalyst::Devel’ via cpanm:
$ cpanm --sudo Catalyst::Runtime $ cpanm --sudo Catalyst::Devel
Scaffold your application:
$ catalyst.pl MyApp $ cd MyApp $ script/myapp_create.pl controller Library::Login
That last line generates a login controller…
run this test application:
- navigate to http://localhost:3000
Install a Perl IDE. I’ve chosen EPIC (an eclipse plugin) to start off with.
a. Open Eclipse and go to Install New Software
b. Add the site: ‘http://e-p-i-c.sf.net/updates/testing’
c. Choose the main application and install it.
- Read through documentation in Catalyst::Manual