[Catalyst] Advent Calendar... Grant proposal...

Octavian Rasnita orasnita at gmail.com
Sun Jan 18 17:34:01 GMT 2015

From: <rick at hiranyaloka.com>

>> I think that one of the main use of Perl is to create web apps.
>> And the best way of creating web apps is by using a web framework.
>> And the most developed web framework for Perl is Catalyst.
>> But those who prefer other frameworks do it because they consider 
>> Catalyst
>> too complex and hard to understand.
>> So yes, a more clear documentation for Catalyst should be very helpful.
>> Newbies might have the time and willing to write it, but they might not
>> know
>> what to write. :)
>> So... applying for a grant to do it may be the solution.
>> --Octavian
> Good documentation is clearly necessary, but I don't think that it will by
> itself be enough to attract newbies.

What else do you think that it may attract you?

I am an interested newbie, so perhaps I can add something to the 
conversation. My impression is that Catalyst is
> not so complex by itself, but it sits at the top of a pyramid of knowledge
> domains that are both broad and deep. MVC (each letter is a book in
> itself), Perl/CPAN, OO, web servers, security, web hosting (your shared
> hosting won't work), etc. What did I miss?
> The loosely coupled Catalyst approach to web frameworks therefore benefits
> from a loosely coupled approach to Catalyst training. What's the minimum
> required knowledge to create a "best practice" web application using
> Catalyst? Each area requires a loosely coupled learning module, that both
> stands on its own, and directly supports a minimal, yet "best practice"
> prerequisite understanding necessary for integration into a Catalyst
> application.

Imho a beginner should not start by creating "best practice" apps, but apps 
which help him/her to understand each step as easy as possible. She or he 
just need to know that there are better ways that will be learned later.

When we say that Catalyst is hard/easy or elegant/confusing for beginners we 
compare it with other web frameworks, but the apps made with all web 
frameworks need to interact with a web server, use OO, CPAN modules, should 
take care of security, should be installed on a remote server etc, so it is 
not a big difference.

Dancer examples are nice and sweet, much more elegant than Catalyst's 
examples, most of them in just a single file, but in real world applications 
we may want to split the web apps in more modules for a better 
maintenability, we might need to access more databases, we might want to use 
more complex URL dispatching styles, and in that case we would see that if 
we would do those things in a Dancer app, that app might not be so elegant 

It sounds very good that Mojolicious doesn't require other CPAN modules but 
it offers its own modules for many things, and it looks like it would be 
much easier to install a Mojolicious app, but unless the app is simple 
enough we may still need to use other CPAN modules, so we should still need 
to be able to use cpan or cpanm. And in that case, it wouldn't be a big 
problem to install a large distribution like Catalyst either.

"Beginner" may mean many things, so it is not very clear what 
recommendations you are searching for. For a Perl - beginner level it is 
recommended to use the common Perl best practices regarding the 
variables/subroutine naming, indentation etc, for a web developer beginner 
is recommended to learn about HTTP and CGI protocols, how web servers work, 
about security in web apps, for a Catalyst beginner is recommended to read:


and the POD docs in Catalyst::Manual, trying to concentrate on Catalyst - 
related code and not DBIx::Class or Template-Toolkit or different form 
processors if you haven't used them yet.

The Catalyst docs are not very good for real beginners that have never used 
a web framework and also never used an ORM or templating system. Many of 
them give "best practice" examples which may be harder to understand by a 
beginner because they contain Catalyst code intermixed with code from 
different other modules and a beginner may not know where ends Catalyst and 
starts DBIx::Class for example.
This is why is said that Catalyst has a steap learning curve.
It may be very helpful if the beginner first starts by learning to use a 
simple RDBMS like MySQL or SQLite and DBIx::Class ORM which is the prefered 
ORM by most and also Template-Toolkit which is the preferred templating 
system, even only superficially, and only after that start learning to use 
Catalyst because then it would be much easier to see that Catalyst is just a 
glue between other modules and that it is not hard to use it.


More information about the Catalyst mailing list