Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Abstract Factory in .NET
Message
 
To
02/10/2002 10:00:22
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
General information
Forum:
ASP.NET
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00706844
Message ID:
00711659
Views:
8
Joel,

>I just finished reading chapter 5 in your new book, which is excellent by the way. At the end of the chapter you talk about reflection and late binding. If you don't mind, I was wondering how you are implementing an Abstract Factory in .NET. Do you use a data-driven implementation, like you would in Fox, and take the performance hit for late binding? Or do you use a code-based implementation as described in the Design Patterns book? Just curious.

Sorry I didn't get back to you sooner, I missed this message when you originally posted it.

In answer to your question, in Mere Mortals .NET, I'm trying to use early binding wherever possible. For example, manager classes (Database Manager, Language Manager, etc.), are instantiated in factory methods of the application object as they are in MM VFP...there is a "CreateXXX" method for each manager object containing a single line of code that instantiates a concrete manager class. In subclasses of the application object, you can override this method and instantiate a different concrete class. This is similar to the factory described in the Design Patterns book, and I'm using this general pattern throughout MM .NET...whenever I instantiate an object, I do so in a factory method. That's not to say that I won't be offering a data-driven factory, but in the spirit of strongly typed .NET languages (and high performance), I opt for the early binding option.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform