Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Catalyst or not?

by jfrm (Monk)
on Sep 10, 2006 at 07:15 UTC ( #572198=perlquestion: print w/replies, xml ) Need Help??

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

I'm writing prototype code to establish proof of concept. I think I have DBIx-Class-Schema working and searching OK.

I'd like to use webforms (just basic CGI HTML), first to just to search and show results from searches but also to do CRUD/BREAD. I have established that I could use CGI::Formbuilder for this - or perhaps DBIx::HTMLView or DBIx::HTMLinterface.

The more I read, the more I get the impression that I should be using Catalyst or Maypole but it just all looks so off-puttingly complicated. My learning curve is steep already and, although Catalyst keeps saying how easy it makes everything, it looks like you have a weeks worth of reading before you start. Also it does warn that I'm going to have trouble just installing Catalyst due to the number of dependencies and I already spent a week just trying to install first CDBI and then DBIC. This is partly due to the fact that I'm on the ever unpopular win32 but am I being overly pessimistic?

Replies are listed 'Best First'.
Re: Catalyst or not?
by perrin (Chancellor) on Sep 10, 2006 at 15:56 UTC
    That's the classic tradeoff with any framework, not just Catalyst. It requires more time to get started with it and it may not be structured the way you would have designed it. The payoff comes if you are making lots of similar things, since making the second and third one should be much quicker. You'll have to decided based on your future plans whether it's worth getting into a framework or not.
      That's the classic tradeoff with any framework, not just Catalyst. It requires more time to get started with it and it may not be structured the way you would have designed it. The payoff comes if you are making lots of similar things, since making the second and third one should be much quicker.
      And I would add the point that you shouldn't get sucked into playing the software-of-the-month game. If you've got a way of doing something that works, then what you have is something that works... don't throw it away just so you can say you're using the latest and greatest.

      The odds are good that once you get used to using Catalyst the buzz is going to have moved on to yet another package...

Re: Catalyst or not?
by adamk (Chaplain) on Sep 10, 2006 at 11:57 UTC
    For the moment I'd avoid Catalyst on Win32, there's too many bugs remaining in too many modules.

    That said, Catalyst is one of the major test cases for the very active group currently working their way through CPAN bug hunting on the new Strawberry Perl platform (and that work is moving very very quickly now), so I think that by Christmas installing Catalyst on Win32 will be an entirely different experience to what it is right at this moment.

    So in summary, give it another 3 months. But Catalyst on Win32 right now is still painful.
Re: Catalyst or not?
by randyk (Parson) on Sep 10, 2006 at 17:31 UTC
    If you're using ActivePerl, we have a ppm package of Catalyst in our uwinnipeg repository - installing this will also install all the required dependencies. The Task-Catalyst ppm package installs some additional packages that are useful for writing more complicated applications.
Re: Catalyst or not?
by tphyahoo (Vicar) on Sep 10, 2006 at 13:40 UTC
    Cat install is tough; the dependencies are a problem. Eventually you adjust, but to a new user it's a hurdle. Mainly I worry that install difficulties will decrease cat adoption among developers who are framework shopping.

    Don't do it on win. It can be done, people are doing it, but I wouldn't.

    Once I got the install sorted out

    ( Install Perl Locally -- If this works for Catalyst, it'll work for anything! )

    life was good. I still haven't started using DBIC as an ORM, and it feels like I'm only using the "View/Controller" bits of MVC (model view controller) that are so hyped. But it's calming to me that a whole lot of thought has gone into model infrastructure, waiting for me when I need it.

Re: Catalyst or not?
by talexb (Chancellor) on Sep 10, 2006 at 20:24 UTC

    I gave myself two weeks or so on Catalyst and on DBIx::Class, got a lot of help from castaway and mst, but still wasn't able to get it sufficiently to use it, so turned to CGI::Application instead. It's more mature than Catalyst and has a host of plugins that take care of interfaces to modules like DBI and Template::Toolkit

    The Catalyst team is a bunch of very bright people, and I found them to be very patient and helpful. You got further than I did .. so I guess it depends on time. If you have the scheduling leeway, go ahead and try Catalyst. If not, it might be safer to go with something that you can use and get your project done within your scheduled time. Your call.

    And be sure to let us know how it all goes.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

        Thanks for the link to BREAD; I didn't know about the competing acronym to CRUD. And I'm not aware of a CGI:Application Plugin for DBIx::Class, but if all you need is to be able to pass around a pointer or two, you can use the param method for that.

        If not, then I guess, roll up your sleeves and get with Catalyst.

        Alex / talexb / Toronto

        "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Re: Catalyst or not?
by Anonymous Monk on Sep 11, 2006 at 08:39 UTC

    Catalyst as a full-grown web framework has a steep learning curve. The effort pays if your project is complex enough to vindicate using such a framework, even more if you do such projects regularly.

    If your website classifies rather as "smaller CGI application", you'll be better off using CGI::Application (as the name already implies) and its plugins.

    Best regards,
    Jochen

      Thanks, sounds sensible. I think it qualifies as "Smaller CGI app". Trouble is I haven't located a suitable plugin although this is probably just my naivety. Presumably the idea is that the plug-ins give you an almost ready to go application and all you need to do it set a few parameters and give it the database info. CGI::Application::Plugin::BREAD seems to be based on Class::DBI and I think I need the functionality from DBIx::Class.

      See here for my separate thread on which package to use for the forms/CGI side DBIx-compatible module to use for CGI CRUD/BREAD?.

      Edited by planetscape - properly linkified link

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-05-21 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (76 votes). Check out past polls.

    Notices?