At 03:04 AM 4/20/2004, Marek Malowidzki wrote (in part) >I believe that it happens quite often in varions object libraries that >although they are based on interfaces or even sometimes on classes, they in >fact only operate on objects created earlier by the library.
The genuis(es) who designed .NET (and Delphi before it) figured out that one very powerful way to make classes flexible is to have the classes surface event-handler properties that allow users (clients) of the class to customize the behavior without needing to derive a subclass (or implement interfaces in a new class). If most operations of a class (or collection of classes) include event-handler properties that allow extension and/or replacement of the default implementation of the operations, clients can almost always do what they need to do "from the outside." The simplification of having a Button class that has a Click event (the .NET, Delphi, VB model) vs the need to derive a MyButton class in order to implement the MyButtonWasClicked routine that's called when the button is clicked (the MFC model) is rather significant. J. Merrill / Analytical Software Corp =================================== This list is hosted by DevelopMentor� http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com
