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

Re: web-dev and perl (mason, catalyst, embperl)

by Your Mother (Archbishop)
on Jun 06, 2009 at 16:21 UTC ( [id://769119]=note: print w/replies, xml ) Need Help??


in reply to web-dev and perl (mason, catalyst, embperl)

romkey's discussion is good.

which was largely a desire to use HTML embedded perl the way I see PHP used

Mason will do this for you. I don't recommend it (the PHP-like approach, not Mason). It's much easier for the developer up front and at first. It begins to cost you later and tends to make code that you and you alone can happily work with exactly once. If you come back to it a year later, it will be mysterious and frustrating because so much of it can be arbitrary and tied to your specific understanding at that time of how to solve a problem. Other devs or designers might not be able to work with it at all.

When I'm doing simple/one-off stuff I just use CGI.pm. Otherwise Catalyst is great. CGI::Application would be my next choice because it's clean and approximates the way I (used to) write CGIs.

Embperl is apparently stable but seems more or less abandoned. I worked with it... 8 years ago? Haven't seen it since, though some folks still seem to like it.

Catalyst is difficult to start (learning curve). It pays you back later when adding features, refactoring, or fixing bugs. All the things that don't seem important when starting but kill you and your time down the road.

  • Comment on Re: web-dev and perl (mason, catalyst, embperl)

Replies are listed 'Best First'.
Re^2: web-dev and perl (mason, catalyst, embperl)
by webfiend (Vicar) on Jun 09, 2009 at 15:31 UTC

    It's purely a personal style thing, but I tend to pull out CGI::Application even for my simple/one-off stuff. Why? Well, my one-off stuff almost always evolves into (2 .. $n)-off. Eventually my planning patterns just evolved into a make-way-for-change approach.

    Mostly I'm still haunted by the memory of a script that I'd planned as one-off but kept using for years. I still see that ugly code staring at me in the middle of the night.

    You might not have the myriad assortment of issues that I do, though.

      You are wise. I usually "inline" my Template/Alloy template in the __DATA__ (with blocks representing different wrappers/fragments) of a one-off so it ends up being both fast to write and easy to break out if I have to later. I like CGI::Application and I think it's one of the right ways to do it; for me personally it falls between too little (doesn't cover what Catalyst does) and too much (I can write dispatch table and such for a straightforward CGI in a few minutes).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-25 17:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found