Skip to main content

Posts

Showing posts with the label Observer

VBA versus .NET

Facade

This is derived from actual code of mine, and elements of this sample combine the Facade pattern with the Publisher (Observer) pattern.  The primary class, based on the ISubscriber interface, is fairly complicated to use, requiring delegates, threading, and asynchronous callbacks.  The facade, based on ISubscriberFacade, encapsulates all the methods required to work with the Windows Communication Foundation (WCF) service , handling threading, delegate creation, and asynchronous callbacks internally, so that that the clients only need to create the object.  I wrote the encapsulating client to ease the adoption of the WCF service for legacy clients, seeing that the code complexity was likely a hurdle. Salient Characteristic(s) Reduces or hides complexities to other clients or systems Simplified interaction between systems and/or types Note DispatchingObservableCollection is based on ObservableCollection commonly used in Windows Presentation Foun...