Aaron Ross on Tue, 16 May 2000 12:39:49 -0400 (EDT)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [Chaos] OO Perl Exceptions (fwd)


hi Kyle!

 There are several differences, but none that make one an obvious choice over
 the others. We actually use both and have found it easy to move back and
 forth, particularly if your business logic is in modules and not in Embperl,
 Mason, or whatever.  

 Mason 
	- cacheing code 
		the code needed to cache and validate/invalidate anything is
		 already written, it isn't tied to headers yet, but it's 
		 easy to build on it to do so.
		the code to cache the output of components is a one-line
		 addition, very nice and easy.
	- component based 
		from the beginning HTML::Mason was written to separate display
		 and retrieval into separate components. This is also easy to
		 do in Embperl, but Mason has a nice set of functions that 
		 let you access the next, previous, (whole stack) of
		 components used to generate a page.
		autohandler/dhandler
		 very nice features for running creating "wrappers" around
		 all pages, for handing requests off to appropriate
		 components, and for filtering or post-processing output
	- facilitates building whole sites
		Mason makes it easy to see sets of pages as a cohesive group,
		 rather than a aggregate of pages ( obviously, this is pretty
		 subjective. )
	- headed for oo
		the newest version is supposed to support subclassing of the 
		parser, request and other objects. this is experimental, but
		i see it as a important direction

i think the error handling you described would fit into HTML::Mason pretty 
well. there is an eval around a routine called handle_request which, you
guessed it.. handles requests!!! if it returned an objects, you could have a
callback that would generate nice html errors for your site... 

 HTH, Aaron


> > > No comment on the exception handling, but I thought I'd chime in with
> > > a project that you might find interesting. You mentioned
> > > HTML::Embperl, but have you tried HTML::Mason?  I've been using it for
> > > quite a while now, and it works great....  http://www.masonhq.com
> 
> I understand the embedded HTML part, which I am guessing is just like
> HTML::Embperl, what are the added features/benefits over HTML::Embperl?
> 
> The software I've been working on combines templates with back end
> objects -- like in traditional application servers (NAS/OAS/etc.).  
> This allows logic about how to obtain or process the data to be 
> displayed (business logic) to be abstraced into objects, which are then 
> made avilable to (used by) the embedded perl code in the templates -- which 
> are only responsible for the display of the information (as HTML).
> 
> 
> k
> 
> 
> ------------------------------------------------------------------------------
> "...being able to break security doesn't make you a hacker any more than being
> able to hotwire cars makes you an automotive engineer." 
>     -- Eric Steven Raymond
> mortis@voicenet.com                            http://www.voicenet.com/~mortis
> ------------------------------------------------------------------------------
> 
> **Majordomo list services provided by PANIX <URL:http://www.panix.com>**
> **To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**