Building things can be tough when you can’t anticipate what type of objects you’ll need to create or how to create them. Take for example a factory which manufactures a large number of products. Each product can be made up of any number of components in their inventory. The workers know what’s in the inventory but don’t necessarily know beforehand what kind of products they will be making

Original post:
PHPMaster: Understanding the Factory Method Design Pattern

Ignatius Teo
Ignatius Teo is a freelance PHP programmer and has been developing n-tier web applications since 1998. In his spare time he enjoys dabbling with Ruby, martial arts, and playing Urban Terror.

No Reader comments

Stay ahead of the game Exclusive content for developers and digital experts Go Premium