<?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"
	>

<channel>
	<title>Personal weblog of Robert Beekman</title>
	<atom:link href="http://blog.matsimitsu.nl/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.matsimitsu.nl</link>
	<description>Personal weblog of Robert Beekman</description>
	<pubDate>Thu, 13 Aug 2009 09:07:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Generating a barcode in a PDF for Rails with Prawnto and barcode-generator</title>
		<link>http://blog.matsimitsu.nl/ruby-on-rails/227/generating-a-barcode-in-a-pdf-for-rails-with-prawnto-and-barcode-generator</link>
		<comments>http://blog.matsimitsu.nl/ruby-on-rails/227/generating-a-barcode-in-a-pdf-for-rails-with-prawnto-and-barcode-generator#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:49:48 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[barcode]]></category>

		<category><![CDATA[barcode-generator]]></category>

		<category><![CDATA[gbarcode]]></category>

		<category><![CDATA[imagemagick]]></category>

		<category><![CDATA[postscript]]></category>

		<category><![CDATA[prawnto]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[view]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=227</guid>
		<description><![CDATA[For a project i needed to generate a barcode image in a PDF invoice. I was already using Prawnto to generate the PDF and needed a way to generate a barcode image to use with Prawnto.
After a few searches i found barcode-generator from anujluthra. 
Install the gbarcode gem and ImageMagic.
if your are on OSX and [...]]]></description>
			<content:encoded><![CDATA[<p>For a project i needed to generate a barcode image in a PDF invoice. I was already using Prawnto to generate the PDF and needed a way to generate a barcode image to use with Prawnto.</p>
<p>After a few searches i found <a href="http://github.com/anujluthra/barcode-generator/tree/master">barcode-generator</a> from <a href="http://blog.anujluthra.com/">anujluthra</a>. </p>
<p>Install the <a href="http://gbarcode.rubyforge.org/">gbarcode</a> gem and ImageMagic.</p>
<p>if your are on OSX and get the following error: &#8220;sh: gs: command not found&#8221; then you don&#8217;t have postscript installed. Install Postscript trough <a href="http://darwinports.com/">Port</a>. (port install postscript)</p>
<p>I found out that Prawnto really likes absolute file system paths instead of relative image tags that barcode-generator returns, so i forked the project on GitHub and added a new option to return the file system path instead of an image tag.</p>
<p>My fork can be found at: <a href="http://github.com/matsimitsu/barcode-generator/tree/master">http://github.com/matsimitsu/barcode-generator/tree/master</a> and can be installed as a plugin with:<br />
<code>script/install plugin git://github.com/matsimitsu/barcode-generator.git</code></p>
<p>To use this all in Prawnto use the following code:<br />
<code>pdf.image(barcode('FJJ4JD', :output_method =&gt; 'full_path'))</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/ruby-on-rails/227/generating-a-barcode-in-a-pdf-for-rails-with-prawnto-and-barcode-generator/feed</wfw:commentRss>
		</item>
		<item>
		<title>Deploying a CakePHP app with Capistrano</title>
		<link>http://blog.matsimitsu.nl/cakephp/222/deploying-a-cakephp-app-with-capistrano</link>
		<comments>http://blog.matsimitsu.nl/cakephp/222/deploying-a-cakephp-app-with-capistrano#comments</comments>
		<pubDate>Wed, 28 Jan 2009 20:09:22 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[English]]></category>

		<category><![CDATA[cap]]></category>

		<category><![CDATA[capistrano]]></category>

		<category><![CDATA[deploy]]></category>

		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=222</guid>
		<description><![CDATA[Deploying a CakePHP app with Capistrano
During my internship i was working on a large project and at the end of the process it became more and more difficult to keep the development version and the live version in sync while maintaining different configurations.
A couple of colleagues used Capistrano for their Rails projects and i tried [...]]]></description>
			<content:encoded><![CDATA[<p>Deploying a CakePHP app with Capistrano</p>
<p>During my internship i was working on a large project and at the end of the process it became more and more difficult to keep the development version and the live version in sync while maintaining different configurations.</p>
<p>A couple of colleagues used Capistrano for their Rails projects and i tried to modify Capistrano so that it would work with CakePHP.</p>
<h3>Password-less login</h3>
<p>First we need to be able to login without providing a password <a href="http://oebfare.com/blog/2008/jan/29/login-ssh-without-password/">this guide from Brian Rosner</a> describes the steps to do this.<br />
The reason for this password-less login is that you don&#8217;t have to provide a password when you deploy this way.</p>
<h3>Capistrano</h3>
<p>Next we need to get Capistrano. I work on a mac with OSX 10.5, witch has Capistrano built-in. If you have never updated this version of capistrano you might want to gem update your version.</p>
<h3>Folder structure</h3>
<p><img src="http://blog.matsimitsu.nl/wp-content/uploads/2009/01/capistrano.png" alt="capistrano folder structure" title="capistrano"  class="alignnone size-medium wp-image-223"  width="297" height="622"/><br />
The image above shows my folder structure. The <strong>current</strong> folder is actually a symlink to the latest deploy of my project. The <strong>logs</strong> is for my apache access and error logs and the <strong>releases</strong> folder contains the latest 10 releases deployed to the server.</p>
<p>The <strong>shared</strong> folder contains files and folders that i want to use instead the ones i deploy. In my case i keep the /app/config folder here.</p>
<h3>Capfile</h3>
<p>In the root of my project folder i created a capfile (no extension)</p>
<p>that contains the following code:</p>
<pre><code>load 'deploy' if respond_to?(:namespace) # cap2 differentiator
role :web, 'example.com'
ssh_options[:username] = 'notrootofcourse'
ssh_options[:forward_agent] = true

set :scm, :git
set :scm_verbose, true
set :repository, 'git@git.example.com:repository'
set :branch, 'master'
set :deploy_via, :remote_cache
set :use_sudo, false
set :application, 'application_name'
set :deploy_to, "/data/webservers/#{application}/"

namespace :deploy do
  task :start do
  end
  
  task :stop do
  end
  
  task :restart do
  end

  desc &lt;&lt;-DESC
    Symlinks shared configuration and directories into the latest release
    Also clear persistent and model cache
  DESC
  task :finalize_update do
    run "rm -rf #{latest_release}/app/config; ln -s #{shared_path}/app/config #{latest_release}/app/config"
    run "rm -rf #{latest_release}/app/tmp/models/*"
    run "rm -rf #{latest_release}/app/tmp/persistent/*"
  end
  
  
end

namespace :tail do
  task :default do
    run "tail -f #{deploy_to}/logs/*.log"
  end
end</code></pre>
<p>The first lines of the Capfile set some global configuration options, like your ssh username that can login without providing a password, the (in my case git) repository to pull the latest release from and the name and path of the application.</p>
<p>To make capistrano work with (Cake)PHP you need to overwrite all the default tasks that capistrano runs when deploying. Since i use apache and php, we don&#8217;t need to restart the webserver, so we just create a :restart task that does nothing, the same goes for :start and :stop</p>
<p>in the :finalize_update task i link the /config dir of my CakePHP app to the shared folder i described above. This way i always use the live configurations instead of my dev configs. Also, just to be sure, i remove the cached data.</p>
<p>All there is to do is a &#8220;cap deploy&#8221; in the root folder of your project and capistrano will deploy the latest version to your server.</p>
<p>This is of course just a simple example of a capistrano config and you can create your own folder structure and run your own commands.</p>
<p>Besides deploying i also created a :tail namespace, witch tails my log files. This way i can do a &#8220;cap tail&#8221; to see what&#8217;s going on with apache without logging in trough ssh. Other possible functions could be a &#8220;cap clearcache&#8221; to remove all the cache files.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/cakephp/222/deploying-a-cakephp-app-with-capistrano/feed</wfw:commentRss>
		</item>
		<item>
		<title>Permanent appended named parameters in routes with CakePHP</title>
		<link>http://blog.matsimitsu.nl/news/211/permanent-appended-named-parameters-in-routes-with-cakephp</link>
		<comments>http://blog.matsimitsu.nl/news/211/permanent-appended-named-parameters-in-routes-with-cakephp#comments</comments>
		<pubDate>Mon, 03 Nov 2008 15:45:59 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[custtom routing]]></category>

		<category><![CDATA[link]]></category>

		<category><![CDATA[named]]></category>

		<category><![CDATA[parameters]]></category>

		<category><![CDATA[redirect]]></category>

		<category><![CDATA[router]]></category>

		<category><![CDATA[routes]]></category>

		<category><![CDATA[routing]]></category>

		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=211</guid>
		<description><![CDATA[For a project i&#8217;m working on i needed a bit of custom routing.
Basically the project is a shop where you can edit multiple events and i stored the current event in a session.
But the request came if the client could edit multiple events at the same time.
Long story short, i needed the event_id somewhere in [...]]]></description>
			<content:encoded><![CDATA[<p>For a project i&#8217;m working on i needed a bit of custom routing.<br />
Basically the project is a shop where you can edit multiple events and i stored the current event in a session.<br />
But the request came if the client could edit multiple events at the same time.<br />
Long story short, i needed the event_id somewhere in the url and this is where the router comes in to play.</p>
<p>There are a couple of ways to get the event_id in the url with custom routing.</p>
<h3>Option one</h3>
<p>Use a named parameter </p>
<p>this method will append event_id:[UUID] to the url.<br />
for example: http://www.example.com/products/index/event_id:490ed5ab-ed6c-4034-8205-0264d5453078</p>
<p>in /app/config/routes.php</p>
<pre><code>Router::connectNamed(array('event_id'=&gt;$UUID), array('default' =&gt; true, 'greedy' =&gt; false));</code></pre>
<p>This will let the router know that we have a named part called event_id.<br />
It will also check if event_id is an UUID (other possibilities are $ID, $day, $month and $year, or a regular expression).</p>
<h3>Helper</h3>
<p>This was the easy part, because you need to tell all the helpers that create an url to use &#8216;event_id&#8217;=>&#8217;[UUID]&#8216;.<br />
In my case i already wrote an app and i didn&#8217;t feel like rewriting all links and forms, so i created a file called app_helper.php in the app folder like so:</p>
<p>/app/app_helper.php</p>
<pre><code>&lt;?php
class AppHelper extends Helper { 
        function url($url = null, $full = false) { 
                if (is_array($url)) { 
                        if (empty($url['event_id']) &amp;&amp; isset($this-&gt;params['named]['event_id'])) { 
                                $url['event_id'] = $this-&gt;params['named]['event_id']; 
                        }
                } 
                return parent::url($url, $full); 
        } 
} 
?&gt;</code></pre>
<p>What this does is append the event_id to all url arrays and then calls the parent url function (in /cake/lib/helper/helper.php).<br />
Because all helpers extend AppHelper, all url calls will go tough the above function.</p>
<h3>Redirect</h3>
<p>Now we only need to address one more issue, namely the $this->redirect(); function in the controllers, because we want the event_id appended to those url&#8217;s too.</p>
<p>/app/app_controller.php</p>
<pre><code>function redirect($url, $status = null, $exit = true) { 
 	if (is_array($url)) { 
        if (empty($url['event_id']) &amp;&amp; isset($this-&gt;params['named]['event_id'])) { 
        	$url['event_id'] = $this-&gt;params['named']['event_id']; 
        }
 	}
    return parent::redirect($url, $status, $exit); 
}</code></pre>
<p>All controllers extend app_controller so they will all use this new redirect function.</p>
<p>So once you add event_id:[UUID] to an url, it will always be appended.<br />
the event id can be retrieved in all controllers by calling $this->params['named']['event_id'] or $this->passedArgs['event_id']</p>
<h3>Option two</h3>
<p>The other way to do this is by changing a lot of routes in the routes.php file, but the url will be prettier (like: http://www.example.com/event_id/controller/action/params)</p>
<p>(/app/config/routes.php)</p>
<pre><code>/*
	 * The following section is to add the event_id to each backend url
	 * The event_id is added in the url method of app_helper.php and redirect method of app_model.php
	 */
	Router::connect('/:event_id/:controller', 
			array('controller'=&gt;':controller'), array('event_id'=&gt;$UUID));

	Router::connect('/:event_id/:controller/:action', 
			array('controller'=&gt;':controller', 'action'=&gt;':action'), array('event_id'=&gt;$UUID));

	Router::connect('/:event_id/:controller/:action/:id', 
			array('controller'=&gt;':controller', 'action'=&gt;':action', 'id'=&gt;':id'), array('pass'=&gt;array('id'),'event_id'=&gt;$UUID));

	Router::connect('/:event_id/:controller/:action/:id/*', 
			array('controller'=&gt;':controller', 'action'=&gt;':action', 'id'=&gt;':id'), array('pass'=&gt;array('id'), 'event_id'=&gt;$UUID));

	Router::connect('/:event_id/:controller/:action/*', 
			array('controller'=&gt;':controller', 'action'=&gt;':action'), array('event_id'=&gt;$UUID));</code></pre>
<p>I&#8217;m not shure if this is the most efficient way to cover all routes, but if you replace the code from the first block with this code, you get the nice url   (http://www.example.com/event_id/controller/action/params).</p>
<p>The last array makes shure only uuid&#8217;s are used by the router.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/news/211/permanent-appended-named-parameters-in-routes-with-cakephp/feed</wfw:commentRss>
		</item>
		<item>
		<title>Serializeable behavior for CakePHP</title>
		<link>http://blog.matsimitsu.nl/code/206/serializeable-behavior-for-cakephp</link>
		<comments>http://blog.matsimitsu.nl/code/206/serializeable-behavior-for-cakephp#comments</comments>
		<pubDate>Thu, 09 Oct 2008 09:55:15 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[Code]]></category>

		<category><![CDATA[English]]></category>

		<category><![CDATA[afterfind]]></category>

		<category><![CDATA[beforesave]]></category>

		<category><![CDATA[behavior]]></category>

		<category><![CDATA[cake]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[serialize]]></category>

		<category><![CDATA[serializeable]]></category>

		<category><![CDATA[unserialize]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=206</guid>
		<description><![CDATA[For a project i&#8217;m working on i needed to serialize a number of arrays before they could be saved and since i don&#8217;t like to serialize and un-serialize all those arrays in each controller action, i wrote a behavior to take care of this.
It serializes all array data before it is saved into the database [...]]]></description>
			<content:encoded><![CDATA[<p>For a project i&#8217;m working on i needed to serialize a number of arrays before they could be saved and since i don&#8217;t like to serialize and un-serialize all those arrays in each controller action, i wrote a behavior to take care of this.</p>
<p>It serializes all array data before it is saved into the database and when you do a find it will unserialize all data(including related model data).</p>
<p><a href='http://blog.matsimitsu.nl/wp-content/uploads/2008/10/serializeable.phps'>Download serializeable behavior</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/code/206/serializeable-behavior-for-cakephp/feed</wfw:commentRss>
		</item>
		<item>
		<title>Easy forms with CakePHP</title>
		<link>http://blog.matsimitsu.nl/code/201/easy-forms-with-cakephp</link>
		<comments>http://blog.matsimitsu.nl/code/201/easy-forms-with-cakephp#comments</comments>
		<pubDate>Mon, 08 Sep 2008 15:48:13 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[Code]]></category>

		<category><![CDATA[English]]></category>

		<category><![CDATA[easy forms]]></category>

		<category><![CDATA[forms]]></category>

		<category><![CDATA[inputs]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=201</guid>
		<description><![CDATA[Last night i was thinking about the fact that in some cases i can&#8217;t use bake to re-bake my views to contain a new field for example. CakePHP also wants you to not write the same code twice, but what about the views. Every time you add a field to your model, you either need [...]]]></description>
			<content:encoded><![CDATA[<p>Last night i was thinking about the fact that in some cases i can&#8217;t use bake to re-bake my views to contain a new field for example. CakePHP also wants you to not write the same code twice, but what about the views. Every time you add a field to your model, you either need to re-bake your views, or update both the edit and add template files. You could use $form->inputs(); but the helper creates form fields for database fields you probably want to keep hidden (_count fields for example). </p>
<p>I can think of two solutions for this problem, namely.</p>
<p>1. Go the partial way (like rails uses it). Basically you make an element with all the form fields you want to display and use the $this->renderElement in the view to display the form fields.</p>
<p>2. Define public fields in your controller and use those. An example below:</p>
<p>post has the following fields:<br />
id, title, content, created, comments_count.</p>
<p>we only want the user to be able to edit the title, content and maybe the created fields.</p>
<p>in our controller we create a new var: &#8220;publicFields&#8221;</p>
<pre name="code" class="php">

var $publicFields = array(&#039;title&#039;, &#039;content&#039;, &#039;created&#039;);
</pre>
<p>you can set this var in the beforeRender callback like this: (controller)</p>
<pre name="code" class="php">

function beforeRender(){
$this-&gt;set(&#039;publicFields&#039;, $this-&gt;publicFields);
</pre>
<p>and in your view you render the inputs using the inputs function of the form controller like:</p>
<pre name="code" class="php">

<code>$form-&gt;inputs($publicFields);</code>
</pre>
<p>this way you only have to add a new field in your database and in the $publicFields array and all your forms update automagically.</p>
<p>What do you use to reduce the amount of code you need to edit for a change in the database?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/code/201/easy-forms-with-cakephp/feed</wfw:commentRss>
		</item>
		<item>
		<title>Cakephp routing: prefixes and forms</title>
		<link>http://blog.matsimitsu.nl/code/195/cakephp-routing-prefixes-and-forms</link>
		<comments>http://blog.matsimitsu.nl/code/195/cakephp-routing-prefixes-and-forms#comments</comments>
		<pubDate>Wed, 20 Aug 2008 10:02:58 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[Code]]></category>

		<category><![CDATA[English]]></category>

		<category><![CDATA[admin routes]]></category>

		<category><![CDATA[form]]></category>

		<category><![CDATA[form create]]></category>

		<category><![CDATA[html link]]></category>

		<category><![CDATA[link generation]]></category>

		<category><![CDATA[prefix]]></category>

		<category><![CDATA[prefixes]]></category>

		<category><![CDATA[routing]]></category>

		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=195</guid>
		<description><![CDATA[Prefixes are a nice way to define routes for groups of actions, (see the cookbook).
All admin_ actions go with the /admin// url
For my project i needed both an admin route and a dashboard route, so i made prefixes for them like:
(/app/config/routes.php)
Router::connect('/dashboard/:controller/:action/*', array('prefix' =&#62; 'dashboard'));
Now in the view you can use the following:
echo $html-&#62;link('Profile', array('controller'=&#62;'users', 'action'=&#62;'dashboard_profile'), [...]]]></description>
			<content:encoded><![CDATA[<p>Prefixes are a nice way to define routes for groups of actions, (see the <a href="http://book.cakephp.org/view/544/prefix-routing" title="cookbook article: prefix routing">cookbook</a>).</p>
<p>All admin_ actions go with the /admin/<controller>/<action> url<br />
For my project i needed both an admin route and a dashboard route, so i made prefixes for them like:</p>
<p>(/app/config/routes.php)</p>
<pre><code>Router::connect('/dashboard/:controller/:action/*', array('prefix' =&gt; 'dashboard'));</code></pre>
<p>Now in the view you can use the following:</p>
<pre><code>echo $html-&gt;link('Profile', array('controller'=&gt;'users', 'action'=&gt;'dashboard_profile'), array('title'=&gt;'Edit profile'))</code></pre>
<p>But when it comes to forms things start to break.</p>
<p>For example the following:</p>
<pre><code>echo $form-&gt;create('User', array('action'=&gt;'dashboard_profile'));</code></pre>
<p>or this one:</p>
<pre><code>echo $form-&gt;create('User', array('url'=&gt;array('controller'=&gt;'users', 'action'=&gt;'dashboard_edit')));</code></pre>
<p>generate the following (wrong) link: <strong>/users/dashboard_profile/1</strong></p>
<p>While it does point to the right action (dashboard_profile) you get an error message explaining that this is a private action. The only way to use this private action is to use the prefix method.</p>
<p>The reason for this is that the form generate part in the cake code doesn&#8217;t do anything with the routing, thus ignoring the prefix we&#8217;ve set.</p>
<p>After some digging in the api i found a cake-way to generate the right url:</p>
<pre><code>echo $form-&gt;create('User', array('url'=&gt;$html-&gt;url(array('action'=&gt;'dashboard_profile'))));</code></pre>
<p>We use the html helper, that does parse the prefix part and generates a nice correct url, namely: <strong>/dashboard/user/profile</strong></p>
<p>The html helper does check for any prefixes in the routing and generates the right url.<br />
Combining the form->create and the html->url we get the right url.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/code/195/cakephp-routing-prefixes-and-forms/feed</wfw:commentRss>
		</item>
		<item>
		<title>A central hub for cakePHP</title>
		<link>http://blog.matsimitsu.nl/cakephp/192/a-central-hub-for-cakephp</link>
		<comments>http://blog.matsimitsu.nl/cakephp/192/a-central-hub-for-cakephp#comments</comments>
		<pubDate>Fri, 11 Jul 2008 07:52:52 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[English]]></category>

		<category><![CDATA[cake]]></category>

		<category><![CDATA[central hub]]></category>

		<category><![CDATA[overview]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=192</guid>
		<description><![CDATA[Last week i was in the #CakePHP channel on irc.freenode.net when i noticed a discussion about someone who had created a component, but didn&#8217;t want it posted on the bakery. He thought that his code wasn&#8217;t up to par with everything else on the bakery. So he thought about posting it on his blog.
I can [...]]]></description>
			<content:encoded><![CDATA[<p>Last week i was in the #CakePHP channel on irc.freenode.net when i noticed a discussion about someone who had created a component, but didn&#8217;t want it posted on the bakery. He thought that his code wasn&#8217;t up to par with everything else on the bakery. So he thought about posting it on his blog.</p>
<p>I can see why he didn&#8217;t want to post it on the bakery. You can get a lot of critics there, but those are only there to help improve the thing you posted and can help you to write better code.</p>
<p>It got me thinking how scattered the information about Cake really is. There is, of course, <a href="http://bakery.cakephp.org">the bakery</a>, but there are also the saved bookmarks on <a href="http://del.icio.us/tag/cakephp">del.icio.us</a>, <a href="http://www.google.com/coop/cse?cx=006850030468302103399%3Amqxv78bdfdo">the custom search engine</a>, <a href="http://pipes.yahoo.com/pipes/pipe.info?_id=UvxgjXa03BG245KdxQnzeQ">the superfeed</a> and a gazillion blog posts about cake. All containing really good components, helpers and tutorials.</p>
<p>But what i really want is a central hub for all of these great contributions to Cake. Right now i&#8217;m feeling that i only get to see a part of all that&#8217;s good about cake and still miss out on a lot of good stuff. Shure if i need something i google it first before i create it myself, but there must be a better way to stay up-to-date about all that is cake. </p>
<p>The bakery is a good start, but there are a lot of people who don&#8217;t want to post their stuff there, because they think it isn&#8217;t good enough and there is a list on the CakePHP home page, but it only lists a few blogs and there are so much more. </p>
<p>I think it would help the community as a whole and give more attention to all the great CakePHP stuff out there. </p>
<p>What do you think? Does CakePHP need a central place for all stuff cake, or do you think it&#8217;s fine the way it is. Or maybe you have a great idea to get people to post more of their content to the bakery?<br />
Let me know in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/cakephp/192/a-central-hub-for-cakephp/feed</wfw:commentRss>
		</item>
		<item>
		<title>This week in Cake (part 4)</title>
		<link>http://blog.matsimitsu.nl/cakephp/191/this-week-in-cake-part-4</link>
		<comments>http://blog.matsimitsu.nl/cakephp/191/this-week-in-cake-part-4#comments</comments>
		<pubDate>Fri, 11 Jul 2008 07:45:02 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[English]]></category>

		<category><![CDATA[this week in cake]]></category>

		<category><![CDATA[twic]]></category>

		<category><![CDATA[weekly]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=191</guid>
		<description><![CDATA[Well, this week was interesting, the guys at Debuggable and Cakebaker have a different opinion about private methods. Debuggable begins by writing a post about not using them and Cakebaker responds with a number of arguments and an example that you do need to use them.
I can see valid points in both their arguments.
Studio Canaria [...]]]></description>
			<content:encoded><![CDATA[<p>Well, this week was interesting, the guys at Debuggable and Cakebaker have a different opinion about private methods. Debuggable begins by writing a post <a href="http://www.debuggable.com/posts/programming-psychology-ii-private-methods:481ed862-b0d8-4a0e-9247-165c4834cda3">about not using them</a> and Cakebaker responds with a <a href="http://cakebaker.42dh.com/2008/07/08/not-everything-has-to-be-public/">number of arguments and an example</a> that you do need to use them.</p>
<p>I can see valid points in both their arguments.</p>
<p>Studio Canaria has made <a href="http://feeds.feedburner.com/~r/studiocanaria/~3/329968852/cakephp_thumbnail_helper">a thumbnail helper</a> to well&#8230; you know&#8230; make thumbnails ;)</p>
<p>Jonathan Snook thinks the default cake debug style isn&#8217;t that pretty and <a href="http://snook.ca/archives/cakephp/debug_styles/">has made his own</a>.</p>
<p>Also <a href="http://bakery.cakephp.org">the bakery</a> has become more and more active these days, check it out for a lot of new helpers and such.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/cakephp/191/this-week-in-cake-part-4/feed</wfw:commentRss>
		</item>
		<item>
		<title>This week in Cake (Part 3)</title>
		<link>http://blog.matsimitsu.nl/news/190/this-week-in-cake-part-3</link>
		<comments>http://blog.matsimitsu.nl/news/190/this-week-in-cake-part-3#comments</comments>
		<pubDate>Fri, 04 Jul 2008 10:40:11 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[summary]]></category>

		<category><![CDATA[this week in cakephp]]></category>

		<category><![CDATA[twic]]></category>

		<category><![CDATA[weekly]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=190</guid>
		<description><![CDATA[The nuts and bolts of CakePHP blog started a series about the always tricky HABTM (Has And Belongs To Many) relationships in Cake. If you don&#8217;t completely understand the workings of a HABTM releationship head over to Notes on CakePHP HABTM (Part 1, the basics)
On the cakeForge snippets section there are a lot of scripts [...]]]></description>
			<content:encoded><![CDATA[<p>The nuts and bolts of CakePHP blog started a series about the always tricky HABTM (Has And Belongs To Many) relationships in Cake. If you don&#8217;t completely understand the workings of a HABTM releationship head over to <a href="http://teknoid.wordpress.com/2008/07/03/notes-on-cakephp-habtm-part-1-the-basics/" title="Notes on CakePHP HABTM">Notes on CakePHP HABTM (Part 1, the basics)</a></p>
<p>On the cakeForge snippets section there are a lot of scripts for creating thumbnails of images. Blognol.com has written a post about just that thing. If you don&#8217;t like any of the CakeForge snippets, head over <a href="http://www.blognol.com/create-thumbnail-using-php" title="Create thumbnails using CakePHP">to create thumbnails using cakePHP.</a></p>
<p>Chris Hartjes asks the question why you wouldn&#8217;t want to use Namespaces in CakePHP. If you want to know what he thinks read it at <a href="http://www.littlehart.net/feeder/?FeederAction=clicked&#038;feed=Articles+%28RSS2%29&#038;seed=http%3A%2F%2Fwww.littlehart.net%2Fatthekeyboard%2F2008%2F06%2F30%2Fnamespaces-in-php-why-wouldnt-you-want-them%2F&#038;seed_title=Namespaces+in+PHP%3F++Why+%2Awouldn%26%238217%3Bt%2A+you+want+them%3F" title="Namespaces in PHP">Namespaces in PHP? Why *wouldn&#8217;t* you want them?</a></p>
<p>Peter Butler of Studio Canario has written a post about CakePHP Containable Behavior where he has a real world example of the behavior to better explain the workings of it. check it out at <a href="http://www.studiocanaria.com/articles/cakephp_containable_behavior" title="CakePHP Containable Behavior">CakePHP Containable Behavior</a></p>
<p>That&#8217;s it for this week, if you have any questions, use the comments form or talk to me in the always busy #cakePHP channel on <a href="irc://irc.freenode.net/cakephp">irc.freenode.net</a></p>
<p>I&#8217;ll post again next week (and maybe even throw in an actual post about using cake ;)). Until then, Happy Baking!</p>
<p>[edit] Fixed link to containable behavior, tanks to RainChen[/edit]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/news/190/this-week-in-cake-part-3/feed</wfw:commentRss>
		</item>
		<item>
		<title>This week in Cake #2</title>
		<link>http://blog.matsimitsu.nl/code/189/this-week-in-cake-2</link>
		<comments>http://blog.matsimitsu.nl/code/189/this-week-in-cake-2#comments</comments>
		<pubDate>Fri, 27 Jun 2008 17:02:44 +0000</pubDate>
		<dc:creator>robert</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[Code]]></category>

		<category><![CDATA[English]]></category>

		<category><![CDATA[blogposts]]></category>

		<category><![CDATA[overview]]></category>

		<category><![CDATA[this week in cake]]></category>

		<category><![CDATA[weekly]]></category>

		<guid isPermaLink="false">http://blog.matsimitsu.nl/?p=189</guid>
		<description><![CDATA[Tim Koschützki of Debuggable Ltd. explains how to bend the find() method to your own needs. In the comments there are also two links to other posts about this subject, namely to: Daniel Hofstetter (CakeBaker) - Defining custom find types and Nate Abele (on C7Y) with Best Practices in MVC Design with CakePHP
Peter Butler from [...]]]></description>
			<content:encoded><![CDATA[<p>Tim Koschützki of <a href="http://www.debuggable.com">Debuggable Ltd.</a> explains how to bend the find() method to your own needs. In the comments there are also two links to other posts about this subject, namely to: Daniel Hofstetter (<a href="http://cakebaker.42dh.com">CakeBaker</a>) - <a href="http://cakebaker.42dh.com/2008/03/23/defining-custom-find-types/">Defining custom find types</a> and Nate Abele (on <a href="http://c7y.phparch.com/">C7Y</a>) with <a href="http://c7y.phparch.com/c/entry/1/art,mvc_and_cake">Best Practices in MVC Design with CakePHP</a></p>
<p>Peter Butler from <a href="http://www.studiocanaria.com">Studio Canaria</a> created a <a href="http://www.studiocanaria.com/articles/cakephp_currency_conversion_component">CakePHP Currency Conversion Component</a> that updates right from the internet. This way it&#8217;s always up-to-date with the latest currency conversion rates. </p>
<p>Teknoid as a nice post about <a href="http://teknoid.wordpress.com/2008/06/24/cakephp-and-save-security/">form security</a> on his blog: <a href="http://teknoid.wordpress.com">nuts and bolts of cakephp</a></p>
<p>And last but definitely not least: Cake 1.2 RC2 has been released!! See the <a href="http://bakery.cakephp.org/articles/view/release-some-rc2-sweetness">post in the Bakery</a></p>
<p>That&#8217;s it for this week. Next week i&#8217;ll be in France relaxing at the coast, so no update then ;)</p>
<p>Happy Baking!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.matsimitsu.nl/code/189/this-week-in-cake-2/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
