<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cakebaker &#187; design</title>
	<atom:link href="http://cakebaker.42dh.com/tags/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Mon, 19 Jul 2010 14:23:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Implicit vs. explicit APIs</title>
		<link>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/</link>
		<comments>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/#comments</comments>
		<pubDate>Thu, 01 May 2008 09:00:15 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[software engineering]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=599</guid>
		<description><![CDATA[When developing an API, one point you have to consider is whether you want to provide an implicit or an explicit API. An explicit API is usually quite self-explanatory, the method name tells you what the method does (at least, if it has a good name). Some examples from the core of CakePHP: Model::findAll($conditions = [...]]]></description>
			<content:encoded><![CDATA[<p>When developing an API, one point you have to consider is whether you want to provide an implicit or an explicit API. </p>
<p>An explicit API is usually quite self-explanatory, the method name tells you what the method does (at least, if it has a good name). Some examples from the core of CakePHP: </p>
<pre>
Model::findAll($conditions = null, $fields = null, $order = null, $limit = null, $page = 1, $recursive = null)  // deprecated
Model::findCount($conditions = null, $recursive = 0)  // deprecated
FormHelper::checkbox($fieldName, $options = array())
FormHelper::submit($caption = null, $options = array())
</pre>
<p>On the other hand, an implicit API doesn&#8217;t tell you what the method does (respectively it does it on a more abstract level):</p>
<pre>
Model::find($type, $options = array())  // new syntax
FormHelper::input($fieldName, $options = array())
</pre>
<p>In the first example, the $type parameter determines what the method does, and in the second example it depends either on the data type of the respective database field or on the value of the &#8220;type&#8221; option. </p>
<p>For you as a developer, implementing an implicit API means a) you have to write more code and b) you have to write more documentation (because you also have to explain what the method does)&#8230; On the other hand, an implicit API allows you to provide a unified API (e.g. Model::find(&#8216;all&#8217;), Model::find(&#8216;count&#8217;), and Model::find(&#8216;list&#8217;) vs. Model::findAll(), Model::findCount(), and Model::generateList()).</p>
<p>For a user, an implicit API is probably more difficult to use than an explicit API, at least in the beginning. For example, if you want to get the number of some records, you first look for a method with &#8220;count&#8221; in its name. With an explicit API you will find the Model::findCount() method, but with an implicit API you probably won&#8217;t discover that Model::find() supports a &#8220;count&#8221; type&#8230; </p>
<p>Anyway, in the end it is up to you to decide which approach better fits to your specific situation. Both approaches have their advantages and disadvantages.</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2008/05/01/implicit-vs-explicit-apis/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Expandable links</title>
		<link>http://cakebaker.42dh.com/2007/03/10/expandable-links/</link>
		<comments>http://cakebaker.42dh.com/2007/03/10/expandable-links/#comments</comments>
		<pubDate>Sat, 10 Mar 2007 15:30:29 +0000</pubDate>
		<dc:creator>cakebaker</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/03/10/expandable-links/</guid>
		<description><![CDATA[Even though I am not a design/usability specialist I will discuss the design process for a rather minor detail in an application. I have one of those lists you will find in almost every application which lists the items the user entered. Now it should be possible to move these items to two different categories. [...]]]></description>
			<content:encoded><![CDATA[<p>Even though I am not a design/usability specialist I will discuss the design process for a rather minor detail in an application. </p>
<p>I have one of those lists you will find in almost every application which lists the items the user entered. Now it should be possible to move these items to two different categories. How could this be solved?</p>
<p>The easiest solution would be to add two links to the end of each row. But how do you name those links? &#8220;Move to Category A&#8221; and &#8220;Move to Category B&#8221;? Hm, that takes too much space and it looks ugly if you have to repeat it on all rows.</p>
<p>The next idea is to use icons instead of text. But this causes a similar problem as above. How should the icons look so people understand them?</p>
<p>Another idea is to put a checkbox in front of each row and to have a select box with the possible actions at the top and/or the bottom of the list. The problem here is that the user has to click at least three times to move an item. </p>
<p>What about a drag and drop solution? Well, drag and drop is not very intuitive, and it is difficult to visualize that an object is draggable.</p>
<p>Maybe we could add a select box to the end of each row? Well, it is still two clicks for the user. Can we reduce it somehow to a one-click action?</p>
<p>We could add a link to the end of each row and then on a mouse over event we show the possible actions. So with only one click the user can move a list item to the desired category. With that I have found the solution for the problem described at the beginning of this post. Here the visualization of this idea which I called &#8220;expandable link&#8221;:</p>
<p><img src='http://cakebaker.42dh.com/wp-content/uploads/2007/03/move_1.png' alt='Closed link' /><br />
<img src='http://cakebaker.42dh.com/wp-content/uploads/2007/03/move_2.png' alt='Expanded link' /></p>
<p>The first image shows simply a link, and the second shows what happens on a mouse over event on this link. </p>
<p>Up to now I didn&#8217;t test this solution in the wild so I cannot say how it will be accepted by the users, but if they are like me, they will find it cool ;-)</p>
]]></content:encoded>
			<wfw:commentRss>http://cakebaker.42dh.com/2007/03/10/expandable-links/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
