Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design Pattern - Factory and Abstract Factory
Message
From
02/10/2006 17:26:12
Mike Yearwood
Toronto, Ontario, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01082705
Message ID:
01158693
Views:
28
>Hi, Mike.
>
>>An abstract factory is a factory that returns one of a set of common concrete factories to produce one of a set of common concrete classes.
>
>Maybe you can take a look at my latest articles for UT Mag. I'm writing a column on Design Patterns in VFP. I already published the column about the Factory and the next one (I guess it is not released yet, but it should be coming out this week) is about the Abstract Factory. I'm not making data-driven factories for now, but if you rad the articles, I'd be glad to have some feedback from you.

OK. Your factory method article is easy enough to follow. You have different kinds of factories, one for the user and one for the form. That's good.

The thing is with all such articles, I want more!!!! Don't just demonstrate how the factory works, demonstrate how the factory is better than a simple CreateObject. For example, if you used a factory to instantiate all forms, you can make the entire app use a different form class by changing only one piece of code.

The data driven factory can do that too, but with no recompiling.

In this article http://msvfp.advisorguide.com/doc/14038, I took an Iterator and a Visitor and did something substantial with them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform