Thanks for bringing that up Chris. Event types can often help mitigate some issues of repetition in the ModelGlue.xml file.
The project that I'm working on started with Model-Glue 2 so event types weren't even an option when I started it. My project is finally able to use Model-Glue 3 thanks to the latest 3.1.299 release. While I do intend to start using event types in my application, I have no plans at this point to use them for security results. My application has over a dozen different security roles and each has access to a different set of events. However, many of the events have a similar structure. If I keep the security messages out of the event types I'd be able to use fewer event types for more events, but if I put the security messages in the event types then I would have to create an event type for each role, even though there may be nothing else different between such event types. I could define the <result> without the source message in the event type, but splitting the message and result this way is likely to be confusing. It also opens up the risk of forgetting to add the result in a new event type and so creating a security hole. In my mind security is a special case where forwarding by the controller makes more sense than defining results in the event handler. For all other cases in Model-Glue where I needed to perform a redirect, I've always used results and have been happy with the ... umm, results ;) Cheers, -- Dennis On Wed, Mar 17, 2010 at 6:25 AM, Chris Blackwell <[email protected]> wrote: > On 16 March 2010 18:08, Matt Quackenbush <[email protected]> wrote: > >> One situation where I do use forward() is security controllers, because >> many of my event handlers must broadcast security messages and all security >> violations are redirected to the same event in the application. Using >> forward() saves me from having to scatter something like <result >> name="notAuthorized" do="security.accessDenied" redirect="true" /> all >> around my ModelGlue.xml. I do however support an optional message argument >> to let event handlers forward security violations to a different event. > > > This is where event-types come in > > http://docs.model-glue.com/wiki/HowTos/HowToUseTypedEvents#HowToUseTypedEvents > > -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en
