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

Until now I've been doing my web apps in php and using perl for other stuff, but now I'd like to try doing everything in perl. So, I am planning on implementing a well structured web framework app with a database backend, using perl, over the next few months. This is learning / personal, with the potential for maybe becoming more.

Maybe this means using an "mvc" framework (still a little hazy on exactly what mvc means). Or maybe this just means using a templating system with a database bolted on. Or maybe these two concepts are isomorphic?

Anyway, since I will be investing a lot of time learning the framework, to save time on reinventing the wheels, I'd like to poll the monks first on the best way to do it.

My highest priority is getting something up and running fast, in a win32 development environment with apachefriends. My second priority is something that will be maintainable going into the future. I guess maybe these priorities are slightly in conflict.

What I'd like to do is start with a "finished product" demo, and adapt this to my needs.

Mason + Alzabo has the apprentice demo app. I'm not sure if this exactly qualifies as an "mvc" application, but at least it is a bit more than just Mason. I tried this first because there seems to be a lot of buzz about mason. Unfortunately the installer script choked when I tried doing this on windows; so before pushing further with this I thought I'd look at other options.

Maypole + TT has the maypole + TT beer database demo. Haven't tried setting this up yet.

There are also two Maypole + Mason projects on CPAN. MasonX::Maypole, has a maypole + mason beer database demo. Haven't tried setting this up yet.

The second is Simon Cozen's Maypole::View::Mason, which was funded with a perl foundation grant.

If I go the Maypole + Mason route, I'm not sure which of the above two frameworks I could get started with. Is one better maintained / fresher? Or are these related in some way? Maypole + Mason: A good idea has a discussion of someone facing a similar decision. Another maybe relevant discussion is at Survey of Surveys on HTML Templating systems, which I am also using as part of the decision making process.

Finally there is catalyst, which has a demo app hops adapted from the maypole "beer" demo. Unfortunately this demo seems to be misbehaving at the moment, but hopefully this will be fixed soon.

So, without degenerating into a holy war, can someone advise on what to do?

UPDATE: Added catalyst to the mix.

  • Comment on Mason + Maypole? TT + Maypole? Mason + Alzabo? Catalyst?

Replies are listed 'Best First'.
Re: Mason + Maypole? TT + Maypole? Mason + Alzabo?
by davorg (Chancellor) on Aug 11, 2005 at 09:40 UTC
    still a little hazy on exactly what mvc means

    The Wikipedia article is pretty good. Basically it's about splitting your application into three parts. The model is the data store, the view is the user interface and the controller is the part which handles all the logic.

    So, without degenerating into a holy war, can someone advise on what to do?

    Try them out. See which ones fit your way of working best. You might also like to add Catalyst to your list. And it may be heresy round these parts, but Ruby on Rails is getting a lot of good press these days.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

      Hi ppl,

      I'm always impressed when I first start to informe myself on the current "TechWords" and Design Patterns.

      They are usually at least as old as I am (1978). MVC isn't exception. :-(

Re: Mason + Maypole? TT + Maypole? Mason + Alzabo? Catalyst?
by perrin (Chancellor) on Aug 11, 2005 at 14:40 UTC
    If you like the way PHP works, try Mason or Apache::ASP. If you prefer to try out MVC, Catalyst is a good starting point, but make sure to read some docs for Class::DBI and Template Toolkit before you try to get Catalyst working. CGI::Application::Framework is also good for beginners.

    Don't go near things like Maypole + Mason for your first try at web stuff in Perl. You will tear your hair out.

Re: Mason + Maypole? TT + Maypole? Mason + Alzabo? Catalyst?
by johnnywang (Priest) on Aug 11, 2005 at 17:55 UTC
    My MVC is Class::DBI(M), TemplateToolit(V), CGI::Application(C). The advantage is that CGI::Application is relatively simple, it really only does one thing: dispatch (you can even use CGI::Application::Dispatch). I personally don't like frameworks that try to do too much for me, because I inevitably find them miss the 2% that makes my life difficult. The other two are general tools which are useful for many other things. I routinely use TT2 to generate all kinds of stuff: txt, csv, even java classes. And Class::DBI is just wonderful for most purposes. From what I gather, Catalyst looks like a good direction (well, it's perl's answer to RubyOnRails?). And dont' forget merly's CGI::Prototype.
Re: Mason + Maypole? TT + Maypole? Mason + Alzabo? Catalyst?
by cowboy (Friar) on Aug 11, 2005 at 16:14 UTC
    Something else to look at would be MasonX::WebApp
    It seems to be what alot of the newer projects mentioned on the mason lists are starting to use. I havn't used it personally yet, but it looks impressive.