ActiveObjects Sample

ActiveObjects Sample

Old forum URL: forums.lhotka.net/forums/t/1508.aspx


David posted on Monday, October 16, 2006

Has anyone got any sort of sample/documentation of using ActiveObjects with CSLA 2? Specifically I am interested in using Observer and Channel events.

xal replied on Tuesday, October 17, 2006

The observer didn't change at all from the 1.x era, so any existing docs will do. You can look at those in csla.kozul.info.

Andrés

ajj3085 replied on Tuesday, October 17, 2006

While we're on this subject, I have a question..

I know ActiveObjects adds a lot of goodies to the Csla mix, but the observer pattern it implements I'm not sure about..

I read the observer pattern in HF Design Patterns, and it seems like .Net's events and delegates provide this functionality.. just define an event and delegate and go.  So what does AO provide in this regard?

xal replied on Tuesday, October 17, 2006

Well, first of all, it's a well tested implementation that is widely used.
But anyway, briefly and of the top of my head:
It saves some of the pain by handling some stuff with attributes, so registering to objects is done declaratively, and you can register for just a few properties.
Channel events. You can register to a channel without actually registering to an object, and thus listen to events from objects that you don't know exist.
All events and registrations are buffered if you use remoting, and refired when the object returns from the dataportal.

Andrés

ajj3085 replied on Tuesday, October 17, 2006

Ok, so it just makes things nicer using the observer pattern.  Sounds cool.

Copyright (c) Marimer LLC