The StarTutorial.com site has posted the next in their " " series of tutorials today. In this latest post they cover the Factory design pattern.

[The design pattern provides] an interface for creating families of related or dependent objects without specifying their concrete classes.

They use the same fictional business as in the previous articles to put the pattern in a more "real " situation. The goal is to several "toy factories" that can build "toy" objects based on certain requirements: either cars or helicopters. The post starts with the creation of an factory class and shows the concrete implementations of one for each type of toy. These concrete classes include basic properties about the toy and functionality to build out the basics (ex: a has four wheels, a helicopter has rotors).



Source link
thanks you RSS link
( http://www.phpdeveloper.org/news/26066)

LEAVE A REPLY

Please enter your comment!
Please enter your name here