<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="http://feeds.feedburner.com/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Developing With Style</title>
	
	<link>http://developingwithstyle.com</link>
	<description>A Weblog written, styled and hacked by Joel Moss</description>
	<pubDate>Fri, 21 Nov 2008 01:48:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/DevelopingWithStyle" type="application/rss+xml" /><item>
		<title>NamedScope for CakePHP</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/459620760/</link>
		<comments>http://developingwithstyle.com/2008/11/20/namedscope-or-cakephp/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 14:37:09 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=287</guid>
		<description><![CDATA[I discovered the joys of NamedScope for Ruby on Rails quite a while ago now, and have always been an admirer. Its makes performing finds on models very elegant and convenient, by automagically creating model methods based on your pased scope params. Just like this:

Named Scope in Rails


class User &#60; ActiveRecord::Base


&#160; named_scope :active, :conditions =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered the joys of NamedScope for Ruby on Rails quite a while ago now, and have always been an admirer. Its makes performing finds on models very elegant and convenient, by automagically creating model methods based on your pased scope params. Just like this:</p>
<div class="geshi no ruby">
<div class="head">Named Scope in Rails</div>
<ol>
<li class="li1">
<div class="de1"><span class="kw1">class</span> User <span class="sy0">&lt;</span> <span class="re2">ActiveRecord::Base</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; named_scope <span class="re3">:active</span>, <span class="re3">:conditions</span> <span class="sy0">=&gt;</span> <span class="br0">&#123;</span>:active <span class="sy0">=&gt;</span> <span class="kw2">true</span><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; named_scope <span class="re3">:inactive</span>, <span class="re3">:conditions</span> <span class="sy0">=&gt;</span> <span class="br0">&#123;</span>:active <span class="sy0">=&gt;</span> <span class="kw2">false</span><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">end</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1"># Standard usage</span></div>
</li>
<li class="li1">
<div class="de1">User.<span class="me1">active</span> &nbsp; &nbsp;<span class="co1"># same as User.find(:all, :conditions =&gt; {:active =&gt; true})</span></div>
</li>
<li class="li1">
<div class="de1">User.<span class="me1">inactive</span> <span class="co1"># same as User.find(:all, :conditions =&gt; {:active =&gt; false})</span></div>
</li>
</ol>
</div>
<p>Then a few months ago I read <a href="http://codetunes.com/2008/09/05/named-scope-in-cakephp/">this blog post</a> and discovered that someone had created similar functionality for CakePHP, in the form of a model behavior. Although it&#8217;s not quite as powerful as it&#8217;s Rails cousin, it does let you define named scopes for any model quite easily. However, I wasn&#8217;t crazy about a few things.</p>
<p>Named Scopes are defined like this:</p>
<div class="geshi no php">
<div class="head">Don&#39;t like this:</div>
<ol>
<li class="li1">
<div class="de1"><span class="kw2">class</span> User <span class="kw2">extends</span> AppModel <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">var</span> <span class="re1">$actsAs</span> <span class="sy0">=</span> <span class="kw3">array</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="st0">&#39;NamedScope&#39;</span> <span class="sy0">=&gt;</span> <span class="kw3">array</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="st0">&#39;activated&#39;</span> <span class="sy0">=&gt;</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="st0">&#39;User.activated in not null&#39;</span><span class="br0">&#41;</span><span class="sy0">,</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="st0">&#39;online&#39;</span> <span class="sy0">=&gt;</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="st0">&#39;date_add(User.last_activity, interval 5 minute) &gt; now()&#39;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>The above format means we can only pass find conditions to a named scope, and cannot pass any other params, such as ORDER and FIELDS.</p>
<p>Then a named scope is then called like this:</p>
<div class="geshi no php">
<div class="head">this is not nice either</div>
<ol>
<li class="li1">
<div class="de1"><span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">User</span><span class="sy0">-&gt;</span><span class="me1">find</span><span class="br0">&#40;</span><span class="st0">&#39;all&#39;</span><span class="sy0">,</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="st0">&#39;scope&#39;</span> <span class="sy0">=&gt;</span> <span class="st0">&#39;activated&#39;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">User</span><span class="sy0">-&gt;</span><span class="me1">find</span><span class="br0">&#40;</span><span class="st0">&#39;all&#39;</span><span class="sy0">,</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw3">array</span><span class="br0">&#40;</span><span class="st0">&#39;conditions&#39;</span> <span class="sy0">=&gt;</span> <span class="st0">&#39;points &gt; 10&#39;</span><span class="sy0">,</span> <span class="st0">&#39;scope&#39;</span> <span class="sy0">=&gt;</span> <span class="kw3">array</span><span class="br0">&#40;</span><span class="st0">&#39;activated&#39;</span><span class="sy0">,</span> <span class="st0">&#39;online&#39;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
</ol>
</div>
<p>I have to pass enough params to a find call as it is, so I don&#8217;t want anymore.</p>
<p>What I want to do is this:</p>
<div class="geshi no php">
<div class="head">This is better</div>
<ol>
<li class="li1">
<div class="de1"><span class="kw2">class</span> User <span class="kw2">extends</span> AppModel <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw2">var</span> <span class="re1">$actsAs</span> <span class="sy0">=</span> <span class="kw3">array</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="st0">&#39;NamedScope&#39;</span> <span class="sy0">=&gt;</span> <span class="kw3">array</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="st0">&#39;active&#39;</span> <span class="sy0">=&gt;</span> <span class="kw3">array</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#39;conditions&#39;</span> <span class="sy0">=&gt;</span> <span class="kw3">array</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#39;User.is_active&#39;</span> <span class="sy0">=&gt;</span> <span class="kw2">true</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span><span class="sy0">,</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#39;order&#39;</span> <span class="sy0">=&gt;</span> <span class="st0">&#39;User.name ASC&#39;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
<p>and this</p>
<div class="geshi no php">
<div class="head">Easy peasy!</div>
<ol>
<li class="li1">
<div class="de1"><span class="re1">$active_users</span> <span class="sy0">=</span> <span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">User</span><span class="sy0">-&gt;</span><span class="me1">active</span><span class="br0">&#40;</span><span class="st0">&#39;all&#39;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
<p>I can even do this:</p>
<div class="geshi no php">
<div class="head">This is just lovely</div>
<ol>
<li class="li1">
<div class="de1"><span class="re1">$active_users</span> <span class="sy0">=</span> <span class="re1">$this</span><span class="sy0">-&gt;</span><span class="me1">User</span><span class="sy0">-&gt;</span><span class="me1">active</span><span class="br0">&#40;</span><span class="st0">&#39;all&#39;</span><span class="sy0">,</span> <span class="kw3">array</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="st0">&#39;conditions&#39;</span> <span class="sy0">=&gt;</span> <span class="kw3">array</span><span class="br0">&#40;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&#39;User.created&#39;</span> <span class="sy0">=&gt;</span> <span class="st0">&#39;2008-01-01&#39;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#41;</span><span class="sy0">,</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="st0">&#39;order&#39;</span> <span class="sy0">=&gt;</span> <span class="st0">&#39;User.name ASC&#39;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
</ol>
</div>
<p>Much improved I think, and so much more powerful. <a href="http://github.com/joelmoss/cakephp-namedscope">So I&#8217;ve only gone and coded the damn thing</a>! You can find my version of Named Scope for Cake on Github at <a href="http://github.com/joelmoss/cakephp-namedscope">http://github.com/joelmoss/cakephp-namedscope</a>.</p>
<p>And you know what? Thanks to the power of CakePHP, the actual code is seven lines shorter than the aforementioned version.</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/459620760" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/11/20/namedscope-or-cakephp/feed/</wfw:commentRss>
		<feedburner:origLink>http://developingwithstyle.com/2008/11/20/namedscope-or-cakephp/</feedburner:origLink></item>
		<item>
		<title>The power of plugins</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/451752136/</link>
		<comments>http://developingwithstyle.com/2008/11/13/the-power-of-plugins/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 12:27:23 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[DB Migrations]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=284</guid>
		<description><![CDATA[Since I discovered the DebugKit plugin for CakePHP that is currently in early development by Mark Story and others (including me. well, one commit still means I helped ;)), I have been left rocked about the power of plugins. I always thought that plugins were simply a way to create a Cake app that can [...]]]></description>
			<content:encoded><![CDATA[<p>Since I discovered the <a href="http://github.com/cakephp/debug_kit">DebugKit plugin</a> for CakePHP that is currently in early development by Mark Story and others (including me. well, one commit still means I helped ;)), I have been left rocked about the power of plugins. I always thought that plugins were simply a way to create a Cake app that can be plugged in to an existing application. But It seems I underestimated their power.</p>
<p>So I began to think about how I could refactor Migrations into a plugin, rather than a bunch of files that you drop into your vendors directory. And that took me all of 20 seconds! I didn&#8217;t have to change a thing. Thanks to <a href="https://trac.cakephp.org/changeset/7871">this latest commit</a>, you can now use a shell script from any plugin.</p>
<p>So I just drop the migrations directory directly into my plugins directory, and wham bam thank you maam! I created my first Cake plugin.</p>
<p>Of course, I can still drop the migrations shells into my global vendors/shells directory, but I just like the way I can plug it in.</p>
<p>So a plugin is now the recommended way to use Migrations.</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/451752136" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/11/13/the-power-of-plugins/feed/</wfw:commentRss>
		<feedburner:origLink>http://developingwithstyle.com/2008/11/13/the-power-of-plugins/</feedburner:origLink></item>
		<item>
		<title>Keeping your core.php DRY</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/443239836/</link>
		<comments>http://developingwithstyle.com/2008/11/05/keeping-your-corephp-dry/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 13:38:05 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=279</guid>
		<description><![CDATA[Something that I have been taking advantage of in my Cake 1.2 apps for quite a while now, is the ability to separate your custom config options from your app&#8217;s core.php file. And I am pretty sure that it is one of those lesser know features in 1.2.
The core.php file within your app&#8217;s config directory [...]]]></description>
			<content:encoded><![CDATA[<p>Something that I have been taking advantage of in my Cake 1.2 apps for quite a while now, is the ability to separate your custom config options from your app&#8217;s core.php file. And I am pretty sure that it is one of those lesser know features in 1.2.</p>
<p>The core.php file within your app&#8217;s config directory is used to store application wide configuration variables. Things like your debug level, cache settings and sessions store are set here using Cake&#8217;s very useful Configure class. This file can start to get quite large and unruly as the development of your app progresses. So one of the first things I do when I start a new app, is to separate my custom application config variable into another file within the config directory. This then keeps the core Cake configure settings separate from your custom ones, and keeps things a little dry.</p>
<p>Just create a new file in your app/config directory. You can name this anything you want, but I usually go with something like &#8216;config.php&#8217; or &#8216;app.php&#8217;. As long as it ends with &#8216;.php&#8217;, it doesn&#8217;t matter.</p>
<p>Then in your app/config/core.php file, add the following line to the top of the file:</p>
<p><code>Configure::load('config');</code></p>
<p>As long as you pass the name of your newly created file, then it will be fine. So the above will work if I created a file called app/config/config.php.</p>
<p>Then within your new config file, you can set any config variables you wish. However, you don&#8217;t use the familar <code>Configure::write('name', 'value');</code> convention. The variables that you set within your custom config file should be specified using arrays. Like this:</p>
<p><code>$config['name'] = &#8216;value&#8217;;</code></p>
<p>All variables in this file only, should set within the <code>$config</code> array as array name/value pairs. If your custom config file is called &#8216;app.php&#8217;, then the array name would be <code>$app</code>. So effectively, you could create as many of these custom config files as you wish. Perhaps if you had distinct sections of the app. I usually just create one, so I can easily access my custom config vars, without worrying about Cake&#8217;s built in config vars.</p>
<p>You access these custom config variables in the exact same way as you would any of the other built in core config vars.</p>
<p><code>Configure::read('name');</code></p>
<p>Enjoy!</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/443239836" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/11/05/keeping-your-corephp-dry/feed/</wfw:commentRss>
		<feedburner:origLink>http://developingwithstyle.com/2008/11/05/keeping-your-corephp-dry/</feedburner:origLink></item>
		<item>
		<title>DB Migrations moves home</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/440363515/</link>
		<comments>http://developingwithstyle.com/2008/11/02/db-migrations-moves-home/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 22:46:42 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[DB Migrations]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=277</guid>
		<description><![CDATA[I&#8217;ve been slowly moving all my public and private projects over to Git and Github whenever, and whereever I can. I&#8217;ve already created a mirror of the CakePHP 1.2 branch at Github, and I have a number of my private projects up too.
So I just completed the switch for CakePHP DB Migrations. The source is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been slowly moving all my public and private projects over to Git and Github whenever, and whereever I can. I&#8217;ve already created a mirror of the <a href="http://github.com/joelmoss/cakephp">CakePHP 1.2 branch at Github</a>, and I have a number of my private projects up too.</p>
<p>So I just completed the switch for CakePHP DB Migrations. The source is now available on <a href="http://github.com/joelmoss/cakephp-db-migrations/tree">Github</a> and is open to any pull requests. If you have any funky new features, or really need a bug fixed quickly, please feel free to fork the project. But please remember to send me a pull request.</p>
<p>I also moved the Google Code wiki into Github, and enhanced it a little. The <a href="http://github.com/joelmoss/cakephp-db-migrations/wikis">wiki</a> now includes some YAML migration examples, and will be expanded with more info and tutorials as and when I can.</p>
<p>The final step of the move, are the tickets/issues. And because it works so nicely with Github, I decided upon using <a href="http://devws.lighthouseapp.com/projects/19133-cakephp-db-migrations">Lighthouse</a>. So any bug reports, and/or feature requests should now be sent to <a href="http://devws.lighthouseapp.com/projects/19133-cakephp-db-migrations">Lighthouse</a>.</p>
<p>Thanks again for all the support. My hope in moving to Github, is that I can enhance the community aspect of this project, and to encourage more involvement from those of you who use it. I&#8217;m all ears!</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/440363515" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/11/02/db-migrations-moves-home/feed/</wfw:commentRss>
		<feedburner:origLink>http://developingwithstyle.com/2008/11/02/db-migrations-moves-home/</feedburner:origLink></item>
		<item>
		<title>Cake Nibbles: PHPShop, Debug Toolbar and Google No.1</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/429692874/</link>
		<comments>http://developingwithstyle.com/2008/10/23/cake-nibbles-phpshop-debug-toolbar-and-google-no1/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 14:36:44 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=272</guid>
		<description><![CDATA[Not posted much here recently, so It&#8217;s great that all of a sudden I have lots of Cake related news and tidbits to share with you all. So hopefully, this will be post number one in a long series of posts covering CakPHP related news and items, entitled Cake Nibbles. Enjoy!
PHPShop
The Google Group revealed some [...]]]></description>
			<content:encoded><![CDATA[<p>Not posted much here recently, so It&#8217;s great that all of a sudden I have lots of Cake related news and tidbits to share with you all. So hopefully, this will be post number one in a long series of posts covering CakPHP related news and items, entitled Cake Nibbles. Enjoy!</p>
<p><strong>PHPShop</strong></p>
<p>The <a href="http://groups.google.com/group/cake-php/browse_thread/thread/6e648259fb875997/99c99b1c28f5788a?show_docid=99c99b1c28f5788a">Google Group revealed some interesting news</a> about a well know open source PHP shopping cart application. It appears that the next version of <a href="http://www.phpshop.org/">PHPShop</a> will be built with CakePHP 1.2. That can be nothing but positive for Cake Land.</p>
<p><strong>Google No. 1</strong></p>
<p>Search for &#8220;PHP framework&#8221; on Google, and guess what? <a href="http://www.google.com/search?q=php+framework">Cake is now number one!</a> Oh yes, NUMBER 1! Top of the pops!</p>
<p><strong>Debug Kit</strong></p>
<p>Not content with being one of the biggest contributors to the core, Mark Story has created a plugin for CakePHP to help with debugging your applications. <a href="http://github.com/cakephp/debug_kit/tree/master">The Cake DebugKit</a>, which is now publicly available at GitHub, is similar to the extremely helpful Debug Bar that can be found in the Symfony framework. It displays at the top right of your screen, and shows you info about your app, such as load time and SQL queries.</p>
<p>It&#8217;s early days, but its a great start, and is something that is sorely needed in Cake. I hope to help out with it myself. And the idea of including it in a plugin is genius, and has made me realise how powerful the plugin architecture has become in 1.2</p>
<p><strong>TextMate Bundle</strong></p>
<p>Also on GitHub, you can now find another version of the <a href="http://github.com/cakephp/tm_bundle/tree/master">Cake TextMate bundle</a>. But this one is somewhat official, in that it is being maintained by Nate; Cake&#8217;s Lead Dev.</p>
<p>So thats it for this issue of Cake Nibbles, but I hope to post again soon.</p>
<p>If you have any interesting, or non-interesting news in Cake land, please let me know.</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/429692874" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/10/23/cake-nibbles-phpshop-debug-toolbar-and-google-no1/feed/</wfw:commentRss>
		<feedburner:origLink>http://developingwithstyle.com/2008/10/23/cake-nibbles-phpshop-debug-toolbar-and-google-no1/</feedburner:origLink></item>
		<item>
		<title>CakePHP DB Migrations v4.0 is now Stable</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/414108016/</link>
		<comments>http://developingwithstyle.com/2008/10/07/cakephp-db-migrations-v40-is-now-stable/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 19:56:45 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[DB Migrations]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=268</guid>
		<description><![CDATA[After months and months of delays due to work constraints, and other crap, I decided that I needed to get my head down and release v4.0 of CakePHP DB Migrations. So that is exactly what I just did!
v4.0 is now available in all its glory at the Google Code repo at http://code.google.com/p/cakephp-migrations so get it [...]]]></description>
			<content:encoded><![CDATA[<p>After months and months of delays due to work constraints, and other crap, I decided that I needed to get my head down and release v4.0 of CakePHP DB Migrations. So that is exactly what I just did!</p>
<p>v4.0 is now available in all its glory at the Google Code repo at <a href="http://code.google.com/p/cakephp-migrations">http://code.google.com/p/cakephp-migrations</a> so get it while it is hot.</p>
<p>You can <a href="http://code.google.com/p/cakephp-migrations/downloads/list">download it here</a>.</p>
<p>I plan on creating a new screencast soon(ish), that will include all the updated features and shortcuts, and will also be easier to hear me and will hopefully be a little shorter and concise. But until then, please play around and let me know if you have any questions at all.</p>
<p>Here&#8217;s the changes taken directly from the changelog:</p>
<p><code><br />
[*] errr&#8230; lots of fixes<br />
[*] Fixed bug with old style version numbers<br />
[*] Fixed bug where fkeys were trying to be created with auto_increment<br />
[+] Can now specify whether to use Cake&#8217;s UUID for the ID column within migration files. Example: &#8220;id: uuid&#8221;<br />
[+] Can now pass &#8220;id: false&#8221; within migration file, and no ID column will be created.<br />
[-] Deprecated &#8220;no_id: true&#8221; in favour of &#8220;id: false&#8221;<br />
[*] ID column is now correctly set as Primary Key when using UUID type.<br />
[+] Added support for MySQL specific table options (comments, engine/type, collate and charset)<br />
[+] Version numbers now use timestamps so as to minimize conflicts<br />
[+] Now supports interleaved migrations;<br />
when migrating up, will run migrations that have not yet been run, and will ignore any non-run migrations when running down.<br />
[+] Added info option (cake migrate info), which shows information on migrations<br />
[+] Can now specify version number when running up/down, thus allowing you to only run the up/down block of a specific migration<br />
[+] Schema table name is now customizable<br />
[+] Now supports PHP arrays in migration files</code></p>
<p>I hope to write more about these when I don&#8217;t have so much decorating on the house to do.</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/414108016" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/10/07/cakephp-db-migrations-v40-is-now-stable/feed/</wfw:commentRss>
		<feedburner:origLink>http://developingwithstyle.com/2008/10/07/cakephp-db-migrations-v40-is-now-stable/</feedburner:origLink></item>
		<item>
		<title>CakePHP 1.2 RC3 is Released</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/409039595/</link>
		<comments>http://developingwithstyle.com/2008/10/02/cakephp-12-rc3-is-released/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 07:54:40 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=266</guid>
		<description><![CDATA[Just woke up to find I missed two exciting events in CakePHP land. First and most important is the release of Release Candidate 3 for 1.2. This release cannot be understated, although I think considering the amount of work that has been done on this release, we should be seeing a stable release of 1.2. [...]]]></description>
			<content:encoded><![CDATA[<p>Just woke up to find I missed two exciting events in CakePHP land. First and most important is the release of Release Candidate 3 for 1.2. This release cannot be understated, although I think considering the amount of work that has been done on this release, we should be seeing a stable release of 1.2. I know it was only released a few hours ago, but right now there are a grand total of ONE bug. And that one bug will be fixed in 3 second, when I commit the fix ;). Go over to the Bakery and <a href="http://bakery.cakephp.org/articles/view/release-cakephp-rc3-the-rc-of-triumph">read the announcement</a> from Nate, and you will understand the amount of work that has been done.</p>
<p>Although I have been a small part of this, and helped by committing some fixes and enhancements, constraints on my time and family life have kept a some what tight lid on my commitment to contributing. But I hope to change that once 1.2 goes stable. As some of you know, I already have some cool new features waiting in my <a href="http://github.com/joelmoss/cakephp">unofficial CakePHP Github repo</a>. So hopefully these will appear in the core of 1.3, or maybe even 2.0!</p>
<p>Oh and by the way, a little bird tells me that Cake will be ditching SVN after 1.2 is released, and will be embracing Git and Github in all its glory. Watch this space!</p>
<p>Second exciting piece of news was the release of a new episode of <a href="http://live.cakephp.org/">The Show</a>. It&#8217;s been a long period of quiet since the last show aired, so this episode is well worth the wait. Well, I am assuming it is, as we only got a one hour heads up <a href="http://twitter.com/nateabele/statuses/942894584">from Nate, on Twitter</a>. And that was when I was fast asleep. So I will will have to wait for the episode to be put online.</p>
<p>So congrats to all. I would also have to agree with Nate, on naming Mark Story, the man who has contributed the most to this release than any other person. So everyone please enjoy Mark Story Day!</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/409039595" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/10/02/cakephp-12-rc3-is-released/feed/</wfw:commentRss>
		<feedburner:origLink>http://developingwithstyle.com/2008/10/02/cakephp-12-rc3-is-released/</feedburner:origLink></item>
		<item>
		<title>ModelBaker: A desktop application for building CakePHP applications</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/385225858/</link>
		<comments>http://developingwithstyle.com/2008/09/06/modelbaker-a-desktop-application-for-building-cakephp-applications/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 18:44:33 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=259</guid>
		<description><![CDATA[Today I received an email informing me of a new Twitter follower called widgetpress . So I clicked on the users Twitter profile to check &#8216;em out - as I usually do - and saw this post, which happened to be the users only post at the time:
Just released ModelBaker this week and going to [...]]]></description>
			<content:encoded><![CDATA[<p>Today I received an email informing me of a new <a href="http://twitter.com/joelmoss">Twitter</a> follower called <a href="http://twitter.com/widgetpress">widgetpress</a> . So I clicked on the users Twitter profile to check &#8216;em out - as I usually do - and saw this post, which happened to be the users only post at the time:</p>
<blockquote><p>Just released ModelBaker this week and going to private beta this weekend. Getting some real nice feedback.</p></blockquote>
<p>Naturally this piqued my interest, and as most of my Twitter followers do so because of my work with CakePHP, I Googled Modelbaker and Widgetpress and found a site at <a href="http://www.widgetpress.com/">WidgetPress.com</a>, and ultimately the following video&#8230;</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="src" value="http://www.youtube.com/v/PGqi0pWgEhk&amp;hl=en&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/PGqi0pWgEhk&amp;hl=en&amp;fs=1" allowfullscreen="true"></embed></object></p>
<p>So basically, someone has created a Mac application, that can build a CakePHP web application without any coding knowledge at all. It lets you build your models, views and controllers, and even builds helpers for you. I also saw something about a template system, that lets you create a new Cake app based on a predefined application template.</p>
<p>Now this is not really something that I would use, as I&#8217;m one of them hard core developers who use a <a href="http://macromates.com/">text editor</a> (and enjoy doing so), but it is a great idea for beginners, and could do wonders for CakePHP and its community. I wish I could tell you more, but I want to reserve judgement and any further comments until I have actually tried this out. As soon as I do, I will be sure to let you all know.</p>
<p>You can see a bigger and <a href="http://www.widgetpress.com/modelbaker.mov">better quality version of this screencast</a> on the WidgetPress website, but needless to say it is very, very interesting, and testament to how powerful and easy to use CakePHP really is.</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/385225858" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/09/06/modelbaker-a-desktop-application-for-building-cakephp-applications/feed/</wfw:commentRss>
<enclosure url="http://www.widgetpress.com/modelbaker.mov" length="41305831" type="video/quicktime" />
		<feedburner:origLink>http://developingwithstyle.com/2008/09/06/modelbaker-a-desktop-application-for-building-cakephp-applications/</feedburner:origLink></item>
		<item>
		<title>Let me show you Discovered Genius</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/379304788/</link>
		<comments>http://developingwithstyle.com/2008/08/31/let-me-show-you-discovered-genius/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 01:21:59 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[Ramblings]]></category>

		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=249</guid>
		<description><![CDATA[The reason why I love the internet soooo much, and why I spend so much time working and playing online is exactly why this blog was created. It&#8217;s all about those moments when I find a site or online service/software, that simply blows me away with it&#8217;s genius, and proves everything about what is so [...]]]></description>
			<content:encoded><![CDATA[<p>The reason why I love the internet soooo much, and why I spend so much time working and playing online is exactly why this blog was created. It&#8217;s all about those moments when I find a site or online service/software, that simply blows me away with it&#8217;s genius, and proves everything about what is so great about this thing we like to call the world wide web.</p>
<p><a href="http://discoveredgenius.com"><img class="alignright size-medium wp-image-251" title="DiscoveredGenius.com" src="http://developingwithstyle.com/wp-content/uploads/2008/08/discoveredgenius.gif" alt="" width="136" height="73" /></a></p>
<p>A few days ago, I found another one of those Discovered Genius&#8217;, and wrote a quick <a href="http://twitter.com/joelmoss/statuses/900801152">Twitter post</a> on it. A few moments later, I wrote <a href="http://twitter.com/joelmoss/statuses/900802951">another</a>, using that <a href="http://labs.mozilla.com/2008/08/introducing-ubiquity/">Discovered Genius</a> that I had just found. And thus, a new blog was born at <a href="http://discoveredgenius.com">DiscoveredGenius.com</a>.</p>
<p>I downloaded the latest copy of Wordpress, installed it on my Mac, then proceeded to create a theme and add my favourite plugins. I uploaded it to my server, and began to write the <a href="http://discoveredgenius.com/2008/08/31/this-is-discovered-genius/">first post</a>.</p>
<p>So&#8230;</p>
<p>The idea is simple; every time I discover any sort of Genius that is in any way or form related to the Internet, or indeed, anything at all, I will write about here. It not only means I have a quick and easy way to keep tabs on the best stuff that I discover, but it lets me share it all with you, my dear reader.</p>
<p><a href="http://discoveredgenius.com/2008/08/31/mozillas-ubiquity-brings-genius-to-firefox/">The first Discovered Genius</a> has already arrived, so head on over there. If you discover any that I may have missed, or simply overlooked, please drop me a line at joel [at] discoveredgenius [dot] com. I&#8217;m all ears!</p>
<p>And let me know your thoughts.</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/379304788" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/08/31/let-me-show-you-discovered-genius/feed/</wfw:commentRss>
		<feedburner:origLink>http://developingwithstyle.com/2008/08/31/let-me-show-you-discovered-genius/</feedburner:origLink></item>
		<item>
		<title>CakePHP now available at Github</title>
		<link>http://feeds.feedburner.com/~r/DevelopingWithStyle/~3/368317160/</link>
		<comments>http://developingwithstyle.com/2008/08/18/cakephp-now-available-at-github/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 18:29:56 +0000</pubDate>
		<dc:creator>Joel</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[Productivity]]></category>

		<guid isPermaLink="false">http://developingwithstyle.com/?p=234</guid>
		<description><![CDATA[Update: The Github repository I created now has an untouched clone of the CakePHP 1.2 SVN branch as the master. I then created a branch of this called &#8216;pimped&#8217;, which contains my own custom code. This means that you can choose to use the official Cake core, or my pimped copy. I&#8217;ll try to write [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update:</strong> The Github repository I created now has an untouched clone of the CakePHP 1.2 SVN branch as the master. I then created a branch of this called &#8216;pimped&#8217;, which contains my own custom code. This means that you can choose to use the official Cake core, or my pimped copy. I&#8217;ll try to write a little more about my pimped branch in a future post.</em></p>
<p>For the last few months, I&#8217;ve been developing an application which I hope to release to the unsuspecting public very soon. So I wanted to get it on my server and tested remotely, which I promptly did by checking out a copy from my SVN repository. I also did the same for the Cake core, by checking out <a href="https://svn.cakephp.org/repo/branches/1.2.x.x/cake">https://svn.cakephp.org/repo/branches/1.2.x.x/cake</a>.</p>
<p>Great, all worked fine&#8230; until I spotted loads of errors in the app. I then remembered that I made some local changes to the Cake core. I know, I know, it&#8217;s a cardinal sin. But I really needed these changes for this app, and it was doing nobody any harm, as they stayed on my local machine. But now, I also needed them on my remote copy on the server, but want to be able to &#8217;svn up&#8217; the cake core, whenever there are updates.</p>
<p>So I figured the best way would actually be to use a different SCM just for this purpose. I&#8217;d played with <a href="http://git.or.cz/">Git</a> a little, and have been really impressed at <a href="http://github.com">Github</a>. So I created a public repo at Github, and proceeded to create a clone of the Cake SVN repo, which I then pushed to the public repo at Github. I then applied my custom changes, and now we have a mirror of the CakePHP 1.2 branch at <a href="https://github.com/joelmoss/cakephp/tree">https://github.com/joelmoss/cakephp/tree</a>.</p>
<p>I can now clone the new git repo on my remote server, and I have a copy of CakePHP with all my custom changes, which I can update as and when I need to. This is all assuming of course, that I regulalry update the repo from the Cake SVN repo.</p>
<p>So things have actually turned out quite well. Please feel free to push and pull to/from the new <a href="http://github.com/joelmoss/cakephp/tree/master">git repo</a>, and let me know your thoughts.</p>
<img src="http://feeds.feedburner.com/~r/DevelopingWithStyle/~4/368317160" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://developingwithstyle.com/2008/08/18/cakephp-now-available-at-github/feed/</wfw:commentRss>
		<feedburner:origLink>http://developingwithstyle.com/2008/08/18/cakephp-now-available-at-github/</feedburner:origLink></item>
	</channel>
</rss>
