> I have a sub named additional_data2 that is called before the view.
> Its useful when you want additional data based on objects and not just
> class,  Simon Flack was talking about adding something like this to
> Maypole. I'd like that :)
> 

I've been thinking about a more rational hook strategy in general.
Something like start_request_hook, before_model_hook, etc. A lot like
the plugin architecture in the latest Mason release. Then these hooks
can call things like additional_data() and authenticate() at the
appropriate points. I need to spec it out in much more detail though,
and I think it should be tied to a clear exception handling strategy
too. I'd also like earlier hooks to be able to specify that later
steps in the workflow should be skipped. You can do that implicitly,
for example by setting a template before the model runs, the model
will be skipped, but personally I'd prefer behaviour like that to be
explicit.

At the moment, if you understand the inner workings of Maypole well
enough, I *think* you can get it to do just about anything you need
(skip the model, jump to other points in the workflow etc), but it
would be more friendly to just set a flag and have Maypole figure out
the details.

One possibility would be a state machine. Another would be to define a
richer set of constants that can be used as return values. That might
be sufficient - that's how Apache manages its request phases. But it
might be easier to maintain backwards compatibility using a state
machine. BC will probably be more difficult if we change exception
handling though.

d.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to