<?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: Rolling out an API for your cakePHP app Part ++1: The Solution</title>
	<atom:link href="http://deadlytechnology.com/php/cakephp-api-component/feed/" rel="self" type="application/rss+xml" />
	<link>http://deadlytechnology.com/php/cakephp-api-component/</link>
	<description></description>
	<lastBuildDate>Sun, 15 Apr 2012 21:04:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Matt</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-1150</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Thu, 26 May 2011 14:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-1150</guid>
		<description>Will keep you posted! This problem won&#039;t arise for many months though :p Thanks again for the code</description>
		<content:encoded><![CDATA[<p>Will keep you posted! This problem won&#8217;t arise for many months though :p Thanks again for the code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frank</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-1147</link>
		<dc:creator>frank</dc:creator>
		<pubDate>Wed, 25 May 2011 21:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-1147</guid>
		<description>Cheers Matt, short answer is: no. I don&#039;t have a good solution to reflect changes to the model in the API. What you suggest is pretty much it, you might be able to do some data checking in beforeFilter() or something like that and throw a 500 error there in a central location. Would be interested to read what you come up with</description>
		<content:encoded><![CDATA[<p>Cheers Matt, short answer is: no. I don&#8217;t have a good solution to reflect changes to the model in the API. What you suggest is pretty much it, you might be able to do some data checking in beforeFilter() or something like that and throw a 500 error there in a central location. Would be interested to read what you come up with</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-1146</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Wed, 25 May 2011 17:02:41 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-1146</guid>
		<description>Frank, some brilliant stuff here. Your design is a great start for building my api architecture. I do have a question, though.

Suppose your api interacts with a database. The database schema changes, and your new api reflects that. But your old api&#039;s will no longer work properly, since the model has changed. Do you have a good solution for easily deprecating api&#039;s when something like this occurs? Or must you manually go to each api_x_x class whose version is no longer compatible with the database and send back an error, like http 500 &quot;version is deprecated&quot;? This can get messy it seems.

My problem is a bit more complicated then this, but this is a good start. My api is actually interacting with a java program, and so there are many changes that can be made to the java backend, such as format of return data and performance of the backend itself. The more potential changes the harder it is to do versioning for api&#039;s it seems. Nevertheless, I think it should be possible :)

Thanks in advance! Great code again 

Matt</description>
		<content:encoded><![CDATA[<p>Frank, some brilliant stuff here. Your design is a great start for building my api architecture. I do have a question, though.</p>
<p>Suppose your api interacts with a database. The database schema changes, and your new api reflects that. But your old api&#8217;s will no longer work properly, since the model has changed. Do you have a good solution for easily deprecating api&#8217;s when something like this occurs? Or must you manually go to each api_x_x class whose version is no longer compatible with the database and send back an error, like http 500 &#8220;version is deprecated&#8221;? This can get messy it seems.</p>
<p>My problem is a bit more complicated then this, but this is a good start. My api is actually interacting with a java program, and so there are many changes that can be made to the java backend, such as format of return data and performance of the backend itself. The more potential changes the harder it is to do versioning for api&#8217;s it seems. Nevertheless, I think it should be possible :)</p>
<p>Thanks in advance! Great code again </p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bart</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-661</link>
		<dc:creator>bart</dc:creator>
		<pubDate>Tue, 22 Jun 2010 07:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-661</guid>
		<description>Hi Frank, I fixed it by adjusting the routing and slightly changing the api-code so the arguments are passed through in an array..

// process arguments
        if (isset($this-&gt;controller-&gt;params[&#039;pass&#039;])) {
            foreach ($this-&gt;controller-&gt;params[&#039;pass&#039;] as $key=&gt;$value) {
                $argument[$key] = $value;
            }
        }</description>
		<content:encoded><![CDATA[<p>Hi Frank, I fixed it by adjusting the routing and slightly changing the api-code so the arguments are passed through in an array..</p>
<p>// process arguments<br />
        if (isset($this-&gt;controller-&gt;params['pass'])) {<br />
            foreach ($this-&gt;controller-&gt;params['pass'] as $key=&gt;$value) {<br />
                $argument[$key] = $value;<br />
            }<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frank</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-660</link>
		<dc:creator>frank</dc:creator>
		<pubDate>Mon, 21 Jun 2010 20:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-660</guid>
		<description>You have to do something like: /0.2/posts/get.xml?id=1 this solution wasn&#039;t structured to allow passing args like you normally would in cakephp.</description>
		<content:encoded><![CDATA[<p>You have to do something like: /0.2/posts/get.xml?id=1 this solution wasn&#8217;t structured to allow passing args like you normally would in cakephp.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bart</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-657</link>
		<dc:creator>bart</dc:creator>
		<pubDate>Mon, 21 Jun 2010 11:34:32 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-657</guid>
		<description>I do however have one other question. How do you pass variables into the api? E.g. get /0.2/posts/get/1.xml with 1 being the $id of the post? They keep getting lost when I try to pass them into the api.</description>
		<content:encoded><![CDATA[<p>I do however have one other question. How do you pass variables into the api? E.g. get /0.2/posts/get/1.xml with 1 being the $id of the post? They keep getting lost when I try to pass them into the api.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bart</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-656</link>
		<dc:creator>Bart</dc:creator>
		<pubDate>Mon, 21 Jun 2010 11:20:22 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-656</guid>
		<description>Hi Frank. Never mind. I missed a double extension in my view.</description>
		<content:encoded><![CDATA[<p>Hi Frank. Never mind. I missed a double extension in my view.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bart</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-655</link>
		<dc:creator>Bart</dc:creator>
		<pubDate>Mon, 21 Jun 2010 11:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-655</guid>
		<description>Hi Frank,

thanks for the inspiration. Versioning was just the thing missing in my api. However, upon implementation of your solution, I keep getting the 1002-error: Unknown output file. As far as I can tell, all the files are in their right place.. Got any tips as to where I could find the solution?

cheers,

b</description>
		<content:encoded><![CDATA[<p>Hi Frank,</p>
<p>thanks for the inspiration. Versioning was just the thing missing in my api. However, upon implementation of your solution, I keep getting the 1002-error: Unknown output file. As far as I can tell, all the files are in their right place.. Got any tips as to where I could find the solution?</p>
<p>cheers,</p>
<p>b</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-641</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 11 Jun 2010 13:55:36 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-641</guid>
		<description>Frank,

Thansk again for the resonse.

Steve</description>
		<content:encoded><![CDATA[<p>Frank,</p>
<p>Thansk again for the resonse.</p>
<p>Steve</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frank</title>
		<link>http://deadlytechnology.com/php/cakephp-api-component/comment-page-1/#comment-640</link>
		<dc:creator>frank</dc:creator>
		<pubDate>Fri, 11 Jun 2010 07:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://deadlytechnology.com/?p=382#comment-640</guid>
		<description>Hey Steve,

At the moment our authentication is very basic, we just test an apikey passed in the GET string in the app_controller before filter. At some point I was thinking about using oAuth but thats about as far as I have got on it.

Cheers,
Frank.</description>
		<content:encoded><![CDATA[<p>Hey Steve,</p>
<p>At the moment our authentication is very basic, we just test an apikey passed in the GET string in the app_controller before filter. At some point I was thinking about using oAuth but thats about as far as I have got on it.</p>
<p>Cheers,<br />
Frank.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

