I was working on a multi threaded application now and out-of-the-blue, it struck me as 'Delegates' being close counterparts to '.NET Remoting' from a service oriented perspective. Correct me if my vision is skewed here, but isn't a delegate offering another mechanism to inform its subscribers of a particular event ?! And by definition, wouldn't that mechanism be categorised as a service ? I would definitely think so.
Coming from a background with deep object oriented ideas, its been quite a ride on the Service oriented ways recently but i am starting to understand aspects of such a design. In this particular multithreaded application, i have an internal class MyThread which will be created and spawned by the mother process. Now once the thread has completed its operation, the CompleteHandler event will be called and correspondingly the Handler will in turn inform all the listeners of the event. Come to think about this, the delegate seems to behave more like a service, one that maintains state, with the boundary of the service being limited to in-memory and inherently working on the push model i.e., clients dont periodically check for event messages from a queue or something but instead the events are informed to clients real time. But after reading Don Box on Indigo and SOA the insights i've gained teach me that this might not be actually true. Don makes clear that Services have explicit boundaries which the Delegates do conform. For the other criteria, the Delegates doesn't fit in place and so the confusion in me ( eventhough i know i might have been wrong ) has mounted to mind blowing levels. Someone got any comments on how Delegates behaving like services could be true ?!
Although it is just a abstract way of looking at it, it kind of gave me vibes about how thinking in terms of abstraction to provide decoupled systems will help in implementing in a more service oriented way. For all i know i could be way off track here but just wanted to share what i felt. I am sure that it is a nice start for me because my outlook has been changing from being complete and pure object oriented, to object based, to service based now, later to service oriented and finally a ballad of both object and service oriented design methodologies. To me a good design needs proper decoupling and yet be strong in its object interaction and hierarchy structure to be stable and flexible. And that's where i'm trying to reach.