Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Exceptions vs Context Objects

by idsfa (Vicar)
on Mar 31, 2006 at 19:55 UTC ( #540544=note: print w/ replies, xml ) Need Help??


in reply to Exceptions vs Context Objects

I've seen a completely different approach to this problem in servlet filter chains (danger, java example). In this model, you create a container which holds the ordered list of steps. You can either do this with a linear model or a nested model.

In the linear model, an iterator over the container calls the first step, checks the results to see if it should continue, and passes the output to the next step until it is done. Pipeline is an implementation of this.

The java example above illustrates the nested model. Each step is passed the chain object, and is required to call the next step on the chain if and when it is ready to. In some implementations, it could also skip some or all of the remaining steps. In this model, each step is effectively nested inside the previous steps.


The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon


Comment on Re: Exceptions vs Context Objects

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (13)
As of 2014-10-02 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (63 votes), past polls