Fwiw, that¹s how I have a MG:Unity application setup.  Controllers broken
into segments (adminController.cfc, userController.cfc), and events are in
their own segregated xml files. Include them all in your main config, and
you are good to go.

Chris Peterson



On 7/1/09 1:05 AM, "Doug Boude" <[email protected]> wrote:

> Hi there.
> 
> I am pretty sure I understand your scenario, and I've had similar: You want to
> segregate relevant event configurations into separate XML files for order's
> sake; admin events in Admin.xml, report events in Report.xml, etc. For myself,
> what I have done and accepted as good and elegant is to put all relevant
> controller references and event references into a single xml file. If and when
> (and it does happen often), a different XML's (xml A) event needs to make a
> broadcast to the other XML's controller (xml B), I simply put my broadcast
> where it needs to be for the event's sake, but I do NOT create yet another
> reference to the controller. In my mind and what makes sense to me is to
> maintain that separation, even when cross-broadcasting is necessary. So, in a
> nutshell, every controller is defined/referenced only ONE time, ever, and
> broadcasts are made as needed from wherever that need arises.
> 
> Now, all that having been said, i was thinking... It is not required that a
> model glue xml file contain all of the defined xml entities; for instance, i
> can have an xml file that contains, say, only controller definitions, with
> another xml file that contains only event definitions. As long as they're all
> included in a central xml config file, it's all good. So, perhaps you could
> create one xml file that contains all of your controllers with their message
> listeners, and then separate your events into appropriate xml files. Any
> reason why that wouldn't work?
> 
> Just my two cents on the issue.
>  
> Doug Boude (rhymes with 'loud') :0)
>  
> http://www.dougboude.com <http://www.dougboude.com/>
> 
> 
> On Tue, Jun 30, 2009 at 8:51 PM, Dan Wilson <[email protected]> wrote:
>> Maybe I'm a little rusty on my MG:U or I'm missing some context, but if you
>> broadcast a message called User.LoggedIn and you have 2 controllers
>> configured to listen to that message, both controller functions will run in
>> the order in which they were defined (included, whatever)
>> 
>> I'm not 100% sure I understand why you would need to duplicate code. You
>> haven't per se, used the identical name for each controller, have you?  Maybe
>> I need to see a code example.
>> 
>> 
>> DW
>> 
>> 
>> >> 
>> 


--~--~---------~--~----~------------~-------~--~----~
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

For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---

Reply via email to