News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Introducing the Flyweight Pattern with PHP 5
February 26, 2007 @ 12:41:00

DevShed charges right ahead with its emphasis on design patterns in PHP with a new start of a new series today that looks at the Flyweight pattern.

Among the considerable variety of structural design patterns that can be implemented with PHP 4 (and PHP 5, by the way), there's one in particular that deserves special attention. It's easy to apply in the context of a given web application, and it offers remarkable functionality when it comes to preventing the unnecessary instantiation of different classes. This two-part series covers that pattern.

As they explain, the Flyweight pattern helps to keep your code light and simple by preventing the instantiation of unneeded objects and resources. They go with a HTML form example, illustrating how to prevent a submit button or an input button's class to be reinitialized every time a new form field is needed.

0 comments voice your opinion now!
flyweight pattern php5 designpattern tutorial form element flyweight pattern php5 designpattern tutorial form element


blog comments powered by Disqus

Similar Posts

DZone.com: Creating a virtual server with Vagrant: a practical walkthrough

Christopher Jones' Blog: Upgrade PHP with Oracle Application Server on Linux

Shaun Oleson's Blog: Authorize.NET and PHP

Arnold Daniels' Blog: Wrong PHP prediction: you donít need to patch PHP to run multiple versions

Davey Shafik's Blog: php|architect's Zend PHP 5 Certification Study Guide, 2nd Edition


Community Events





Don't see your event here?
Let us know!


opinion package library interview composer voicesoftheelephpant community framework laravel update introduction series release podcast install symfony version language tool security

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework