<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Mon, 20 May 2013 07:47:15 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Tobias Schlitt's Blog: A sensible place for a fluent interface]]></title>
      <guid>http://www.phpdeveloper.org/news/4602</guid>
      <link>http://www.phpdeveloper.org/news/4602</link>
      <description><![CDATA[On his blog today, <i>Tobias Schlitt</i> has <a href="http://www.schlitt.info/applications/blog/index.php?/archives/400-A-sensible-place-for-a-fluent-interface.html">his look at fluent interfaces</a>, and it's place in the <a href="http://ez.no/products/ez_components">eZ components</a> libraries.
<p>
<quote>
<i>
The new buzz term "fluent interface" has been mentioned <a href="http://www.mikenaberezny.com/archives/35">a lot</a> in the PHP world recently, so I will not again explain, what a "fluent interface" is. <a href="http://andigutmans.blogspot.com/2005/12/fluent-interfaces.html">Andi already mentioned</a>, 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.
<p>
Also I did not know the term "fluent interface" before, we realized, that we already used this in the <a href="http://ez.no/products/ez_components">eZ components</a>, to be more exact, in our <a href="http://ez.no/doc/components/view/(file)/1.0beta2/classtrees_Database.html">Database</a> package, which gives you a quite good ammount of SQL abstraction.
</i>
</quote>
<p>
He <a href="http://www.schlitt.info/applications/blog/index.php?/archives/400-A-sensible-place-for-a-fluent-interface.html">gives a brief example</a> 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...]]></description>
      <pubDate>Tue, 03 Jan 2006 11:52:41 -0600</pubDate>
    </item>
  </channel>
</rss>
