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
- Install ‘perl-doc’: ```bash $ sudo apt-get install perl-do
3. Start ‘cpan’: </p> ```bash $ cpan
- Set policy to follow: ```bash cpan> o conf prerequisites_policy follow cpan> o conf commit
5. install cpanm: </p> ```bash $ curl -L http://cpanmin.us | perl - --sudo App::cpanminus
- Install ‘YAML’: ```bash $ cpanm –sudo YAML
7. Install ‘Catalyst::Manual’: </p> ```bash $ cpanm --sudo Catalyst::Manual
- To view the manual, run: ```bash $ perldoc Catalyst::Manual
- Install ‘Catalyst::Runtime’ and ‘Catalyst::Devel’ via cpanm: ```bash $ cpanm –sudo Catalyst::Runtime $ cpanm –sudo Catalyst::Devel
10. Scaffold your application: </p> ```bash $ catalyst.pl MyApp $ cd MyApp $ script/myapp_create.pl controller Library::Login
That last line generates a login controller… </li> * run this test application: </p> ```bash
* navigate to <a href="http://localhost:3000" target="_blank">http://localhost:3000</a> </ol> ## Next Steps * 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