News Feed
Sections




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

Andi Gutmans' Blog:
Fluent Interfaces
December 30, 2005 @ 07:21:53

With so many talking about fluent interfaces today, Andi Gutmans has tossed his hat into the ring with this new blog post with some of his thoughts.

I'd like to add to Paul's and Mike's posts regarding fluent interfaces.

I very much agree with them that this kind of method chaining allows to create very readable and intuitive interfaces. The million dollar question is when to actually use this kind of programming style.

Of course there are no definitive answers but I suggest to consider the following points: Use your intuition, If you don't have all of the data - reconsider using them, It really has to read well in your language (e.g. English), preferably as a complete sentence, and make sure that the base error handling it forces you to use is enough for your purposes.

And, of course, he's open to suggestions/comments on the subject, as well as any proposals for guidelines that might need to be set out there...

0 comments voice your opinion now!
fluent interfaces thoughts intuition read well error handling fluent interfaces thoughts intuition read well error handling


blog comments powered by Disqus

Similar Posts

DevShed: Handling HTML Strings and Files with the DOM XML Extension in PHP 5

Pierre-Alain Joye's Blog: Howto use a single php.ini for cli/cgi with htscanner, use 0.7.0 or later

SpeckBoy.com: Getting Started with CRUD In PHP

Eran Galperin's Blog: Handling mail and mime in PHP using the Zend Framework

SitePoint PHP Blog: The real difference between PHP and Python


Community Events





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


opinion framework developer wordpress configure introduction install list community testing code interview language series refactor unittest podcast release laravel threedevsandamaybe

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