Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Using Catalyst

by vit (Friar)
on Aug 25, 2008 at 18:46 UTC ( [id://706740]=perlquestion: print w/replies, xml ) Need Help??

vit has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
I have a few questions about Catalyst before I start digging up.
1) Does it require C-compiler
2) Is it easily portable to different web servers running under different OS
3) If I created everything on windows how difficult would it be to move to UNIX and to Linux WEB hosts
4) Will it help me to simplify client programming and web design
5) Will it help me to separate business and UI programming for my web application
6) Does it have performance issues compared to regular Perl/CGI if my code makes a lot of computations

Replies are listed 'Best First'.
Re: Using Catalyst
by moritz (Cardinal) on Aug 25, 2008 at 19:04 UTC
    1) Does it require C-compiler

    From a quick view at the source tar ball, it doesn't look like. Some dependencies might need that, though.

    Is it easily portable to different web servers running under different OS

    As far as I can tell it uses standard interfaces like CGI, FastCGI or mod_perl. So if your servers support one of those: yes. (Note that plain Catalyst + plain CGI is rather slow, and not recommended)

    3) If I created everything on windows how difficult would it be to move to UNIX and to Linux WEB hosts

    If you don't mess up the paths it should be quite easy.

    4) Will it help me to simplify client programming and web design

    I don't know what you mean wiht "client programming". Catalyst is something that works on the server side. As for the web design aspect - it uses templates, so your web designer doesn't need to know any perl.

    5) Will it help me to separate business and UI programming for my web application

    Yes.

    6) Does it have performance issues compared to regular Perl/CGI if my code makes a lot of computations

    The biggest hit compared to plain Perl + CGI is the startup time, which you can eliminate by using fastcgi or mod_perl.

Re: Using Catalyst
by rinceWind (Monsignor) on Aug 25, 2008 at 21:21 UTC

    I think you need to consider what you are wanting to achieve in your web app. Doubtless Catalyst could help, though there are a few of your questions that are ringing alarm bells in me.

    What platform are you intending to deploy your server technology onto? If this is Linux, I seriously recommend developing on Linux. If you are aiming to produce something completely portable, while that is a very noble aim, you are going to need to be very careful both in keeping your code portable, and in making sure that dependent modules work fully across all platforms. This includes not just those needed by Catalyst itself, but Catalyst plugins etc. needed by your application.

    The performance characteristics will be completely different between Windows and Linux, needless to say.

    My recommendation is to install Catalyst on a Linux box, and work through the tutorial. Just now, I've had a go at installing Catalyst::Devel on a WinXP machine that is running Strawberry perl 5.8.8. This failed as Data::Alias needs perl >= 5.8.9. You might be interested in knowing that the following modules contain XS code, i.e. make use of a C compiler for building: Template::Toolkit (though you can choose to answer no to the question about building the XS code for stashes) and Class::C3::XS.

    --
    wetware hacker
    (Qualified NLP Master Practitioner and Trainer)

Re: Using Catalyst
by tswall (Monk) on Aug 25, 2008 at 21:27 UTC

    I'm very new to Perl programming but have a long track record with other MVC frameworks for web development (java/spring/struts/grails, RoR, python/django, little-bit-o ASPX/.NET). I started using Catalyst a few months back, and I have been quite pleased.

    Your specific question regarding easily portable to different web servers, I don't think it is quite as turn key as some frameworks (the java-based in particular) but better than others (certainly easier than .NET). If your server supports mod_per, FastCGI or whatever, assuming you can have access to or can install the same perl modules there shouldn't be any issues.

    Client side programming is template based, and I agree that designers don't need to know Perl, but Template Toolkit seems to be the most common template system used with Catalyst, and it seems that a few Perl-ish things come up when using TT.

    A lot less stuff is abstracted away from client-side technologies (HTML, JavaScript) when compared to other frameworks, but I have found this refreshing. There doesn't seem to be much saved in the long run when you do abstract away these things. I spent some time learning Google's GWT which essentially let's you program JavaScript in java, but it's still JavaScript, and it's easy enough to do everything in JavaScript. It just feels more warm/fuzzy when you spend most of your time thinking in one language.

    The thing that I'm the most impressed with regarding Catalyst and Perl is the ability to drop in different techniques or modules that best suit your needs. You've got a solid framework that is truly just that (a framework), but then you have the entire CPAN at your disposal. Every other framework I've used tends to expect you to do it (mostly) their way.

Re: Using Catalyst
by Anonymous Monk on Aug 26, 2008 at 06:36 UTC
    Did you check the Catalyst FAQ? These sound like great questions for the Catalyst FAQ :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://706740]
Approved by betterworld
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-23 11:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found