Factory Pattern

Patterns patterns patterns, all I seem to think about is patterns these days, well I have knocked up a quick factory pattern example which all the source etc is free to download, I will write a tutorial on how and why its done next week as I am in need of beer now.
Also worth a look is my mates blog James Hay as he has done a really nice observer pattern application to show it in use, free source download there too, we are going to write that one up into a tutorial too very soon.
have a good weekend.
Factory Example
source
___
Observer Example

Share the love

One thought on “Factory Pattern

  1. rich says:

    nice example…you are using the Factory Method pattern, jus to be a bit more precise. There is also the Abstract Factory pattern, which is a little differetn, and sometimes leads to confusion (abstract pattern provides an interface for a group of related items (a “family), while Factory Method generally privodes an interface for returning one instance of a particular object.