[Catalyst] Starting development

Peter Karman peter at peknet.com
Thu Apr 27 20:33:29 CEST 2006



Guillermo Roditi scribbled on 4/27/06 12:13 PM:

> I have never used Class:DBI or DBIx or anything besides plain DBI 
> because of the nature of the things I develop. Most of the queries are 
> very very complicated and are easier done in plain SQL.

There is no requirement in Cat to use an ORM (CDBI, DBIC, or Rose::DB 
are the three main ones bandied about in the Cat world).

I don't use any of them right now in my Cat apps, though I will likely 
experiment with RDB in the near future.

Not using an ORM leaves out the M from the MVC (Model, View, Controller) 
framework that Catalyst uses, which leaves you View and Controller. 
Those two are where all the fun stuff happens anyway. :)

Don't get hung up on the whole "which ORM do I use" thing at first. You 
can use DBI and straight SQL all you want. What Catalyst does is 
encourage you to think differently (if, like me, you don't know much 
about MVC, then read up on that a little first). After you get your feet 
wet with an app or two, then you can start to inject some Model stuff in 
there.

Catalyst is, in my experience, fundamentally some core glue modules that 
bring together the best of breed from CPAN. Those core modules, plus the 
growing wealth of plugins, makes certain core features Just Work. Things 
like session management, authentication/authorization, mapping URLs to 
actions, templating: those just work and saves the hassle of creating 
them yourself for each app you write.

There's lots of griping about the install process, though in my 
experience it's usually not Cat to blame, but some of the CPAN stuff it 
depends upon (notably Module::Install).

> 
> I've never been super into the OOP thing. I make my own modules for 
> internal use as classes but I have never subscribed to the 
> ruby(/java)-style everything is an object thing.


It's still Perl. Everything is not an object. But OOP is definitely the 
way Cat is written.


 > Like i said, I'm new to this sort of automated scaffolsing 
development > so I dont even know what to expect it to do for me and 
what I need to > do myself. It's so overwhelming at first being 
innundated with all
 > these APIs and buzzwords and paradigms and new ways to do old things.

It \can\ be a bit overwhelming, I agree. The whole More than One Way to 
Do It model on steroids. But then, that's just because there are so many 
people hard at work in the Cat community, each with an idea of what 
works best for them. Chances are good that you can use many things you 
already know/prefer and bring them with you.

I started with the example app here:
http://dev.catalyst.perl.org/repos/Catalyst/trunk/examples/ServerDB/

It's a bit dated, but works.

I blogged up some links when I started, just to help me consolidate the 
bookmarks I was accumulating:

http://peknet.com/index.cgi/projects/catalyst.perm



-- 
Peter Karman  .  http://peknet.com/  .  peter at peknet.com



More information about the Catalyst mailing list