Summary

In this chapter, you learned how the GenericObject and GenericObjectCollection classes can truly revolutionize the way you develop classes to represent entities in your application's database tables.

It's worth pointing out that almost all subclasses of GenericObject will have other methods, too, which cannot be effectively automated, so the requirement for good SQL practice still remains. Still, GenericObject provides an excellent means of cutting down on the mundane (and rather dull) programming of UPDATE, INSERT, and DELETE statements that otherwise would form an enormous percentage of your application.

GenericObjectCollection demonstrates both that OOP is not flawless and that true compliance can yield to inefficiency at your application's bottom line, but also that there is almost always a workaround to such side effects. By using GenericObjectCollection judiciously, you can build an application that is both OOP-compliant to a tee and also highly efficient when it comes to talking to your database.

In the next chapter, we stay on the database theme, with a look at database abstraction layers an important technique that you can use to keep your application as database-portable as possible.



Professional PHP5 (Programmer to Programmer Series)
Professional PHP5 (Programmer to Programmer Series)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 182

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net