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

Seastian Bergmann's Blog:
Object-Relational Behavioral Patterns
Feb 16, 2009 @ 18:08:47

Seastian Bergmann has added some new features to the Object_Freezer library (you can read more about it here) - some new object-relational behavioral patterns.

The three patterns are from Martin Fowler's Patterns of Enterprise Application Architecture book:

  • Unit of Work - maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.
  • Identity Map - each object gets loaded only once by keeping every loaded object in a map
  • Lazy Load - object that doesn't contain all of the data you need but knows how to get it.
tagged: object freezer object relational patterns martinfowler pattern

Link:

Zend Developer Zone:
Fluent Interfaces in PHP
Dec 20, 2006 @ 14:55:00

The Zend Developer Zone has posted a new article from editor of the dZone, Cal Evans, looking at using fluent interfaces in PHP.

Fluent Interfaces are not a new programming construct. However, PHP developers have not been able to use them until PHP 5. Now with PHP 5 and the ability to directly dereference an object, PHP developers can build objects using fluent interfaces.

He starts off with a look at what they are and how (and why) they can be used in an application. He includes code example to help show how you would create an interface (makeNormal).

The code and other information are pulled from a few sources: Cal also mentions what he got into the fluent interfaces game for - creating a tag cloud with a fluent interface over the normal arguments/properties method.

tagged: fluent interface mikenaberenzy martinfowler pauljones fluent interface mikenaberenzy martinfowler pauljones

Link:

Zend Developer Zone:
Fluent Interfaces in PHP
Dec 20, 2006 @ 14:55:00

The Zend Developer Zone has posted a new article from editor of the dZone, Cal Evans, looking at using fluent interfaces in PHP.

Fluent Interfaces are not a new programming construct. However, PHP developers have not been able to use them until PHP 5. Now with PHP 5 and the ability to directly dereference an object, PHP developers can build objects using fluent interfaces.

He starts off with a look at what they are and how (and why) they can be used in an application. He includes code example to help show how you would create an interface (makeNormal).

The code and other information are pulled from a few sources: Cal also mentions what he got into the fluent interfaces game for - creating a tag cloud with a fluent interface over the normal arguments/properties method.

tagged: fluent interface mikenaberenzy martinfowler pauljones fluent interface mikenaberenzy martinfowler pauljones

Link:


Trending Topics: