<?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>Cakephp.nu blog &#187; weekly summaries</title>
	<atom:link href="http://www.cakephp.nu/t/weekly-summaries/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cakephp.nu</link>
	<description>Cake and cookies by Jippi</description>
	<lastBuildDate>Wed, 11 Aug 2010 09:15:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>CakePHP Weekly Summaries Issue #2</title>
		<link>http://www.cakephp.nu/cakephp-weekly-summaries-issue-2</link>
		<comments>http://www.cakephp.nu/cakephp-weekly-summaries-issue-2#comments</comments>
		<pubDate>Mon, 03 Mar 2008 21:37:43 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[weekly summaries]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/cakephp-weekly-summaries-issue-2</guid>
		<description><![CDATA[
Welcome Welcome to the second edition of the CakePHP weekly summaries. Its quite embarrassing that it had to take so long time to get the second editon out. Too long time has passed and the amount of things that has happend during that period is waaay too big to be covered here. Therefor I present [...]
]]></description>
			<content:encoded><![CDATA[<h3>Welcome</h3>
<p>Welcome to the second edition of the CakePHP weekly summaries.<br />
Its quite embarrassing that it had to take so long time to get the second editon out. Too long time has passed and the amount of things that has happend during that period is waaay too big to be covered here.<br />
Therefor I present this half-done 2nd edition of the weekly summaries, with a promise that every week from now on I will give you the latest and greatest from the CakePHP world.<br />
So with no further ado, please enjoy this old and probably rather outdated edition of the <del>weekly</del>monthly summaries. <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  See you at the 3rd edition soon <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Trac changes</h3>
<ul>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6321">Changeset #6321</a> (phpnut) Fixes <a title="Some non-executable files in source tree have executable permissions (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3817">Ticket #3817</a>, Some non-executable files in source tree have executable permissions
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6322">Changeset #6322</a> (phpnut) Updating controller tests created with the console. Added associated fixtures to model tests
</li>
<li><strong><a target="blank" href="http://trac.cakephp.org/changeset/6323">Changeset #6323</a></strong> (gwoo) Updating Cache to apply prefix for every key, closes <a title="Namespace Support for Cache (memcached) (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3821">Ticket #3821</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6324">Changeset #6324</a> (phpnut) Correcting links generated to additional app tests
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6325">Changeset #6325</a> (phpnut) Adding support for test fixture generation when creating models, this will eventually be moved to a task. Currently the $records are hard coded to create field type specific data, this will eventually be changed to create random data based on the field type. Refactored tests that are created for models, 3 working tests are not created when generating tests for the model. Added notice output to terminal when creating a project, the CAKE_CORE_INCLUDE_PATH is automatically altered and may need to be changed when moving to a production environment. &#8221;
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6326">Changeset #6326</a> (phpnut) Fixes svn file property line
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6327">Changeset #6327</a> (phpnut) Removing unneeded &#8216; : &#8216;
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6328">Changeset #6328</a> (phpnut) Removing unneeded &#8216; : &#8216;
</li>
<li><strong><a target="blank" href="http://trac.cakephp.org/changeset/6329">Changeset #6329</a></strong> (nate) Fixing reading and writing in Configure class for references 3 levels deep, fixes <a title="Configure doesnt read/write keys with more than two levels (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3845">Ticket #3845</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6330">Changeset #6330</a> (nate) Removing un-needed method from TimeHelper? test
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6331">Changeset #6331</a> (phpnut) Removing var $useTable; from generated model when tables follow conventions Fixed issue with model tests and fixtures not being created properly when Model name does not match table name
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6332">Changeset #6332</a> (phpnut) Updating controller tests created with the console. Added associated fixtures to model tests
</li>
<li><strong><a target="blank" href="http://trac.cakephp.org/changeset/6333">Changeset #6333</a></strong> (phpnut) Fixes <a title="Deprecated loadView() call in email component when using theme (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3849">Ticket #3849</a>, Deprecated loadView() call in email component when using theme
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6334">Changeset #6334</a> (gwoo) updating HttpSocket? with auth, closes <a title="HttpSocket auth doesn't work (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3838">Ticket #3838</a> removing type casting, fixes <a title="HttpSocket may improberly cast long numbers to ints, changing the value (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3827">Ticket #3827</a> adding socket.group to tests
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6335">Changeset #6335</a> (gwoo) updating component, removing use of Router not needed anymore, fixes <a title="Fatal error: Class 'Router' not found (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3858">Ticket #3858</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6336">Changeset #6336</a> (nate) Adding non-null association key fix in Model, and updating Model::isUnique() to account for current record, fixes [ticket fixed 38599, closes [ticket fixed #2032]
</li>
<li><strong><a target="blank" href="http://trac.cakephp.org/changeset/6337">Changeset #6337</a></strong> (nate) Fixing return value in Model::saveAll(), fixes <a title="saveAll() Reporting Incorrect Result (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3852">Ticket #3852</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6338">Changeset #6338</a> (phpnut) Fixes <a title="Scaffolding and bake script has problems with tables that has underscore in it's name. (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3829">Ticket #3829</a>, Scaffolding and bake script has problems with tables that has underscore in it&#8217;s name
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6339">Changeset #6339</a> (phpnut) Fixes <a title="custom scaffolding file lookup paths inconsistent (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3798">Ticket #3798</a>, custom scaffolding file lookup paths inconsistent
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6340">Changeset #6340</a> (phpnut) Fixes <a title="set_time_limit(0) has no effect because of ini_set('max_execution_time', 60 * 5); (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3862">Ticket #3862</a>, set_time_limit(0) has no effect because of ini_set(&#8216;max_execution_time&#8217;, 60 * 5); changed max_execution_time , 0. Since php 4.3 this is the default anyway
</li>
<li><strong><a target="blank" href="http://trac.cakephp.org/changeset/6341">Changeset #6341</a></strong> (phpnut) Fixes <a title="$_SESSION not found (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3811">Ticket #3811</a>, $_SESSION not found Fixes [ticked fixed 3823], Session not restarted after instantiating new SessionComponent? Fixes #3850, Configuration Session.start and SessionComponent::__active aren&#8217;t handle correctly
</li>
<li><strong><a target="blank" href="http://trac.cakephp.org/changeset/6342">Changeset #6342</a></strong> (phpnut) Fixes <a title="Acl component fails to check() if a permission is denied in action (*) (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3851">Ticket #3851</a>, Acl component fails to check() if a permission is denied in action (*)
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6343">Changeset #6343</a> (phpnut) Adding test cases from [ticked closed 3810]
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6344">Changeset #6344</a> (phpnut) Reverting [] and [] this commit broke the working implementation. Closes <a title="__doThread function of model_php5/model_php4 is broken (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3810">Ticket #3810</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6345">Changeset #6345</a> (phpnut) Fixes <a title="Scaffolding is generating an id field with an empty value for auto_increment primary key (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3854">Ticket #3854</a>, Scaffolding is generating an id field with an empty value for auto_increment primary key
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6346">Changeset #6346</a> (phpnut) Fixing bug with scaffold and valid Session id check
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6347">Changeset #6347</a> (phpnut) Fixing bug with scaffold and valid Session id check in 1.1.x.x
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6348">Changeset #6348</a> (gwoo) updating View error handling for extensions, fixes <a title="Can't change extension of layout file (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3795">Ticket #3795</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6349">Changeset #6349</a> (nate) Correcting parameter declaration in API shell
</li>
<li><strong><a target="blank" href="http://trac.cakephp.org/changeset/6350">Changeset #6350</a></strong> (nate) Fixing database drivers for UPDATE/DELETE changes, updating drivers to comply with model tests, most passing. Fixes <a title="DB support for Aliases in genereted UPDATE SQL (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3794">Ticket #3794</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6351">Changeset #6351</a> (nate) Whitespace fixes
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6352">Changeset #6352</a> (gwoo) adding connection param to schema shell
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6353">Changeset #6353</a> (nate) Enabling alternate titles for PaginatorHelper::sort() links based on sort direction, closes <a title="Introduce different titles for Paginator::sort() depending on direction (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3865">Ticket #3865</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6354">Changeset #6354</a> (nate) Removing MySQL-specific schema code from core, improving support for PostgreSQL sequences, most tests passing
</li>
</ul>
<h3>Google group topics</h3>
<h4>Why doesn&#39;t Find* return a group of model objects?</h4>
<p>This topic has been discussed <strong>many</strong> times before, but Deane felt that it was required to ask yet again: &#8220;<a title="Google group: Why doesn&#39;t Find* return a group of model objects?" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/77794ca01fa52f9f">Why doesn&#39;t Find* return a group of model objects?</a>&#8220;. He wanted to be able to work with his models in the view (!BAD DESIGN!), and was confused why he only got an array back from the find* methods. Gwoo replied, and I quote: &#8220;<strong>Speed, simplicity, clarity</strong>&#8221; and pointed out that Cake provide view helpers to work with the arrays in almost any way you can imagine, and that the models provide callback functions (afterFind, afterSave, beforeFind, beforeFind) to format your data.<br />
Deane thanked gwoo for the reply, but &#8220;We couldn&#8217;t disagree more strenuously, and we think you&#8217;re wrong beyond belief in your reasoning, but we appreciate the response&#8221;&#8230;. didnt like gwoo&#8217;s reply at all.<br />
Gwoo replied in a calmly matter that &#8220;Everyone is entitled to their opinion and their choice of frameworks.&#8221;<br />
rtconner joined the discussion, offering a solution based on some old code by gwoo that would enable the <a href="http://bin.cakephp.org/saved/24245">models to return objects</a> (StdClass, not models classes)instead of arrays.<br />
Nick also joined the thread, backing up Deaen&#8217;s point of view (Cake is wrong, symfony lover is right) that its proper OO to use objects instead of arrays for the view data, but also reasoned that cake does indeed have the needed hooks and concepts to achieve Deane&#8217;s initial idea with a minimal effort. He explained that in a project he had created with CakePHP was that relationships (belongsTo, hasMany ect.) get more complicated with the OO styled approach, since the queries often fetched much more data than was really needed in the view. The combination of the controller didnt know wich fields the view required and the complex relation ships was in his opinion, not ideal at all. Their work a round was to create a &#8220;LazyData&#8221; class to handle it.<br />
Robby Anderson dropped in his 2 cents, and agreed that the cake was isnt 100% pure OO, but that the concept of &#8220;having the view incapable of performing any meaningful business logic&#8221; is bad, and will sooner or later lead to an unmanagelbe code base.<br />
Deane, the creater of the thread, posted a public apoligy to gwoo, explaining that he was fustrated at the time when he posted his previous post.</p>
<p>So, the summary must be that while some people dont like the design decission that CakePHP models return arrays instead of objects, others agree that its the right way to encapsulate the buisness logic in a correct Model View Control manner, and if you want to break theese convensions, its rather easy to do with minimal effort.</p>
<h4>Passing Data To A Form</h4>
<p>Travis asked how you are <a title="Google group: Passing Data To A Form" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/92d9341a3bf14699">Passing Data To A Form</a>. A bit unexpted (or perhaps expected given the flood of duplicate / newbie questions hitting the groups daily) nobody answered his question. The answer is pretty simple, and covered in any tutorial aviable on cakephp website AND in the documenation / manual.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #009900;">&#40;</span><span style="color: #000088;">$employeeID</span><span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span> 
     <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>data <span style="color: #339933;">=</span>  <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>Employee<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>findAllById<span style="color: #009900;">&#40;</span><span style="color: #000088;">$employeeID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h4>The Show Is Back!</h4>
<p>Jeff Loiselle aka phishy announced that <a target="_blank" href="http://live.cakephp.org">the show is back</a>. No replies, no thing, its sad&#8230; the show rocks !</p>
<h4>I18n in 1.2 model validation message</h4>
<p>Athies asked how does <a title="Google group: i18n in 1.2 model validation message" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/6ac5b6520c7e39df">i18n in 1.2 model validation message</a> work. His iniital attemp was to use the i18n method &#8216;__()&#8217; in the model $validate array, but he was getting syntax errors when doing that.<br />
Since PHP does not support useage of functions in instance delclarations its not possible to use i18n directly in the validate array.<br />
Francky06l pointed at his solution in another google post <a title="Google group: i18n: static language references with __(&quot;My lang key&quot;, true) in models and controllers" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/fa32c81acc043eef">i18n: static language references with __(&quot;My lang key&quot;, true) in models and controllers</a>, and while the solution will work, its far from ideal when working with i18n.<br />
A CakePHP google group regular, Dr. Tarique Sani, pointed out that the correct way to handle i18n validation messages was in the view, not at the model level. Amit Badkas backed up Tarique up and provided a simple example on how to do it:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> ?php <span style="color: #b1b100;">echo</span> 
<span style="color: #000088;">$form</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>input<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'username'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'error'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> 
    <span style="color: #0000ff;">'alphanumeric'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username must contain alpha-numeric characters'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
    <span style="color: #0000ff;">'between'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username must be between 8 to 20 characters'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Francky06l seemed to know that, his consern was the if he multiple views where the validation errors should show, it would be convenient to do it at model level.<br />
Robby Anderson wasnt sure why you just couldnt do both, create the validation errors in the model, and wrap them in __() in the view.</p>
<p>And sure, that will work &#8211; but &#8211; you will loose some cake magic with that. The console application</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">cake i18n <span style="color: #990000;">extract</span></pre></div></div>

<p>will not add the i18n messages to the pot file automagic. Also, the i18n extract command will not even search your models for any i18n magic. It will only look in controllers and views. You can choose to call this a limit or a feature, but thats how cakephp has decided to do it, to enforce their paradime on how an application should be build and structured.</p>
<h4>FormHelper Labels</h4>
<p>Travis asked how it was possible to disable the automagic label in the FormHelper. Robby Anderson provided the correct solution for this issue, use &#8216;label&#8217; =&gt; <strong>false</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> ?php <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$form</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>input<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Employee.name'</span><span style="color: #339933;">,</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'label'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre></div></div>

<h4>Using model objects in the controllers</h4>
<p><a href="#Why_doesn.26.2339.3Bt_Find.2A_return_a_group_of_model_objects.3F">Deane from earlier</a> posted another question on <a title="Google group: Using model objects in the controllers" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/3d03fd90d7fabaea">Using model objects in the controllers</a>. I dont really want to dwell much on this post, since its really attemp to take CakePHP in another direction than its supposed to. Deane clearly shows a lack of insight on how cakephp is supposed to work, and failed to provide any usefull examples that could show the group what he wanted to do.</p>

	Tags: <a href="http://www.cakephp.nu/t/cakephp" title="Cakephp" rel="tag">Cakephp</a>, <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/weekly-summaries" title="weekly summaries" rel="tag">weekly summaries</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/cakephp-weekly-summaries-issue-2/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CakePHP Weekly Summaries Issue #1.5</title>
		<link>http://www.cakephp.nu/cakephp-weekly-summaries-issue-15</link>
		<comments>http://www.cakephp.nu/cakephp-weekly-summaries-issue-15#comments</comments>
		<pubDate>Mon, 21 Jan 2008 20:22:34 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[weekly summaries]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/cakephp-weekly-summaries-issue-15</guid>
		<description><![CDATA[
Hello, just wanted to post a quick apoligy Sorry that I havent created the weekly summaries for almost 1.5 week now. The reason is that I have begun on a new job, and its consuming quick alot of time and energy Lot of new systems to learn (They dont use Cake&#8230;. yet, booooh!) I have [...]
]]></description>
			<content:encoded><![CDATA[<p>Hello,<br />
just wanted to post a quick apoligy <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Sorry that I havent created the weekly summaries for almost 1.5 week now. The reason is that I have begun on a new job, and its consuming quick alot of time and energy <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Lot of new systems to learn (They dont use Cake&#8230;. yet, booooh!) </p>
<p>I have the second edition 80% done, just need to clean it up and proof read it a few times <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Should be done before this weekend</p>

	Tags: <a href="http://www.cakephp.nu/t/cakephp" title="Cakephp" rel="tag">Cakephp</a>, <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/weekly-summaries" title="weekly summaries" rel="tag">weekly summaries</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/cakephp-weekly-summaries-issue-15/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CakePHP Weekly Summaries Issue #1</title>
		<link>http://www.cakephp.nu/cakephp-weekly-summaries-issue-1</link>
		<comments>http://www.cakephp.nu/cakephp-weekly-summaries-issue-1#comments</comments>
		<pubDate>Fri, 04 Jan 2008 21:23:18 +0000</pubDate>
		<dc:creator>Christian Winther</dc:creator>
				<category><![CDATA[Cakephp]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[weekly summaries]]></category>

		<guid isPermaLink="false">http://www.cakephp.nu/cakephp-weekly-summaries-issue-1</guid>
		<description><![CDATA[
Welcome to the first issue of CakePHP Weekly Summary. Below you&#8217;ll find all sorts of interesting topics that were discussed on the CakePHP mailing list and on SVN. This week alot happened, but the biggest news is that CakePHP 1.2 have entered BETA phase, and with that &#8211; we are close to a feature (API) freeze of the [...]
]]></description>
			<content:encoded><![CDATA[<p>Welcome to the first issue of CakePHP Weekly Summary. Below you&#8217;ll find all sorts of interesting topics that were discussed on the CakePHP mailing list and on <a target="_blank" href="http://trac.cakephp.org/timeline">SVN</a>.</p>
<p>This week alot happened, but the biggest news is that CakePHP 1.2 have entered <strong>BETA</strong> phase, and with that &#8211; we are close to a feature (API) freeze of the 1.2 branch.</p>
<p align="center">•••••••••••••••••••••••••••••••••••••••••••••••••••••••</p>
<h3>CakePHP 1.2 beta</h3>
<p>Yes, finally it happened. Please look at my post about the <!--intlink id="4" text="release of CakePHP 1.2 beta"-->.</p>
<h3>Trac changes</h3>
<ul>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6288">Changeset #6288</a> (gwoo) Added support for stored procedues in DboMysqli, fixes <a title="Passing null to Session-&gt;setFlash() params causes error. (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/2340">Ticket #2340</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6289">Changeset #6289</a> (gwoo) Updating controller task with i18n wrappers, closes <a title="i18n-friendly flash messages in baked controller. (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3490">Ticket #3490</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6290">Changeset #6290</a> (nate) Updating help text for ACL shell interface, fixes <a title="acl help grant: use of aco_id, aro_id is confusing (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3790">Ticket #3790</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6291">Changeset #6291</a> (phpnut) Moved merging of components, helpers, and uses vars to Controller::_mergeVars(); fixes bug with PluginAppController? vars not being merged before components are loaded. Fixed <a title="BindableBehaviour - Essential functionality (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3760">Ticket #3760</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6292">Changeset #6292</a> (phpnut) Missing keys when Model merges actsAs. Fixed <a title="[Patch] Missing keys when Model merges actsAs (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3786">Ticket #3786</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6293">Changeset #6293</a> (nate) Adding quoting and name-resolving fields in TreeBehavior. Fixed <a title="Tree behavior SQL bug (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3778">Ticket #3778</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6295">Changeset #6295</a> A few new exciting features was pushed into the repository:
<ul>
<li><!--intlink id="8" text="CounterCache (view my article on counterCache)"-->
</li>
<li>Model::generateList() was deprecated, and replaced by the new 1.2 cake find syntac. Model::find(&#8216;list&#8217;)
</li>
<li>Model::saveAll() was enhanced to save multiple records and associated records
</li>
<li>Some transactional methods (begin, commit, rollback) was added to DataSource class as well
</li>
<li>bindModel now support to change the bind settings on the fly if the model has already been bound
</li>
<li>Fixed <a title="A bug about magic fields in $whitelist (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3720">Ticket #3720</a>, <a title="bindModel (or similar) to modify existing model binding options, rather than replacing entirely (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/2355">Ticket #2355</a>, <a title="Save associated models along with the model. (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3615">Ticket #3615</a>
</li>
</ul>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6296">Changeset #6296</a> Implemented Validation::extension(); and Vaidation::range(); Fixed <a title="Built-in file validation (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/2897">Ticket #2897</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6297">Changeset #6297</a> Some optimization in code. Fixed <a title="Some optimization in code (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3653">Ticket #3653</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6298">Changeset #6298</a> Adding test for root path caching. Fixed <a title="View Caching and Routing (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/1349">Ticket #1349</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6299">Changeset #6299</a> Adding full join model support. Fixed <a title="Storing additional data on join tables (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/828">Ticket #828</a>, <a title="HTML ID property for controller's dump DIV (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/1045">Ticket #1045</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6300">Changeset #6300</a> Adding Debugger::log and test cases. Fixed [ticket tixed 995]
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6301">Changeset #6301</a> CSRF usability problems, Security Component and multiple instances of the webapp. Fixed <a title="CSRF usability problems (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/2608">Ticket #2608</a>, <a title="Scurity Compontent and multiple instances of the webapp (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3436">Ticket #3436</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6302">Changeset #6302</a> Adding new URL to validation test
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6303">Changeset #6303</a> Renaming domains in test to generic names
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6304">Changeset #6304</a> Fixing Model::find(&#8216;list&#8217;) when using self-joins
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6306">Changeset #6306</a> Refactoring, fixing SessionComponent test, adding String::tokenize()
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6307">Changeset #6307</a> Adding regular expression support to Set::extract() [ Set::map($data, '{s}.{n}.{[0-9]} ]. Fixed <a title="[Patch][Test] Set::extract enhancements (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3263">Ticket #3263</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6308">Changeset #6308</a> Fixing paths returned by Debugger::trimPath();
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6309">Changeset #6309</a> Fixing paths in debugger tests
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6310">Changeset #6310</a> Fixing paths in debugger tests
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6312">Changeset #6312</a> Adding String class to shell boostrap. Fixed <a title="Set::extract missing String object (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3793">Ticket #3793</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6313">Changeset #6313</a> Fixing JavascriptHelper::link() for script files outside of webroot/js (i.e. plugins). Fixed <a title="$javascript-&gt;link() incorrectly formatting paths for plugin vendors files (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3799">Ticket #3799</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6314">Changeset #6314</a> Removing unused directories from app/pages. Merging changes from app/ to skel/
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6315">Changeset #6315</a> Fixing after filters for Model::find(&#8216;list&#8217;). Fixed <a title="model-&gt;find('list', ...) does not work with i18n (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3805">Ticket #3805</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6316">Changeset #6316</a> Updating TimeHelper. Fixed <a title="TimeHelper has undefined variable (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3801">Ticket #3801</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6317">Changeset #6317</a> Bug in hasAndBelongsToMany. Fixed <a title="Bug in hasAndBelongsToMany (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3814">Ticket #3814</a>
</li>
<li><a target="blank" href="http://trac.cakephp.org/changeset/6320">Changeset #6320</a> updating Set::map() handling of deeply nested arrays, thanks to speedmax for an updated test case. Fixed <a title="Set::__map() mapping nested array in a unexpected way. (closed and fixed)" style="color: green" target="blank" href="https://trac.cakephp.org/ticket/3809">Ticket #3809</a>
</li>
</ul>
<h3>Google group topics</h3>
<h4>How to find referrer url?</h4>
<p>A guy called &#8216;krr&#8217; opened a question <a title="Google group: how to find referrer url?" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/25c4f95a44bc00db">how to find referrer url?</a>, and Daniel Hofstetter quickly replied that Controller::referer() would return the referer.</p>
<h4>Will CakePHP be able to survive as the Zend Framework matures?</h4>
<p>The framework war ignited yet again when &#8220;Action&#8221; created <a title="Google group: Will CakePHP be able to survive as the Zend Framework matures?" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/15d5a0b5a4a312b8">Will CakePHP be able to survive as the Zend Framework matures?</a>.</p>
<h4>Upgrade problems</h4>
<p>Following the release of 1.2 beta &#8220;Mech7&#8243; <a title="Google group: Upgrade problems" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/c6d34dc297233424">Upgrade problems</a> after upgrading his application to the new beta verion. Chris Hartjes quite replied that Mech7 should check his apache and php error logs. Mech7 however, quickly replied that the error was solved (after only 9 minutes), and his solution was to clear the app/tmp/cache folder in this app.<br />
I had however already written a list of steps I follow when my application suffers from the White Screen Of Death:</p>
<ul>
<li>Check that debug &gt; 0
</li>
<li>Clear app/tmp/cache/persistent/*
</li>
<li>Check local vhost error log
</li>
<li>Check global httpd-error log
</li>
<li>Restart apache, (stop, start), restart cache services (memcached ect.)
</li>
<li>Enter the world of die(&#8216;stop&#8217;); from app/webroot/index.php and downward in your application
</li>
</ul>
<h4>Table inheritance, multiple schemas, and associations</h4>
<p>Brian had a interesting question, well, for us postgresql users at least, <a title="Google group: table inheritance, multiple schemas, and associations" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/4f3fcad44af52cb2">table inheritance, multiple schemas, and associations</a>. There we no response to this thread, but after a few hours, he returned with a working solution, very interesting stuff. <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4>Depricated ListControllers</h4>
<p>Ronald Chaplin asked what the &#8216;new&#8217; way was in 1.2 to get a list of controllers in your application, since 1.2 had <a title="Google group: Depricated ListControllers" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/a51351910a6b3eed">Depricated ListControllers</a> ( listClasses( CONTROLLERS ); ). He had tried Configure::listObjects(&#8216;controller&#8217;, &#8216;/app/controller&#8217;);, but without success.<br />
Arno Esterhuizen quickly pointed Ronald in the right direction, <a href="http://api.cakephp.org/1.2/class_configure.html#a031c880ff156d79b6402327cda04330">the CakePHP 1.2 api</a></p>
<h4>OthAuth looses session &#8211; upgrading to new 1.2.0.6311 (2008)</h4>
<p>Klaus had a problem, <a title="Google group: othAuth looses session - upgrading to new 1.2.0.6311 (2008)" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/e45060caa0af039f">othAuth looses session &#8211; upgrading to new 1.2.0.6311 (2008)</a>, but so far no replies, might be a local issue on his setup?</p>
<h4>Themes management for an app ?</h4>
<p>Max asked if anyone had a component/helper for <a title="Google group: Themes management for an app ?" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/9514a0ce300fdb3">Themes management for an app ?</a>. Tarique shamelessly pointed to his own blog, where there is <a target="_blank" href="http://www.sanisoft.com/blog/2007/12/29/theming-your-cakephp-apps-v12/">quick guide on how to make cakephp use ThemeView</a>.</p>
<h4>Cakephp with PHP 5 and Mysql 5</h4>
<p>One of the too often asked questions on the group was asked yet again, <a title="Google group: Cakephp with PHP 5 and Mysql 5" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/4b3dc455f326210a">Cakephp with PHP 5 and Mysql 5</a>, and yes. <strong>CakePHP works fine with both MySQL5 and PHP5!!</strong>. Its rather funny, or sad depending on who you are, that the same questions is asked over and over on the <strong>google</strong>groups&#8230;. I&#8217;m sure the CakePHP guys chose google for a reason <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h4>Bug for find(&#39;All&#39;</h4>
<p>Another of repeating posts on the mailing list is the &#8220;I think I have found a bug&#8221; or just <a title="Google group: bug for find(&#39;All&#39;" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/21dabf1a2c6c3a25">bug for find(&#39;All&#39;</a> in this case. And as always, people always point directly to <a target="_blank" href="https://trac.cakephp.org/">Trac bugtracket</a>, as its the one and only place to submit possible bugs..</p>
<h4>CakeFest website Launched</h4>
<p>Mariano Iglesias announced that the <a title="Google group: CakeFest website Launched" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/9c4eff22ea10190d">CakeFest website Launched</a>! There was no replies or reactions on the list, I just hope that people did not overlook this little gem <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4>Bakery hates me</h4>
<p>Adam Royle claimed that &#8220;<a title="Google group: bakery hates me" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/6fc38a1062e033a3">bakery hates me</a>&#8220;, because he was not able to comment on a bakery article. Mariano Iglesias was quick to point to <a target="_blank" href="http://trac.cakephp.org">trac</a>website, but a Dr. Hannibal Lecter was snappy, and said &#8220;I don&#8217;t think posting links to Trac solves anything, it is a fact that bakery has many issues (some minor and some..not so minor). Some things should be seriously reconsidered and rewritten. But that&#8217;s just my 2c.&#8221;.</p>
<p>As much as Chris Hartjes agreed with Dr. Hannibal Lecter, he pointed out the important fact that trac is still the one and only place for bugs on cakephp related projects.<br />
Dr. Hannibal Lecter hoped that someone from the core team was following the group, since it wouldn&#8217;t be very (And I quote) &#8220;userfriendly community&#8221; if they didnt.<br />
Dr. Tarique Sani (Whats up with all those doctors?) replied that it was unfair against the php team to mark the community less userfriendly because users finding bugs wouldn&#8217;t bother to create tickets on trac, and just posting the errors on the mailing list.<br />
And FWIW my personal experience is that posting in trac works</p>
<p>Adam Royle said that the reason why he hadn&#8217;t posted a bug report on trac yet was because he didn&#8217;t like opening tickets without a patch or solid way to reproduce the error.<br />
Dr. Hannibal Lecter returned a apologized that it was not his intention to be unfair against the CakePHP team, and that he really appreciated their efforts. He was however puzzled that the creators of such a great framework as CakePHP would neglect <a target="_blank" href="http://bakery.cakephp.org">The Bakery</a>and made a rather good point: If new users use the bakery, and its full of errors, what would they think of the underlying framework as well?<br />
Adam Royle returned to the discussion and tried to get answers on his two original questions</p>
<ul>
<li>He was unhappy wit the quality of <a target="_blank" href="http://bakery.cakephp.org/articles/view/want-to-order-your-sql">this article on the bakery</a>
</li>
<li>What version of cake is the bakery running on? (1.2 pre-historic afaik)
</li>
</ul>
<p>Chris Hartjes, our favorite grumpy Canadian, closed the thread with a few harsh comments I&#8217;m not going to quote here <img src='http://www.cakephp.nu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Larry E. Masters aka PhpNut posted his announcement on the new 1.2 beta at: <a title="Google group: New Year, New Beta" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/d57865a5fb1dbd2e">New Year, New Beta</a>, that received a few &#8220;thanks&#8221;, but nothing else of interested.</p>
<h4>Require SSL for entire site?</h4>
<p>Bryan Encina asked if it was possible to <a title="Google group: Require SSL for entire site?" target="blank" href="http://groups.google.com/group/cake-php/browse_thread/thread/6420e8565e15cf29">Require SSL for entire site?</a>. His own idea was to check $_SERVER['HTTPS'] in his AppController, and then redirect based on this. Chris Hartjes questioned the safety of $_SERVER['HTTPS'] (its perfectly safe), to his understanding, it was possible to spoof (its not) this variable. His suggestion was to limit access on webserver level instead of application level.</p>
<p>I (Christian Winther) pointed out that mod_rewrite would be a perfect solution for this problem, since the RewriteCond directive could check for both SERVER_PORT (port 80 = non ssl, port 443 = ssl) and SERVER_PROTOCOL (http = non ssl, https = ssl)<br />
. Robby Anderson suggested using the SecurityComponent::requireSecure() method instead, also a possible solution if you wish to let ssl management be up to the application (htaccess will most likely perform alot better if its just for redirect).<br />
Chris Hartjes returned to the thread because he had felt a bit wierd about his earlier reply to the group, and confirmed that $_SERVER['HTTPS'] indeed cannot be spoofed. He suggested using Robby&#8217;s solution.</p>

	Tags: <a href="http://www.cakephp.nu/t/cakephp" title="Cakephp" rel="tag">Cakephp</a>, <a href="http://www.cakephp.nu/t/english" title="english" rel="tag">english</a>, <a href="http://www.cakephp.nu/t/weekly-summaries" title="weekly summaries" rel="tag">weekly summaries</a><br />
]]></content:encoded>
			<wfw:commentRss>http://www.cakephp.nu/cakephp-weekly-summaries-issue-1/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc

Served from: www.cakephp.nu @ 2012-02-05 16:29:27 -->
