<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Implicit vs. explicit APIs</title>
	<atom:link href="http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Thu, 11 Mar 2010 10:26:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/comment-page-1/#comment-86552</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Sat, 03 May 2008 07:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=599#comment-86552</guid>
		<description>@all: Thanks for your comments!

@James: Yes, reading the source is a good way to learn what the code does. On the other hand it is a bad smell, if you have to read the code before you can use it... But as you said, this situation will hopefully become better with more documentation. 

@Abhimanyu: Yes, that&#039;s how the new find method looks like, at least in principle. In practice, the method signature is still the old one (for compatibility reasons):
&lt;pre&gt;
find($conditions = null, $fields = array(), $order = null, $recursive = null)
&lt;/pre&gt;

@AndyB: Yes, the $options array has to be well documented, or else you have to dig into the code to figure out how it must look like.

@Anonymous: Hm, as far as I know, PHP doesn&#039;t support keyword arguments, so you have to use an associative array to (partially) simulate keyword arguments.</description>
		<content:encoded><![CDATA[<p>@all: Thanks for your comments!</p>
<p>@James: Yes, reading the source is a good way to learn what the code does. On the other hand it is a bad smell, if you have to read the code before you can use it&#8230; But as you said, this situation will hopefully become better with more documentation. </p>
<p>@Abhimanyu: Yes, that&#8217;s how the new find method looks like, at least in principle. In practice, the method signature is still the old one (for compatibility reasons):</p>
<pre>
find($conditions = null, $fields = array(), $order = null, $recursive = null)
</pre>
<p>@AndyB: Yes, the $options array has to be well documented, or else you have to dig into the code to figure out how it must look like.</p>
<p>@Anonymous: Hm, as far as I know, PHP doesn&#8217;t support keyword arguments, so you have to use an associative array to (partially) simulate keyword arguments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abi</title>
		<link>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/comment-page-1/#comment-86499</link>
		<dc:creator>Abi</dc:creator>
		<pubDate>Sat, 03 May 2008 01:04:51 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=599#comment-86499</guid>
		<description>Thanks for the excellent overview of the two types of APIs. As a programmer, I seem to prefer an implicit API because it feels much more elegant. However, when I first started using cakephp, I found the implicit find() pretty irritating and troublesome to get started. So, as a user, I prefer an explicit API. Ironic...</description>
		<content:encoded><![CDATA[<p>Thanks for the excellent overview of the two types of APIs. As a programmer, I seem to prefer an implicit API because it feels much more elegant. However, when I first started using cakephp, I found the implicit find() pretty irritating and troublesome to get started. So, as a user, I prefer an explicit API. Ironic&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/comment-page-1/#comment-86292</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 02 May 2008 00:32:03 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=599#comment-86292</guid>
		<description>just skip this array abuse nonsense and get keyword arguments in python/django</description>
		<content:encoded><![CDATA[<p>just skip this array abuse nonsense and get keyword arguments in python/django</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AndyB</title>
		<link>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/comment-page-1/#comment-86225</link>
		<dc:creator>AndyB</dc:creator>
		<pubDate>Thu, 01 May 2008 16:36:30 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=599#comment-86225</guid>
		<description>IMHO Implicit API&#039;s are only practicable, if the $options-array is well documented or even better: an object like in Java. If you can&#039;t reuse your $options-array for several formerly explicit API&#039;s, there is neither less documentation to write nor less code. 
For the examples you brought up, it makes sense to use implicit API&#039;s, but again: $options has to be well documented!</description>
		<content:encoded><![CDATA[<p>IMHO Implicit API&#8217;s are only practicable, if the $options-array is well documented or even better: an object like in Java. If you can&#8217;t reuse your $options-array for several formerly explicit API&#8217;s, there is neither less documentation to write nor less code.<br />
For the examples you brought up, it makes sense to use implicit API&#8217;s, but again: $options has to be well documented!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhimanyu</title>
		<link>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/comment-page-1/#comment-86186</link>
		<dc:creator>Abhimanyu</dc:creator>
		<pubDate>Thu, 01 May 2008 13:40:17 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=599#comment-86186</guid>
		<description>Hey, is this the new syntax ?
Model::find($type, $options = array())  // new syntax</description>
		<content:encoded><![CDATA[<p>Hey, is this the new syntax ?<br />
Model::find($type, $options = array())  // new syntax</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leveille</title>
		<link>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/comment-page-1/#comment-86178</link>
		<dc:creator>leveille</dc:creator>
		<pubDate>Thu, 01 May 2008 13:13:19 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=599#comment-86178</guid>
		<description>Excellent breakdown of the differences between the two.  I find myself favoring an explicit API, however that is likely because I spend most a lot my time creating/exposing web services.  Though I suppose a RESTful resource request which allows the inclusion of actions would be considered implicit:

GET /articles;recent (implicit)
GET /articles;popular (implicit)
GET /articles;archived (implicit)
vs.
GET /articles (explicit)</description>
		<content:encoded><![CDATA[<p>Excellent breakdown of the differences between the two.  I find myself favoring an explicit API, however that is likely because I spend most a lot my time creating/exposing web services.  Though I suppose a RESTful resource request which allows the inclusion of actions would be considered implicit:</p>
<p>GET /articles;recent (implicit)<br />
GET /articles;popular (implicit)<br />
GET /articles;archived (implicit)<br />
vs.<br />
GET /articles (explicit)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/comment-page-1/#comment-86153</link>
		<dc:creator>James</dc:creator>
		<pubDate>Thu, 01 May 2008 11:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=599#comment-86153</guid>
		<description>Hi, I&#039;ve just started using 1.2 and I had to hunt down the find() method in the API and look at the code to see what other functionality it has.

It makes sense to use just the one method and once the documentation is more extensive it will make it easier for people to see how and why the method behaves the way it does.</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;ve just started using 1.2 and I had to hunt down the find() method in the API and look at the code to see what other functionality it has.</p>
<p>It makes sense to use just the one method and once the documentation is more extensive it will make it easier for people to see how and why the method behaves the way it does.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
