Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Experiences With Mason

by monarch (Priest)
on Feb 02, 2009 at 22:35 UTC ( [id://740838]=note: print w/replies, xml ) Need Help??


in reply to Experiences With Mason

I've used Mason in a corporate environment where it was the main web framework for internal staff tools.

It's been great for quickly putting together something simple and functional. It's reasonably fast if used with mod_perl or the like. And supports persistent database connections etc (essentially in any page you specify something to run once per initialisation, and then the rest of the page/code to run on every render). The autohandler support (a page or code that runs every time any page in a directory is loaded) is useful for setting up things such as sessions, or header/footers.

The downsides are that it's difficult (and I've never gone to the effort of discovering exactly how) to run a debugger on a broken page. I've always reconciled myself to merely use the Perl warnings and manually inserted tracing (print statements) to keep track of what is actually going wrong.

A lot of people don't like Mason because there is very little separation of code/presentation. However the truth is that Template Toolkit muddies these waters too.

On a side note I have been able to get Mason working on a large virtual web hosting provider in the USA - where they only provide CGI support. Because they use large powerful servers and throw a stack of accounts on them the "slow" CGI response is not actually that slow.

Replies are listed 'Best First'.
Re^2: Experiences With Mason
by zerohero (Monk) on Feb 02, 2009 at 23:53 UTC

    Thanks, you actually had real experience with Mason, which was helpful

    >> The downsides are that it's difficult (and I've never gone to the effort of discovering exactly how) to run a debugger on a broken page.

    I've noticed one issue which occurs when there is a failure in a dependent module from "use" (not the first level include in, say the .html component, but a secondary module). It gives a very generic "failed to load" name-of-primary-module. You could find this by having a dummy program which loads the same modules, and invoke it from the command-line to find these problems (but it is odd Mason doesn't find them).

    I've also noticed a little weirdness with the caching when there is a failure in a unit to compile. Things get unhappy, and well, you just have to restart Apache. The only way to know this is you get this odd feeling that not all is right with the world.

      If you follow the Very Good Advice of keeping most of your non-display code in external libraries and you run under mod_perl, make sure you fully stop&start apache whenever you make a change, to ensure you see the results.

      Consider developing in CGI mode (no mod_perl,) with a single apache process, with code_cache_max_size => 0 (disabled, no caching) to avoid some such weirdness and speed development.

Log In?
Username:
Password:

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

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

    No recent polls found