In this chapter you've seen how the factory interface design pattern can be implemented, and the various situations in which it works best.

You have seen the power of this design pattern by examining a model for database abstraction which makes use of the factory method. This shows how database-dependent code can live in easy-to-find places in your application, instead of being needlessly scattered about the code base in hard-to-maintain structures.

In the next chapter, you'll look at the theory of event-driven programming, and see how easy it can be to implement event handling using the vastly improved OOP support in PHP5.

Professional PHP5 (Programmer to Programmer Series)
Professional PHP5 (Programmer to Programmer Series)
Year: 2003
Pages: 182 © 2008-2017.
If you may any questions please contact us: