[Catalyst] Where is the "Catalyst for Dummies" page?
jshirley at gmail.com
Sat Oct 20 00:57:03 GMT 2007
On 10/19/07, Faber J. Fedor <faber at linuxnj.com> wrote:
> I've been playing with Catalyst seriously for the past week ( and
> not-seriously for the past several months) and I can't figure out what
> to do with it; I can't even figure out how to display a "Hello World"
> page using a template.
> Yes, I've read the tutorials, attended the lectures, etc.. I still
> don't get it. Oh, I understand the MVC concept; it's the implementation
> I don't grok.
> So I decided to go digging through MyApp to tease out the FM. Two
> questions immediately popped up:
> 1. When I start MyApp and go to http://localhost:3000, I see the
> Catalyst welcome page. Now what? How do I (or more importantly, my
> users) know to go to http://localhost:3000/login?
> 2. Looking through Login.pm, I see a call to
> Where is this function? 'grep -ir login *' doesn't return anything that
> looks like a function declaration. (Yes, I know $c is the context object
> that ties the different parts of a Catalyst object together.)
> I think most of the other FM I don't get (like
> $c->model('MyAppDB::Book')->all) is related to DBIC magic which I'm not
> interested in right now.
> FWIW, my current project is to read/write a YAML file via a form.
> Is there a page that explains how to get Catalyst working that suitable
> for Dummies, preferably without a database backend to simplify things?
All of your questions are really answered in the tutorial. Here are links
answering each question you asked.
How to generate a view using templates, ala TTSite:
How to authenticate users:
This uses the "Authentication" plugin, which provides the ->login method.
You can read up on it here:
Please note that this is the older version, and there has been a newer API
that provides a number of better features. Just search for
Catalyst::Plugin::Authentication on the CPAN and you should be able to find
And, if you don't want a database then don't use a database model. You can
create a model that does whatever you want. Search the CPAN for
"Catalyst::Model" and you'll see a lot.
Here's a good path to follow:
1) How would I accomplish [business goal] as a library that other people can
2) How can I test [business goal]
3) Write that API as a separate perl module (MyApp::BizLogic)
4) Now, write a thin Catalyst adapter class (MyApp::Model::BizLogic) that
provides the Catalyst hooks to make it easier to talk to in the controller.
5) Launch, and be successful.
J. Shirley :: jshirley at gmail.com :: Killing two stones with one bird...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst