News Feed
Sections




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

Tobias Schlitt's Blog:
A sensible place for a fluent interface
January 03, 2006 @ 11:52:41

On his blog today, Tobias Schlitt has his look at fluent interfaces, and it's place in the eZ components libraries.

The new buzz term "fluent interface" has been mentioned a lot in the PHP world recently, so I will not again explain, what a "fluent interface" is. Andi already mentioned, that this way of desining an API is quite good and can give you a really handy interface, but he also points out, that one should make very careful use of the technique.

Also I did not know the term "fluent interface" before, we realized, that we already used this in the eZ components, to be more exact, in our Database package, which gives you a quite good ammount of SQL abstraction.

He gives a brief example from their code, and explains how it works. The statement selects from a table "Person" where the age is greater than 15 and orders it by the "full_name" field, limit of 10 rows returned. With the "fluent interface" concept, that's pretty much how the statement "reads" as well...

0 comments voice your opinion now!
fluent interface sensible place ez components fluent interface sensible place ez components


blog comments powered by Disqus

Similar Posts

Aandro Groganz\'s Blog: Templates - Who Cares?

Mike Naberezny\'s Blog: Fluent Interfaces in PHP

PHP-Tip-a-Day: PHP Tutorial: The Allegory of The Factory Pattern

PHPBuilder.com: Transferring Huge XML Documents in PHP with an Ajax-driven Web Interface

GoodPHPTutorials.com: Integrating the Authorize.Net AIM API with PHP


Community Events





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


introduction symfony laravel voicesoftheelephpant interview library release api podcast community series framework package unittest bugfix opinion zendserver language deployment install

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