<?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>Beyond Coding &#187; PHP</title>
	<atom:link href="http://www.beyondcoding.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.beyondcoding.com</link>
	<description>Follow us on Twitter: @fredwu and @scotti3g</description>
	<lastBuildDate>Mon, 15 Mar 2010 02:35:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Book Review: Zend Framework 1.8 Web Application Development</title>
		<link>http://www.beyondcoding.com/2009/11/06/book-review-zend-framework-1-8-web-application-development/</link>
		<comments>http://www.beyondcoding.com/2009/11/06/book-review-zend-framework-1-8-web-application-development/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 10:22:57 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[Nettuts]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=355</guid>
		<description><![CDATA[I wrote a quick review for the book Zend Framework 1.8 Web Application Development on Nettuts+, please go check it out if you&#8217;re looking into developing with Zend Framework. :)


	Tags: book, Nettuts, review, Zend Framework

	Related posts
	
	Zend Framework, where do you want to go tomorrow? (17)
	Zend Framework 1.5 Released (3)
	Using Zend Framework with Kohana (8)
	Using Zend [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a quick review for the book Zend Framework 1.8 Web Application Development on <a href="http://net.tutsplus.com/articles/reviews/book-review-zend-framework-1-8-web-application-development/"><strong>Nettuts+</strong></a>, please go <a href="http://net.tutsplus.com/articles/reviews/book-review-zend-framework-1-8-web-application-development/"><strong>check it out</strong></a> if you&#8217;re looking into developing with Zend Framework. :)</p>
<p><a href="http://www.packtpub.com/zend-framework-1-8-web-application-development/mid/0911092f3trq?utm_source=beyondcoding.com&#038;utm_medium=affiliate&#038;utm_content=blog&#038;utm_campaign=mdb_001373"><img src="https://www.packtpub.com/images/100x123/1847194222.png" alt="Zend Framework 1.8 Web Application Development" /></a></p>

	Tags: <a href="http://www.beyondcoding.com/tag/book/" title="book" rel="tag">book</a>, <a href="http://www.beyondcoding.com/tag/nettuts/" title="Nettuts" rel="tag">Nettuts</a>, <a href="http://www.beyondcoding.com/tag/review/" title="review" rel="tag">review</a>, <a href="http://www.beyondcoding.com/tag/zend-framework/" title="Zend Framework" rel="tag">Zend Framework</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2008/07/05/zend-framework-where-do-you-want-to-go-tomorrow/" title="Zend Framework, where do you want to go tomorrow? (July 5, 2008)">Zend Framework, where do you want to go tomorrow?</a> (17)</li>
	<li><a href="http://www.beyondcoding.com/2008/03/18/zend-framework-15-released/" title="Zend Framework 1.5 Released (March 18, 2008)">Zend Framework 1.5 Released</a> (3)</li>
	<li><a href="http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/" title="Using Zend Framework with Kohana (November 14, 2008)">Using Zend Framework with Kohana</a> (8)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/" title="Using Zend Framework with CodeIgniter (February 21, 2008)">Using Zend Framework with CodeIgniter</a> (39)</li>
	<li><a href="http://www.beyondcoding.com/2009/10/29/using-zend-framework-1-8-with-kohana/" title="Using Zend Framework 1.8+ with Kohana (October 29, 2009)">Using Zend Framework 1.8+ with Kohana</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2009/11/06/book-review-zend-framework-1-8-web-application-development/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Authlite 2.0 for Kohana 3.0 Alpha Testing</title>
		<link>http://www.beyondcoding.com/2009/10/31/authlite-2-0-for-kohana-3-0-alpha-testing/</link>
		<comments>http://www.beyondcoding.com/2009/10/31/authlite-2-0-for-kohana-3-0-alpha-testing/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 12:04:59 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Releases Updates]]></category>
		<category><![CDATA[Auth]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Authlite]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=354</guid>
		<description><![CDATA[If you are using Kohana 2.x, please use Authlite 1.x, otherwise, you are welcome to check out the new code tailored for Kohana 3.0.
Please check out the code on Github.
So far I&#8217;ve only spent a little bit of time to make it work on Kohana 3.0, but I will be addressing some known issues and [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using Kohana 2.x, please use <a href="http://www.beyondcoding.com/2009/01/21/release-kohana-module-authlite-for-user-authentication/">Authlite 1.x</a>, otherwise, you are welcome to check out the new code tailored for Kohana 3.0.</p>
<p>Please <a href="http://github.com/fredwu/authlite">check out the code on Github</a>.</p>
<p>So far I&#8217;ve only spent a little bit of time to make it work on Kohana 3.0, but I will be addressing some known issues and adding more features in the next few days. :) </p>

	Tags: <a href="http://www.beyondcoding.com/tag/auth/" title="Auth" rel="tag">Auth</a>, <a href="http://www.beyondcoding.com/tag/authentication/" title="Authentication" rel="tag">Authentication</a>, <a href="http://www.beyondcoding.com/tag/authlite/" title="Authlite" rel="tag">Authlite</a>, <a href="http://www.beyondcoding.com/tag/kohana-php/" title="Kohana" rel="tag">Kohana</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2009/01/21/release-kohana-module-authlite-for-user-authentication/" title="Release: [Kohana Module] Authlite, for User Authentication (January 21, 2009)">Release: [Kohana Module] Authlite, for User Authentication</a> (21)</li>
	<li><a href="http://www.beyondcoding.com/2009/03/11/yii-kohana-bridge-updated-full-kohana-flavour-now-added/" title="Yii Kohana Bridge updated: full Kohana flavour now added! (March 11, 2009)">Yii Kohana Bridge updated: full Kohana flavour now added!</a> (2)</li>
	<li><a href="http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/" title="Using Zend Framework with Kohana (November 14, 2008)">Using Zend Framework with Kohana</a> (8)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/" title="Using Zend Framework with CodeIgniter (February 21, 2008)">Using Zend Framework with CodeIgniter</a> (39)</li>
	<li><a href="http://www.beyondcoding.com/2009/10/29/using-zend-framework-1-8-with-kohana/" title="Using Zend Framework 1.8+ with Kohana (October 29, 2009)">Using Zend Framework 1.8+ with Kohana</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2009/10/31/authlite-2-0-for-kohana-3-0-alpha-testing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Zend Framework 1.8+ with Kohana</title>
		<link>http://www.beyondcoding.com/2009/10/29/using-zend-framework-1-8-with-kohana/</link>
		<comments>http://www.beyondcoding.com/2009/10/29/using-zend-framework-1-8-with-kohana/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 10:12:49 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[autoload]]></category>
		<category><![CDATA[integration]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=353</guid>
		<description><![CDATA[Even though the method outlined in my previous post would still work, I thought I&#8217;d post a cleaner one to handle the auto-load of Zend Framework classes in Kohana.
The code works with Zend Framework 1.8+, where a new Autoloader class has been introduced.
You can put the code in an appropriate place in your application, it [...]]]></description>
			<content:encoded><![CDATA[<p>Even though the method outlined in my <a href="http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/">previous post</a> would still work, I thought I&#8217;d post a cleaner one to handle the auto-load of Zend Framework classes in Kohana.</p>
<p>The code works with Zend Framework 1.8+, where a new <a href="http://framework.zend.com/manual/en/zend.loader.autoloader.html">Autoloader class</a> has been introduced.</p>
<p>You can put the code in an appropriate place in your application, it could be in the base controller, or if you&#8217;re using Kohana 3.0, in the bootstrap file.</p>
<p>You now no longer need to manually &#8216;include/require&#8217; Zend Framework files. :)</p>
<pre class="brush: php;">
if ($path = Kohana::find_file('vendors', 'Zend/Loader'))
{
	ini_set('include_path',
	ini_get('include_path').PATH_SEPARATOR.dirname(dirname($path)));

	require_once 'Zend/Loader/Autoloader.php';
	Zend_Loader_Autoloader::getInstance();
}
</pre>

	Tags: <a href="http://www.beyondcoding.com/tag/autoload/" title="autoload" rel="tag">autoload</a>, <a href="http://www.beyondcoding.com/tag/integration/" title="integration" rel="tag">integration</a>, <a href="http://www.beyondcoding.com/tag/kohana-php/" title="Kohana" rel="tag">Kohana</a>, <a href="http://www.beyondcoding.com/tag/zend-framework/" title="Zend Framework" rel="tag">Zend Framework</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/" title="Using Zend Framework with Kohana (November 14, 2008)">Using Zend Framework with Kohana</a> (8)</li>
	<li><a href="http://www.beyondcoding.com/2009/03/11/yii-kohana-bridge-updated-full-kohana-flavour-now-added/" title="Yii Kohana Bridge updated: full Kohana flavour now added! (March 11, 2009)">Yii Kohana Bridge updated: full Kohana flavour now added!</a> (2)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/" title="Using Zend Framework with CodeIgniter (February 21, 2008)">Using Zend Framework with CodeIgniter</a> (39)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/" title="Notes on Choosing a PHP Framework: A Quick Comparison of CodeIgniter and Kohana (February 23, 2008)">Notes on Choosing a PHP Framework: A Quick Comparison of CodeIgniter and Kohana</a> (49)</li>
	<li><a href="http://www.beyondcoding.com/2008/03/17/layerful-framework-performance-in-kohana/" title="Layerful Framework Performance in Kohana (March 17, 2008)">Layerful Framework Performance in Kohana</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2009/10/29/using-zend-framework-1-8-with-kohana/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Yii Framework Rebranding Underway</title>
		<link>http://www.beyondcoding.com/2009/06/30/yii-framework-rebranding-underway/</link>
		<comments>http://www.beyondcoding.com/2009/06/30/yii-framework-rebranding-underway/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 03:59:48 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Yii]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[concept]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[rebranding]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=315</guid>
		<description><![CDATA[I am very proud to announce that my design proposals are chosen for the rebranding of Yii Framework.
If you don&#8217;t already know, Yii is a high-performance component-based PHP framework best for developing large-scale Web applications. Yii comes with a full stack of features, including MVC, DAO/ActiveRecord, I18N/L10N, caching, jQuery-based AJAX support, authentication and role-based access [...]]]></description>
			<content:encoded><![CDATA[<p>I am very proud to announce that my design proposals are chosen for the rebranding of <a href="http://www.yiiframework.com/">Yii Framework</a>.</p>
<p>If you don&#8217;t already know, Yii is <em>a high-performance component-based PHP framework best for developing large-scale Web applications. Yii comes with a full stack of features, including MVC, DAO/ActiveRecord, I18N/L10N, caching, jQuery-based AJAX support, authentication and role-based access control, scaffolding, input validation, widgets, events, theming, Web services, and so on. Written in strict OOP, Yii is easy to use and is extremely flexible and extensible</em>. </p>
<p><a href="http://www.yiiframework.com/forum/index.php?/topic/2895-new-design-of-yii-is-chosen/">Click here to view the design drafts</a>. Constructive criticisms are welcomed! :)</p>
<p><img src="http://i44.tinypic.com/148uiu.png" alt="Yii Framework" /></p>

	Tags: <a href="http://www.beyondcoding.com/tag/branding/" title="branding" rel="tag">branding</a>, <a href="http://www.beyondcoding.com/tag/concept/" title="concept" rel="tag">concept</a>, <a href="http://www.beyondcoding.com/tag/design/" title="design" rel="tag">design</a>, <a href="http://www.beyondcoding.com/tag/rebranding/" title="rebranding" rel="tag">rebranding</a>, <a href="http://www.beyondcoding.com/tag/yii/" title="Yii" rel="tag">Yii</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2009/03/11/yii-kohana-bridge-updated-full-kohana-flavour-now-added/" title="Yii Kohana Bridge updated: full Kohana flavour now added! (March 11, 2009)">Yii Kohana Bridge updated: full Kohana flavour now added!</a> (2)</li>
	<li><a href="http://www.beyondcoding.com/2009/03/02/choosing-a-php-framework-round-2-yii-vs-kohana-vs-codeigniter/" title="Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter (March 2, 2009)">Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter</a> (41)</li>
	<li><a href="http://www.beyondcoding.com/2009/08/27/branding-russell-brand-style/" title="Branding &#8211; Russell Brand Style (August 27, 2009)">Branding &#8211; Russell Brand Style</a> (0)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2009/06/30/yii-framework-rebranding-underway/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Yii Kohana Bridge updated: full Kohana flavour now added!</title>
		<link>http://www.beyondcoding.com/2009/03/11/yii-kohana-bridge-updated-full-kohana-flavour-now-added/</link>
		<comments>http://www.beyondcoding.com/2009/03/11/yii-kohana-bridge-updated-full-kohana-flavour-now-added/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 00:54:19 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Releases Updates]]></category>
		<category><![CDATA[Yii]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[integration]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=290</guid>
		<description><![CDATA[I have just pushed some updates to the Git repository.
The entire Kohana distribution is now included. The bridging class is now renamed to &#8216;Kbridge&#8217;.
Not all helpers and libraries will work at the moment, especially the ones that reference Kohana core classes. I am however planning to bridge the core classes and configuration files for tighter [...]]]></description>
			<content:encoded><![CDATA[<p>I have just <a href="http://github.com/fredwu/yii-kohana-bridge/commit/048b451b6a340065f091b6f65dab97ebca32598b">pushed some updates</a> to <a href="http://github.com/fredwu/yii-kohana-bridge/tree/master">the Git repository</a>.</p>
<p>The entire Kohana distribution is now included. The bridging class is now renamed to &#8216;Kbridge&#8217;.</p>
<p>Not all helpers and libraries will work at the moment, especially the ones that reference Kohana core classes. I am however planning to bridge the core classes and configuration files for tighter integration.</p>
<p>If you have any suggestions please let me know. :)</p>

	Tags: <a href="http://www.beyondcoding.com/tag/bridge/" title="bridge" rel="tag">bridge</a>, <a href="http://www.beyondcoding.com/tag/integration/" title="integration" rel="tag">integration</a>, <a href="http://www.beyondcoding.com/tag/kohana-php/" title="Kohana" rel="tag">Kohana</a>, <a href="http://www.beyondcoding.com/tag/yii/" title="Yii" rel="tag">Yii</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/" title="Using Zend Framework with Kohana (November 14, 2008)">Using Zend Framework with Kohana</a> (8)</li>
	<li><a href="http://www.beyondcoding.com/2009/10/29/using-zend-framework-1-8-with-kohana/" title="Using Zend Framework 1.8+ with Kohana (October 29, 2009)">Using Zend Framework 1.8+ with Kohana</a> (3)</li>
	<li><a href="http://www.beyondcoding.com/2009/03/02/choosing-a-php-framework-round-2-yii-vs-kohana-vs-codeigniter/" title="Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter (March 2, 2009)">Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter</a> (41)</li>
	<li><a href="http://www.beyondcoding.com/2009/06/30/yii-framework-rebranding-underway/" title="Yii Framework Rebranding Underway (June 30, 2009)">Yii Framework Rebranding Underway</a> (8)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/" title="Using Zend Framework with CodeIgniter (February 21, 2008)">Using Zend Framework with CodeIgniter</a> (39)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2009/03/11/yii-kohana-bridge-updated-full-kohana-flavour-now-added/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter</title>
		<link>http://www.beyondcoding.com/2009/03/02/choosing-a-php-framework-round-2-yii-vs-kohana-vs-codeigniter/</link>
		<comments>http://www.beyondcoding.com/2009/03/02/choosing-a-php-framework-round-2-yii-vs-kohana-vs-codeigniter/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 06:09:45 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Yii]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[php framework]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=260</guid>
		<description><![CDATA[It was over a year ago that I wrote the article that compares CodeIgniter and Kohana. Since then both CodeIgniter and Kohana have seen major progress with the release of CodeIgniter 1.7.0 and Kohana 2.3.
In December 2008, a new PHP framework called Yii has been released to the public with a stable 1.0. There were [...]]]></description>
			<content:encoded><![CDATA[<p>It was over a year ago that I wrote <a href="http://www.beyondcoding.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/">the article that compares CodeIgniter and Kohana</a>. Since then both CodeIgniter and Kohana have seen major progress with the release of <a href="http://www.derekallard.com/blog/post/codeigniter-170-released/">CodeIgniter 1.7.0</a> and <a href="http://learn.kohanaphp.com/2008/08/09/kohana-22-released/">Kohana 2.3</a>.</p>
<p>In December 2008, a new PHP framework called <a href="http://www.yiiframework.com/">Yii</a> has been released to the public with a stable 1.0. There were a lot of new PHP framework released in 2008, but Yii was one of the more recognised ones because:</p>
<ul>
<li>The author, Qiang Xue, is the author of the well established <a href="http://www.xisc.com/">PRADO framework</a>.</li>
<li>It is a simple to use, well organised, PHP 5 only MVC framework.</li>
<li>It claims to have <a href="http://www.yiiframework.com/performance/">astonishing performance</a>.</li>
</ul>
<p>Before I start this round of comparison, let me briefly list my experience with these frameworks, so you may interpret this article with your own judgement.</p>
<p><strong>CodeIgniter:</strong> I started using CodeIgniter since its version 1.2.x from a few years ago. During the past few years I have worked on projects mainly using version 1.5.x and 1.6.x. I have now stopped using CodeIgniter in favour of using other PHP 5 only frameworks.</p>
<p><strong>Kohana:</strong> I first started using Kohana when it was called BlueFlame back when it was first forked out of CodeIgniter. Since then I have lurked and participated in the Kohana community. All of my recent projects are done in Kohana.</p>
<p><strong>Yii:</strong> The 1.0 release of Yii had my attention, but I didn&#8217;t really dive into it until about now. However, most of my impressions on Yii are based on its <a href="http://www.yiiframework.com/doc/">documentation</a> and <a href="http://daniel.carrera.bz/2009/01/comparison-of-php-frameworks-part-i/">this article by Daniel</a>.</p>
<p>Let&#8217;s see how they compare with each other.</p>
<p><small>Same notes as before: Grading scale: Limited < Fair < Good < Excellent. If a feature is not available in the distributed package, but is available via 3rd party libraries, I will state that in the comparison. If a feature is available both in the distributed package and via 3rd party libraries, only the official one will get assessed.</small></p>
<p><span id="more-260"></span></p>
<p>Software releases used for this comparison are:</p>
<p><a href="http://codeigniter.com/news/codeigniter_1.7.1_released/">CodeIgniter 1.7.1</a><br />
<a href="http://forum.kohanaphp.com/comments.php?DiscussionID=1911">Kohana 2.3.1</a><br />
<a href="http://www.yiiframework.com/forum/index.php/topic,954.msg5506.html">Yii 1.0.3</a></p>
<h3>Licensing</h3>
<p><strong>CodeIgniter</strong> <em>Good</em></p>
<p>CI uses a modified, generally regarded as more restrict, <a href="http://codeigniter.com/user_guide/license.html">BSD/Apache-style license</a>.</p>
<p><strong>Kohana</strong> <em>Excellent</em></p>
<p>Kohana uses a <a href="http://kohanaphp.com/license">new BSD license</a>.</p>
<p><strong>Yii</strong> <em>Excellent</em></p>
<p>Yii uses a <a href="http://www.yiiframework.com/license/">new BSD license</a>.</p>
<h3>PHP Compatibility</h3>
<p><strong>CodeIgniter</strong> <em></em></p>
<p>PHP >= 4.3.2 (including all versions of PHP 5)</p>
<p>At first glance, it seems that CI has the edge because it supports both PHP 4 and PHP 5. However, if you are familiar with OOP then you would know that a lot of compromises had to be made in order to offer PHP 4 support. This is one of the primary reasons some developers including myself avoid to use CodeIgniter.</p>
<p>Even if you decided to use CodeIgniter, I still strongly recommend you build your application using PHP 5 and proper OOP techniques.</p>
<p><strong>Kohana</strong> <em></em></p>
<p>PHP >= 5.2.3</p>
<p><strong>Yii</strong> <em></em></p>
<p>PHP >= 5.1.0</p>
<h3>Supported Databases</h3>
<p><strong>CodeIgniter</strong> <em>Excellent</em></p>
<ul>
<li>MySQL</li>
<li>MySQLi</li>
<li>PostgreSQL</li>
<li>MSSQL</li>
<li>Oracle</li>
<li>SQLite</li>
<li>ODBC</li>
</ul>
<p><strong>Kohana</strong> <em>Good</em></p>
<ul>
<li>MySQL</li>
<li>MySQLi</li>
<li>PostgreSQL</li>
<li>MSSQL</li>
<li>PDOSqlite</li>
</ul>
<p><small>*Note: <a href="http://forumarchive.kohanaphp.com/index.php/topic,392.0.html">Kohana devs have decided long ago NOT to use PDO</a>. <a href="http://github.com/shadowhand/kohana/tree/master">Kohana 3.0</a> is planned to offer support for PDO.</small></p>
<p><strong>Yii</strong> <em>Excellent</em></p>
<p>All the DBMS supported by <a href="http://php.net/manual/en/book.pdo.php">PDO (PHP Data Object)</a>.</p>
<p><small>* Note: Support for <a href="http://www.yiiframework.com/doc/guide/database.ar">Active Record</a> is limited by DBMS. Currently, only the following DBMS are supported:</small></p>
<ul>
<li><small>MySQL 4.1 or later</small></li>
<li><small>PostgreSQL 7.3 or later</small></li>
<li><small>SQLite 2 and 3</small></li>
</ul>
<h3>Community</h3>
<p><strong>CodeIgniter</strong> <em>Excellent</em></p>
<p>CodeIgniter is blessed with a strong, active community that is friendly and helpful. CodeIgniter offers a <a href="http://codeigniter.com/forums/">forum</a>, a <a href="http://codeigniter.com/bug_tracker/">bug tracker</a> and a <a href="http://codeigniter.com/wiki/">wiki</a>.</p>
<p><strong>Kohana</strong> <em>Good</em></p>
<p>Kohana has a small but elite community. It offers a <a href="http://forum.kohanaphp.com/">forum</a>, <a href="http://trac.kohanaphp.com/">Trac</a> and <a href="irc://irc.freenode.net/kohana">IRC</a>.</p>
<p><strong>Yii</strong> <em>Good</em></p>
<p>Yii is the youngest of the three, therefore has the smallest community, it is however growing rapidly as the framework itself gains more attention. Yii offers a <a href="http://www.yiiframework.com/forum/">forum</a>, a <a href="http://code.google.com/p/yii/">project hosted at Google Code</a> and a <a href="http://www.yiiframework.com/doc/">documentation section that supports user comments</a>.</p>
<h3>Documentation / User Guide</h3>
<p><strong>CodeIgniter</strong> <em>Excellent</em></p>
<p>CodeIgniter is known for its excellent documentation. Its user guide is comprehensive, easy to follow and up-to-date. Every release of the framework contains a copy of the user guide too, in case you are maintaining more than one version of CodeIgniter applications.</p>
<p><strong>Kohana</strong> <em>Good</em></p>
<p>Kohana&#8217;s documentation has been improved since my last article. It now has coverage for most aspect of the framework. However, some parts of the documentation are out of date and sometimes incorrect.</p>
<p>I&#8217;ve been using Kohana for a long time now and I found the documentation sufficient and very helpful. It may not have the fine layout found in CodeIgniter&#8217;s user guide, but it certainly helps me track down features and usages.</p>
<p><strong>Yii</strong> <em>Fair</em></p>
<p>The documentation of Yii seems to be fairly well constructed even though I haven&#8217;t started using Yii. All new features or changed features are carefully documented so you know what is going on with the specific version of Yii you use. The API documentation is also very useful thanks to the fully documented code base. However, many features at this stage are not documented in the guide, you need to go through the API or the code base itself.</p>
<h3>Tutorial / Sample Availability</h3>
<p><strong>CodeIgniter</strong> <em>Good</em></p>
<p>CodeIgniter has a dedicated <a href="http://codeigniter.com/wiki/Tutorials/">wiki page</a> for all the tutorials, and you can dig around their forums to find more.</p>
<p><strong>Kohana</strong> <em>Good</em></p>
<p>Kohana has a dedicated <a href="http://kohanaphp.com/tutorials">page</a> for tutorials, but is out-of-date. It also hosts a <a href="http://learn.kohanaphp.com/">learning centre</a> which unfortunately has not been updated since September 2008. You can still head over to their forums to find useful tutorials though.</p>
<p><strong>Yii</strong> <em>Good</em></p>
<p>Yii has a <a href="http://www.yiiframework.com/doc/cookbook/">cookbook</a> section that contains a selection of tutorials. As always, check their forums to find more.</p>
<h3>MVC</h3>
<p>All three frameworks use the <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC</a> (Model-View-Controller) architecture.</p>
<p><strong>CodeIgniter</strong> <em>Yes</em></p>
<p>Apart from the standard MVC architecture, CodeIgniter also offers <a href="http://codeigniter.com/user_guide/general/libraries.html">libraries</a>, <a href="http://codeigniter.com/user_guide/general/plugins.html">plugins</a>, <a href="http://codeigniter.com/user_guide/general/helpers.html">helpers</a> and <a href="http://codeigniter.com/user_guide/general/hooks.html">hooks</a>.</p>
<p><strong>Kohana</strong> <em>Yes</em></p>
<p>Apart from the standard MVC architecture, Kohana also offers <a href="http://docs.kohanaphp.com/general/modules">modules</a>, <a href="http://docs.kohanaphp.com/general/events">events</a>, <a href="http://docs.kohanaphp.com/general/libraries">libraries</a>, <a href="http://docs.kohanaphp.com/general/helpers">helpers</a> and <a href="http://docs.kohanaphp.com/general/hooks">hooks</a>.</p>
<p><strong>Yii</strong> <em>Yes</em></p>
<p>Apart from the standard MVC architecture, Yii also offers <a href="http://www.yiiframework.com/doc/guide/basics.component">components</a>, <a href="http://www.yiiframework.com/doc/guide/basics.module">modules</a>, <a href="http://www.yiiframework.com/doc/guide/extension.overview">extensions</a>, <a href="http://www.yiiframework.com/doc/guide/basics.view#widget">view widgets</a> and helpers *.</p>
<p><small>* Helpers are undocumented but are <a href="http://www.yiiframework.com/search?q=helper&#038;section=guide">referenced in the guide</a> and in the API. All of the helpers can be found in the <em>utils</em> folder under the main <em>framework</em> directory.</small></p>
<h3>Modularity</h3>
<p><strong>CodeIgniter</strong> <em>via 3rd party libraries</em></p>
<p>CodeIgniter does not support modules out-of-box, but you may use 3rd party libraries such as <a href="http://codeigniter.com/wiki/Modular_Extensions_-_HMVC">HMVC</a> or <a href="http://codeigniter.com/forums/viewthread/65749/">Matchbox</a> to achieve similar effect.</p>
<p><strong>Kohana</strong> <em>Excellent</em></p>
<p>Kohana not only offers <a href="http://docs.kohanaphp.com/general/modules">modules</a>, but also has <a href="http://docs.kohanaphp.com/general/filesystem#cascading">cascading file system</a> which takes modularity to a higher level.</p>
<p><strong>Yii</strong> <em>Good</em></p>
<p>Yii 1.0.3 has added support for <a href="http://www.yiiframework.com/doc/guide/basics.module">modules</a>.</p>
<h3>Conventions</h3>
<p>Unlike <a href="http://www.cakephp.org/">CakePHP</a>, all three frameworks offer flexible conventions. There are some defaults but most of them can be overwritten or configured.</p>
<h3>Configuration</h3>
<p><strong>CodeIgniter</strong> <em>Good</em></p>
<p>CodeIgniter has a fairly good <a href="http://codeigniter.com/user_guide/libraries/config.html">configuration system</a>.</p>
<p><strong>Kohana</strong> <em>Excellent</em></p>
<p>Kohana has an exceptionally well <a href="http://docs.kohanaphp.com/general/configuration">configuration system</a>.</p>
<p>Quoted from the guide: The file structure of config files follows Kohana&#8217;s file structure. Meaning that configuration files in the application directory take precedence over those in modules which take precedence over those in the system directory. The one exception is <em>config.php</em> which is hardcoded into the <em>application/config</em> directory and cannot be moved elsewhere. </p>
<p><strong>Yii</strong> <em>Good</em></p>
<p>Yii has a fairly good <a href="http://www.yiiframework.com/doc/guide/basics.application#application-configuration">configuration system</a>.</p>
<h3>Database Abstraction and ORM</h3>
<p>Definitions: <a href="http://en.wikipedia.org/wiki/Database_abstraction_layer">Database Abstraction</a>, <a href="http://en.wikipedia.org/wiki/Object-relational_mapping">ORM</a></p>
<p><strong>CodeIgniter</strong> <em>Good</em></p>
<p>CodeIgniter has a very powerful <a href="http://codeigniter.com/user_guide/database/index.html">database class</a>. It offers query builders as well as database manipulation classes, however it has no built-in ORM support.</p>
<p>One important thing that needs clarification is that even though CodeIgniter has <a href="http://codeigniter.com/user_guide/database/active_record.html">Active Record</a>, it is NOT the same <a href="http://en.wikipedia.org/wiki/Active_record_pattern">Active Record</a> pattern people commonly refer to. CodeIgniter&#8217;s Active Record is merely a collection of query builders.</p>
<p>For ORM, please check out <a href="http://www.assembla.com/wiki/show/IgnitedRecord">IgnitedRecord</a> and <a href="http://stensi.com/datamapper/">DataMapper</a>. Interestingly enough, despite their naming, IgnitedRecord uses the Data Mapper pattern and DataMapper uses the Active Record pattern.</p>
<p><strong>Kohana</strong> <em>Good</em></p>
<p>The most notable time saver during my project development has to be the ORM. Kohana offers a lightweight but useful ORM implementation. It&#8217;s not as sophisticated as the Rails Active Record module, but it does the job quite well. I especially love the <a href="http://docs.kohanaphp.com/libraries/orm/working#adding_and_removing_data_from_many-to-many_relationships">ease of updating many-to-many records</a>.</p>
<p><strong>Yii</strong> <em>Good</em></p>
<p>Yii has a more complex syntax for <a href="http://www.yiiframework.com/doc/guide/database.arr">declaring model relationships</a> than Kohana. However, it also offers more powerful features such as named scope, albeit the syntax is nowhere near as clean as Ruby on Rails&#8217;.</p>
<h3>Auth and ACL</h3>
<p><strong>CodeIgniter</strong> <em>via 3rd party libraries</em></p>
<p>CodeIgniter has a couple of 3rd party Auth and ACL libraries, please head over to their <a href="http://codeigniter.com/forums/">forums</a> to find more.</p>
<p><strong>Kohana</strong> <em>Good</em></p>
<p>Kohana has a built-in <a href="http://docs.kohanaphp.com/addons/auth">Auth module</a> and a number of 3rd party Auth and ACL libraries including my <a href="http://www.beyondcoding.com/2009/01/21/release-kohana-module-authlite-for-user-authentication/">Authlite</a>.</p>
<p><small>* A more complete Auth + ACL solution is being cooked for the 2.4 release. <a href="http://forum.kohanaphp.com/comments.php?DiscussionID=1909&#038;page=1#pgbottom">Check out Samsoir&#8217;s replies in this thread</a>.</small></p>
<p><strong>Yii</strong> <em>Excellent</em></p>
<p>Yii has built-in support for both <a href="http://www.yiiframework.com/doc/guide/topics.auth">authentication and authorisation</a>. As I have no first hand experience with Yii yet, I can only judge this feature from the documentation, by the look of it it&#8217;s fairly easy to use and flexible enough for most systems.</p>
<h3>Validation</h3>
<p><strong>CodeIgniter</strong> <em>Excellent</em></p>
<p>CodeIgniter&#8217;s <a href="http://codeigniter.com/user_guide/libraries/form_validation.html">form validation library</a>.</p>
<p><strong>Kohana</strong> <em>Excellent</em></p>
<p>Kohana&#8217;s <a href="http://docs.kohanaphp.com/libraries/validation">validation library</a>.</p>
<p><strong>Yii</strong> <em>Excellent</em></p>
<p>Yii&#8217;s <a href="http://www.yiiframework.com/doc/guide/form.model#declaring-validation-rules">validation usage</a>. All of the system <a href="http://www.yiiframework.com/doc/api/#system.validators">validators</a> can be found in the <em>validators</em> directory under the main <em>framework</em> directory.</p>
<h3>Caching</h3>
<p><strong>CodeIgniter</strong> <em>Limited</em></p>
<p>CodeIgniter only supports <a href="http://codeigniter.com/user_guide/general/caching.html">basic file system based page caching</a>.</p>
<p><strong>Kohana</strong> <em>Good</em></p>
<p>Kohana offers a slightly more useful <a href="http://docs.kohanaphp.com/libraries/cache">cache library</a> that supports file, SQLite, APC, eAccelerator, memcache, and XCache based caching, with tag support.</p>
<p><strong>Yii</strong> <em>Good</em></p>
<p>Similar to Kohana&#8217;s implementation, Yii supports memcache, APC, XCache and DB based (default to SQLite) page and segment <a href="http://www.yiiframework.com/doc/guide/caching.overview">caching</a>.</p>
<h3>Session</h3>
<p><strong>CodeIgniter</strong> <em>Good</em></p>
<p>CodeIgniter&#8217;s <a href="http://codeigniter.com/user_guide/libraries/sessions.html">session class</a> is fairly good, it supports database storing as well as handling flash data.</p>
<p><strong>Kohana</strong> <em>Good</em></p>
<p>Similarly to CodeIgniter, Kohana also offers a very good <a href="http://docs.kohanaphp.com/libraries/session">session library</a>.</p>
<p><strong>Yii</strong> <em>Excellent</em></p>
<p>Yii provides a much more powerful and flexible <a href="http://www.yiiframework.com/doc/api/CHttpSession">session class</a>. Unfortunately session at this stage is undocumented in the guide. Flash data is not part of the session classes but part of the <a href="http://www.yiiframework.com/doc/api/CWebUser#getFlash">Auth package</a>.</p>
<h3>Logging / Debugging</h3>
<p><strong>CodeIgniter</strong> <em>Good</em></p>
<p>CodeIgniter has a basic <a href="http://codeigniter.com/user_guide/general/errors.html">error handling class</a> and a <a href="http://codeigniter.com/user_guide/general/profiling.html">profiler class</a>.</p>
<p><strong>Kohana</strong> <em>Excellent</em></p>
<p>Kohana has a good <a href="http://docs.kohanaphp.com/general/logging">logging class</a> as well as a <a href="http://docs.kohanaphp.com/libraries/profiler">more flexible profiler</a>.</p>
<p><strong>Yii</strong> <em>Excellent</em></p>
<p>Yii has a <a href="http://www.yiiframework.com/doc/guide/topics.logging">logging/profiling class</a> that is just as powerful and flexible as Kohana&#8217;s.</p>
<h3>Templating</h3>
<p>All three frameworks encourage the use of native PHP for templating.</p>
<p><strong>CodeIgniter</strong> <em>alternative syntax available</em></p>
<p>CodeIgniter also provides an alternative <a href="http://codeigniter.com/user_guide/libraries/parser.html">template parser class</a>.</p>
<p><strong>Kohana</strong> <em>alternative syntax available via 3rd party libraries</em></p>
<p>Kohana has no built-in alternative template syntax support. However, you can find some 3rd party ones such as <a href="http://code.google.com/p/temper/">Temper</a>.</p>
<p><strong>Yii</strong> <em>alternative syntax available</em></p>
<p>Yii also provides an <a href="http://www.yiiframework.com/doc/guide/topics.prado">alternative template syntax</a> borrowed from Prado.</p>
<h3>Helpers</h3>
<p>Helpers are usually libraries that used for simple, repetitive tasks.</p>
<p><strong>CodeIgniter</strong> <em>Excellent</em></p>
<p>CodeIgniter offers 21 built-in helpers.</p>
<p><strong>Kohana</strong> <em>Excellent</em></p>
<p>Kohana offers 19 built-in helpers.</p>
<p><strong>Yii</strong> <em>Limited</em></p>
<p>Yii offers 6 built-in helpers.</p>
<h3>Bundled JavaScript Library</h3>
<p>Bundling JavaScript does NOT mean you have to use the bundled JavaScript. In fact, I encourage the use of <a href="http://en.wikipedia.org/wiki/Unobtrusive_JavaScript">unobtrusive JavaScript</a> than using the bundled classes.</p>
<p><strong>CodeIgniter</strong> <em>None</em></p>
<p>CodeIgniter has no bundled JavaScript library.</p>
<p><strong>Kohana</strong> <em>None</em></p>
<p>Kohana has no bundled JavaScript library.</p>
<p><strong>Yii</strong> <em>jQuery</em></p>
<p>Yii has <a href="http://www.jquery.com/">jQuery</a> bundled, and it provides a number of useful classes such as <a href="http://www.yiiframework.com/doc/api/CAutoComplete">auto-complete</a>.</p>
<h3>Web Services</h3>
<p>I recommend <a href="http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/">integrating</a> <a href="http://framework.zend.com/manual/en/">Zend Framework</a> for web service uses.</p>
<p><strong>CodeIgniter</strong> <em>Limited</em></p>
<p>CodeIgniter has an <a href="http://codeigniter.com/user_guide/libraries/xmlrpc.html">XML-RPC class</a>.</p>
<p><strong>Kohana</strong> <em>None</em></p>
<p>Kohana has no built-in support for any web services.</p>
<p><strong>Yii</strong> <em>Limited</em></p>
<p>Yii has <a href="http://www.yiiframework.com/doc/guide/topics.webservice">SOAP support</a>.</p>
<h3>Internationalisation</h3>
<p><strong>CodeIgniter</strong> <em>Limited</em></p>
<p>CodeIgniter provides a basic <a href="http://codeigniter.com/user_guide/libraries/language.html">language class</a>.</p>
<p><strong>Kohana</strong> <em>Fair</em></p>
<p>Kohana provides basic <a href="http://docs.kohanaphp.com/general/i18n">locale and language support</a>.</p>
<p><strong>Yii</strong> <em>Good</em></p>
<p>Yii provides a more complete <a href="http://www.yiiframework.com/doc/guide/topics.i18n">i18n class</a>.</p>
<h3>Unit Testing</h3>
<p>I recommend using <a href="http://www.simpletest.org/">SimpleTest</a> or <a href="http://www.phpunit.de/">PHPUnit</a> for your unit test needs.</p>
<p><strong>CodeIgniter</strong> <em>Limited</em></p>
<p>CodeIgniter has a very basic <a href="http://codeigniter.com/user_guide/libraries/unit_testing.html">unit testing class</a>.</p>
<p><strong>Kohana</strong> <em>None</em></p>
<p>Kohana has no built-in unit testing support in the distributed release version (v2.3.1). However, a <a href="http://dev.kohanaphp.com/browser/trunk/modules/unit_test">unit test module</a> can be found in SVN trunk.</p>
<p><strong>Yii</strong> <em>None</em></p>
<p>Yii has no built-in unit testing support.</p>
<h3>The Verdict</h3>
<p>Verdict from round 1: <em>There is no right or wrong in which framework you use, everyone has his own taste. For me, CodeIgniter’s excellent documentation and Kohana’s strict PHP5 + easy to use are the primary reasons to choose them over say, CakePHP and Symfony. That said, CakePHP, Symfony and other frameworks are all excellent choices depending on your taste and experience. On one hand I envy the Ruby community because they obviously have the de facto framework to work with, on another hand, we have more options hey? :)</em></p>
<p>At this stage I can&#8217;t comment on Yii, but I am <em>very</em> tempted to developing at least one project using it. So far I am reasonably impressed by the features it offers. :)</p>
<p>Do you have anything to say about the frameworks? Found mistakes in the article? Start the discussion in the comments! :)</p>
<p><strong>Update log</strong></p>
<p>[2009-03-03]</p>
<p>- Added Kohana Auth/ACL and DB PDO references.</p>
<p>[2009-03-02]</p>
<p>- Kohana unit test module and template parser reference.<br />
- Wording and other minor tweaks.<br />
- Initial post.</p>

	Tags: <a href="http://www.beyondcoding.com/tag/codeigniter/" title="CodeIgniter" rel="tag">CodeIgniter</a>, <a href="http://www.beyondcoding.com/tag/comparison/" title="comparison" rel="tag">comparison</a>, <a href="http://www.beyondcoding.com/tag/frameworks/" title="Frameworks" rel="tag">Frameworks</a>, <a href="http://www.beyondcoding.com/tag/kohana-php/" title="Kohana" rel="tag">Kohana</a>, <a href="http://www.beyondcoding.com/tag/php-framework/" title="php framework" rel="tag">php framework</a>, <a href="http://www.beyondcoding.com/tag/yii/" title="Yii" rel="tag">Yii</a>, <a href="http://www.beyondcoding.com/tag/zend-framework/" title="Zend Framework" rel="tag">Zend Framework</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/" title="Notes on Choosing a PHP Framework: A Quick Comparison of CodeIgniter and Kohana (February 23, 2008)">Notes on Choosing a PHP Framework: A Quick Comparison of CodeIgniter and Kohana</a> (49)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/" title="Using Zend Framework with CodeIgniter (February 21, 2008)">Using Zend Framework with CodeIgniter</a> (39)</li>
	<li><a href="http://www.beyondcoding.com/2009/03/11/yii-kohana-bridge-updated-full-kohana-flavour-now-added/" title="Yii Kohana Bridge updated: full Kohana flavour now added! (March 11, 2009)">Yii Kohana Bridge updated: full Kohana flavour now added!</a> (2)</li>
	<li><a href="http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/" title="Using Zend Framework with Kohana (November 14, 2008)">Using Zend Framework with Kohana</a> (8)</li>
	<li><a href="http://www.beyondcoding.com/2009/10/29/using-zend-framework-1-8-with-kohana/" title="Using Zend Framework 1.8+ with Kohana (October 29, 2009)">Using Zend Framework 1.8+ with Kohana</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2009/03/02/choosing-a-php-framework-round-2-yii-vs-kohana-vs-codeigniter/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>CodeIgniter &#8211; Loading Models and Database in One Hit</title>
		<link>http://www.beyondcoding.com/2009/02/13/codeigniter-loading-models-and-database-in-one-hit/</link>
		<comments>http://www.beyondcoding.com/2009/02/13/codeigniter-loading-models-and-database-in-one-hit/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 09:39:15 +0000</pubDate>
		<dc:creator>scotti3g</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=91</guid>
		<description><![CDATA[Most models I create need to access the database. You can easily have CI automatically load the database class by setting a 3rd parameter to true when loading your model:
$this-&#62;load-&#62;model('your_model', '', true);
The 2nd parameter, which in this case was left blank, is used if you want to assign a different object name to the model [...]]]></description>
			<content:encoded><![CDATA[<p>Most models I create need to access the database. You can easily have CI automatically load the database class by setting a 3rd parameter to true when loading your model:</p>
<pre class="brush: php;">$this-&gt;load-&gt;model('your_model', '', true);</pre>
<p>The 2nd parameter, which in this case was left blank, is used if you want to assign a different object name to the model &#8211; something that I have never used.</p>
<p>Has anyone ever actually used a different object name? The reason I ask is because it&#8217;s so easy to forget about the 2nd parameter, and sometimes I try to put the true parameter to auto-load the database in the 2nd slot like this:</p>
<pre class="brush: php;">$this-&gt;load-&gt;model('my_model', true); // WRONG!</pre>
<p>Of course, the easiest solution is to autoload the database through the config, but that can be a little inefficient for apps that don&#8217;t use the DB on every page.</p>

	Tags: <a href="http://www.beyondcoding.com/tag/codeigniter/" title="CodeIgniter" rel="tag">CodeIgniter</a>, <a href="http://www.beyondcoding.com/tag/frameworks/" title="Frameworks" rel="tag">Frameworks</a>, <a href="http://www.beyondcoding.com/tag/php/" title="PHP" rel="tag">PHP</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2008/05/26/ruby-on-rails-passenger-modrails-vs-codeigniter-and-kohana/" title="Ruby on Rails, Passenger (ModRails) vs CodeIgniter and Kohana (May 26, 2008)">Ruby on Rails, Passenger (ModRails) vs CodeIgniter and Kohana</a> (15)</li>
	<li><a href="http://www.beyondcoding.com/2009/03/02/choosing-a-php-framework-round-2-yii-vs-kohana-vs-codeigniter/" title="Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter (March 2, 2009)">Choosing a PHP Framework Round 2: Yii vs Kohana vs CodeIgniter</a> (41)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/26/another-codeigniter-book-coming-soon-ish/" title="Another CodeIgniter book coming soon-ish (February 26, 2008)">Another CodeIgniter book coming soon-ish</a> (3)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/" title="Using Zend Framework with CodeIgniter (February 21, 2008)">Using Zend Framework with CodeIgniter</a> (39)</li>
	<li><a href="http://www.beyondcoding.com/2009/01/21/release-kohana-module-authlite-for-user-authentication/" title="Release: [Kohana Module] Authlite, for User Authentication (January 21, 2009)">Release: [Kohana Module] Authlite, for User Authentication</a> (21)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2009/02/13/codeigniter-loading-models-and-database-in-one-hit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Release: [Kohana Module] Authlite, for User Authentication</title>
		<link>http://www.beyondcoding.com/2009/01/21/release-kohana-module-authlite-for-user-authentication/</link>
		<comments>http://www.beyondcoding.com/2009/01/21/release-kohana-module-authlite-for-user-authentication/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 00:14:54 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Layerful]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[ACL]]></category>
		<category><![CDATA[Auth]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Authlite]]></category>
		<category><![CDATA[Authorisation]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[roles]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=170</guid>
		<description><![CDATA[Latest release: v1.2.3
Initially I was going to wait for my Layerful Framework (a transparent layering framework for Kohana) to mature before releasing its bundled modules. However, since this Authlite module can be used independently to Layerful, I am releasing it now.
What is Authlite
Authlite is a user authentication module for Kohana.
What&#8217;s the difference between Authlite and [...]]]></description>
			<content:encoded><![CDATA[<p><em>Latest release: v1.2.3</em></p>
<p>Initially I was going to wait for my <a href="http://www.beyondcoding.com/tag/layerful/">Layerful Framework</a> (a transparent layering framework for Kohana) to mature before releasing its bundled modules. However, since this Authlite module can be used independently to Layerful, I am releasing it now.</p>
<h3>What is Authlite</h3>
<p>Authlite is a user <a href="http://en.wikipedia.org/wiki/Authentication">authentication</a> module for <a href="http://www.kohanaphp.com/">Kohana</a>.</p>
<p><strong>What&#8217;s the difference between Authlite and Auth?</strong></p>
<p>Kohana comes with an official Auth module which does exactly what was described in the last paragraph, so why another module then?</p>
<p>It is because Authlite offers greater flexibilty. Please read the features outlined below to find more.</p>
<h3>Features</h3>
<ul>
<li>Legacy database compatibility</li>
<li>Configurable database columns</li>
<li>Multiple instances of Authlite</li>
<li>Does not enforce user roles</li>
<li>Auth-like syntax and usage</li>
<li>Lightweight</li>
</ul>
<p><span id="more-170"></span></p>
<p><strong><em>Legacy database compatibility</em></strong></p>
<p>One thing that keeps me away from using Kohana&#8217;s Auth module, is that it forces us to use a password hash seed. This is okay for a brand new application, but what about the ones with legacy databases? There are a lot of existing applications use plain MD5 or SHA1 hashes, Auth makes it impossible to use these existing data.</p>
<p>Authlite, on the other hand, does not force developers to use any seeds at all. Like Auth, we can define the encryption method (e.g. md5, sha1) in the config file.</p>
<p><strong><em>Configurable database columns</em></strong></p>
<p>Further than that, the <em>user model</em>, <em>username column</em>, <em>password column</em> and <em>session column</em> are all configurable.</p>
<p><strong><em>Multiple instances of Authlite</em></strong></p>
<p>If your application has more than one user tables, you will struggle to make it work in Auth. In Authlite, simply have one config file for each user object, and config their <em>user model</em>, <em>session key</em> and the other variables accordingly.</p>
<p><strong><em>Does not enforce user roles</em></strong></p>
<p>For simple applications we often do not even want to have roles attached to our user model. In Auth, user role is mandatory, which makes things more complicated than they should be. In Authlite, roles are handled by Kohana framework itself. By using ORM model relationships, roles can be added, removed and modified very easily. A tailoured ACL (<a href="http://en.wikipedia.org/wiki/Access_control_list">Access Control List</a>) solution can be developed in no time.</p>
<p><strong><em>Auth-like syntax and usage</em></strong></p>
<p>Authlite is based on Auth, so if you&#8217;re already familiar with using Auth, you will find Authlite a breeze to use.</p>
<p><strong><em>Lightweight</em></strong></p>
<p>Even if you have never used Auth before, you will find Authlite to be extremely easy to use. :)</p>
<h3>Usage Example</h3>
<pre class="brush: php;">
// Authlite instance
$this-&gt;authlite = Authlite::instance('authlite');

// login check
if ( ! $this-&gt;authlite-&gt;logged_in() &amp;&amp; Router::$method != 'login')
{
	url::redirect(Router::$controller.'/login');
}
else
{
	// assigns the user object
	$this-&gt;user = $this-&gt;authlite-&gt;get_user();
}
</pre>
<h3>Changelog</h3>
<p>v1.2.3 [2009-02-05]</p>
<ul>
<li>login() now supports non-unique usernames</li>
</ul>
<p>v1.2.2 [2009-02-05]</p>
<ul>
<li>added force_login()</li>
</ul>
<p>v1.2.1 [2009-01-27]</p>
<ul>
<li>fixed a logging bug introduced in 1.2</li>
</ul>
<p>v1.2 [2009-01-27]</p>
<ul>
<li>added add_to_ignore() and remove_from_ignore()</li>
<li>code clean up</li>
</ul>
<p><em>Older versions were not tagged with version numbers, you may check out <a href="http://github.com/fredwu/authlite/commits/master/">the commit history on GitHub</a>.</em></p>
<h3>To Do</h3>
<ul>
<li>Add configurable, optional hash seed</li>
</ul>
<p><strong><a href="http://github.com/fredwu/authlite/tree/master">Source Code / Download</a></strong></p>

	Tags: <a href="http://www.beyondcoding.com/tag/acl/" title="ACL" rel="tag">ACL</a>, <a href="http://www.beyondcoding.com/tag/auth/" title="Auth" rel="tag">Auth</a>, <a href="http://www.beyondcoding.com/tag/authentication/" title="Authentication" rel="tag">Authentication</a>, <a href="http://www.beyondcoding.com/tag/authlite/" title="Authlite" rel="tag">Authlite</a>, <a href="http://www.beyondcoding.com/tag/authorisation/" title="Authorisation" rel="tag">Authorisation</a>, <a href="http://www.beyondcoding.com/tag/kohana-php/" title="Kohana" rel="tag">Kohana</a>, <a href="http://www.beyondcoding.com/tag/layerful/" title="Layerful" rel="tag">Layerful</a>, <a href="http://www.beyondcoding.com/tag/module/" title="module" rel="tag">module</a>, <a href="http://www.beyondcoding.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.beyondcoding.com/tag/roles/" title="roles" rel="tag">roles</a>, <a href="http://www.beyondcoding.com/tag/user/" title="user" rel="tag">user</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2009/10/31/authlite-2-0-for-kohana-3-0-alpha-testing/" title="Authlite 2.0 for Kohana 3.0 Alpha Testing (October 31, 2009)">Authlite 2.0 for Kohana 3.0 Alpha Testing</a> (3)</li>
	<li><a href="http://www.beyondcoding.com/2008/05/26/ruby-on-rails-passenger-modrails-vs-codeigniter-and-kohana/" title="Ruby on Rails, Passenger (ModRails) vs CodeIgniter and Kohana (May 26, 2008)">Ruby on Rails, Passenger (ModRails) vs CodeIgniter and Kohana</a> (15)</li>
	<li><a href="http://www.beyondcoding.com/2008/03/17/layerful-screencast-transparent-layer-in-action/" title="Layerful Screencast: Transparent Layer in Action (March 17, 2008)">Layerful Screencast: Transparent Layer in Action</a> (4)</li>
	<li><a href="http://www.beyondcoding.com/2008/03/17/layerful-framework-performance-in-kohana/" title="Layerful Framework Performance in Kohana (March 17, 2008)">Layerful Framework Performance in Kohana</a> (1)</li>
	<li><a href="http://www.beyondcoding.com/2008/03/17/layerful-kohana-zend-framework-easy-user-applications/" title="Layerful + Kohana + Zend Framework = Easy User Applications (March 17, 2008)">Layerful + Kohana + Zend Framework = Easy User Applications</a> (7)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2009/01/21/release-kohana-module-authlite-for-user-authentication/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Comparison: Ruby vs PHP, the Pros</title>
		<link>http://www.beyondcoding.com/2008/12/18/comparison-ruby-vs-php-the-pros/</link>
		<comments>http://www.beyondcoding.com/2008/12/18/comparison-ruby-vs-php-the-pros/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 11:05:28 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=153</guid>
		<description><![CDATA[Just to be clear, this is NOT a fanboyism post nor do I encourage the debate between which language is superior. My personal belief is to use the appropriate tool for appropriate projects.
PHP Pros

Widely available libraries (including PEAR and PECL)
An absolutely outstanding online manual
Relatively easy to learn (can hack together some code without deep understanding [...]]]></description>
			<content:encoded><![CDATA[<p>Just to be clear, this is NOT a fanboyism post nor do I encourage the debate between which language is superior. My personal belief is to use the appropriate tool for appropriate projects.</p>
<p><strong>PHP Pros</strong></p>
<ul>
<li>Widely available libraries (including <a href="http://pear.php.net/">PEAR</a> and <a href="http://pecl.php.net/">PECL</a>)</li>
<li>An absolutely outstanding online manual</li>
<li>Relatively easy to learn (can hack together some code without deep understanding of the language)</li>
<li>Widely used (easy to find clients, etc)</li>
<li>Most if not all control panels have PHP integration</li>
<li>Development packages (XAMPP, WAMP, MAMP, LAMP, etc)</li>
<li>C style syntax (easier transition for people with C/C++/Java background)</li>
<li>Powerful array feature (Ruby&#8217;s equivalent to PHP&#8217;s associative array is Hash, which is not interchangeable with array)</li>
<li>PhpDoc is better than RDoc (this might be because I am too used to PhpDoc)</li>
</ul>
<p><strong>Ruby Pros</strong></p>
<ul>
<li>Fully object oriented</li>
<li><a href="http://rake.rubyforge.org/">Rake</a> (Ruby&#8217;s Make)</li>
<li><a href="http://www.rubygems.org/">RubyGem</a> (Ruby&#8217;s apt/yum)</li>
<li>Code blocks</li>
<li>&#8216;Ghost&#8217; classes</li>
<li>Modules (aka namespace/package, PHP 5.3 will have namespace too, but with much uglier syntax)</li>
<li>lambda functions (PHP 5.3 will have this too, but not as powerful)</li>
<li>Children-aware parent classes (&#8217;inherited&#8217; hook)</li>
<li>Multi-inheritance through Mixins (PHP is single-inheritance)</li>
<li>Ruby 1.9 is unicode friendly (PHP 6 will be)</li>
<li>For what I do, Ruby on Rails > all PHP frameworks combined</li>
<li>Regular Expression built into the language core</li>
</ul>
<p>I am pretty sure there&#8217;s heaps of pros for both PHP and Ruby missing from the list, but at least it gives you a rough idea on what to look for if you are not very familiar with them.</p>
<p>Please share your experience with us too (and I will update this post accordingly). :)</p>

	Tags: <a href="http://www.beyondcoding.com/tag/php/" title="PHP" rel="tag">PHP</a>, <a href="http://www.beyondcoding.com/tag/rails/" title="Rails" rel="tag">Rails</a>, <a href="http://www.beyondcoding.com/tag/ruby/" title="Ruby" rel="tag">Ruby</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2008/05/26/ruby-on-rails-passenger-modrails-vs-codeigniter-and-kohana/" title="Ruby on Rails, Passenger (ModRails) vs CodeIgniter and Kohana (May 26, 2008)">Ruby on Rails, Passenger (ModRails) vs CodeIgniter and Kohana</a> (15)</li>
	<li><a href="http://www.beyondcoding.com/2009/11/10/using-ruby-mysql-gem-with-mamp-1-8-x-on-snow-leopard/" title="Using Ruby MySQL Gem with MAMP 1.8.x on Snow Leopard (November 10, 2009)">Using Ruby MySQL Gem with MAMP 1.8.x on Snow Leopard</a> (5)</li>
	<li><a href="http://www.beyondcoding.com/2009/01/21/release-kohana-module-authlite-for-user-authentication/" title="Release: [Kohana Module] Authlite, for User Authentication (January 21, 2009)">Release: [Kohana Module] Authlite, for User Authentication</a> (21)</li>
	<li><a href="http://www.beyondcoding.com/2008/10/29/php-namespace-this-sux/" title="PHP Namespace &#8211; $this->sux (October 29, 2008)">PHP Namespace &#8211; $this->sux</a> (1)</li>
	<li><a href="http://www.beyondcoding.com/2009/02/13/codeigniter-loading-models-and-database-in-one-hit/" title="CodeIgniter &#8211; Loading Models and Database in One Hit (February 13, 2009)">CodeIgniter &#8211; Loading Models and Database in One Hit</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2008/12/18/comparison-ruby-vs-php-the-pros/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using Zend Framework with Kohana</title>
		<link>http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/</link>
		<comments>http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 05:48:01 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[integration]]></category>

		<guid isPermaLink="false">http://www.beyondcoding.com/?p=111</guid>
		<description><![CDATA[Since my previous post on this topic, Kohana has evolved and changed quite a bit, to the point that the instructions provided are no longer applicable.
So here are the updated instructions for those who would like to integrate Zend Framework into Kohana.
1) Put the &#8216;Zend&#8217; folder in your application&#8217;s &#8216;vendors&#8217; directory.
2) Put the following code [...]]]></description>
			<content:encoded><![CDATA[<p>Since my <a href="http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/">previous post</a> on this topic, Kohana has evolved and changed quite a bit, to the point that the instructions provided are no longer applicable.</p>
<p>So here are the updated instructions for those who would like to integrate Zend Framework into Kohana.</p>
<p>1) Put the &#8216;Zend&#8217; folder in your application&#8217;s &#8216;vendors&#8217; directory.</p>
<p>2) Put the following code into an appropriate place in your application, it could be in the base controller.</p>
<pre class="brush: php;">
if ($path = Kohana::find_file('vendors', 'Zend/Exception'))
{
	ini_set('include_path',
	ini_get('include_path').PATH_SEPARATOR.dirname(dirname($path)));
}
</pre>
<p>3) Instanciate the Zend library with the following code:</p>
<pre class="brush: php;">
require_once 'Zend/Mail.php';
$mail = new Zend_Mail;
</pre>
<p>That&#8217;s it! How simple is that? :)</p>

	Tags: <a href="http://www.beyondcoding.com/tag/integration/" title="integration" rel="tag">integration</a>, <a href="http://www.beyondcoding.com/tag/kohana-php/" title="Kohana" rel="tag">Kohana</a>, <a href="http://www.beyondcoding.com/tag/zend-framework/" title="Zend Framework" rel="tag">Zend Framework</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.beyondcoding.com/2009/10/29/using-zend-framework-1-8-with-kohana/" title="Using Zend Framework 1.8+ with Kohana (October 29, 2009)">Using Zend Framework 1.8+ with Kohana</a> (3)</li>
	<li><a href="http://www.beyondcoding.com/2009/03/11/yii-kohana-bridge-updated-full-kohana-flavour-now-added/" title="Yii Kohana Bridge updated: full Kohana flavour now added! (March 11, 2009)">Yii Kohana Bridge updated: full Kohana flavour now added!</a> (2)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/" title="Using Zend Framework with CodeIgniter (February 21, 2008)">Using Zend Framework with CodeIgniter</a> (39)</li>
	<li><a href="http://www.beyondcoding.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/" title="Notes on Choosing a PHP Framework: A Quick Comparison of CodeIgniter and Kohana (February 23, 2008)">Notes on Choosing a PHP Framework: A Quick Comparison of CodeIgniter and Kohana</a> (49)</li>
	<li><a href="http://www.beyondcoding.com/2008/03/17/layerful-framework-performance-in-kohana/" title="Layerful Framework Performance in Kohana (March 17, 2008)">Layerful Framework Performance in Kohana</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
