A Curious Mind
#tastic

The Factory Pattern

Monday, August 21, 2006 11:44 AM

On Tuesday I am giving a presentation on Software Patterns. One of the patterns I am presenting is the factory pattern. However I don't use that often. Actually, I just completed a changeset in my codebase where I removed a boatload of factories and reverted to constructors. So you could say that I am even averse to them at the moment.

So how in the heck am I going to give a presentation on this stuff if I don't have a lot of experience with it? Well i guess I will have to read up, and build some factories. Well the ASP.Net uses factories alot, I think maybe I will spelunk down there. See what I can dig up.

---

Yup ASP.Net was a good place to look for factory inspiration. The main area that I looked at was in how ASP.Net chooses to handle the different types of files. Once decided it looks at its options and then uses a factory method to get a specific handler. Bam! Handler executes the action. Very cool.

Dru


Feedback

# re: The Factory Pattern

Are you going to blog about the patterns too ? maybe provide some basic examples :D

I guess I have a hard time reading the GOFs UML ! 8/21/2006 12:26 PM | Russ C.

# re: The Factory Pattern

I sure can. Yeah, the GoF UML is tricky. Any pattern specifically? 8/21/2006 1:22 PM | Dru

# re: The Factory Pattern

Factory would be a cool place to start, maybe the Facade/Decorator and the Abstract factory too :)

They all sound like things more people should be using ...

I look forward to reading anything you produce anyway! 8/21/2006 2:48 PM | Russ C.

Post a comment





 

Please add 3 and 6 and type the answer here: