<?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; Zend Framework</title>
	<atom:link href="http://www.beyondcoding.com/category/php/zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.beyondcoding.com</link>
	<description>Follow us on Twitter: @fredwu and @scotti3g</description>
	<lastBuildDate>Tue, 28 Jun 2011 11:33:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<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 [...]]]></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> (11)</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> (48)</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>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 [...]]]></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> (11)</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> (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> (48)</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> (52)</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>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 [...]]]></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> (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> (48)</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> (52)</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>11</slash:comments>
		</item>
		<item>
		<title>Zend Framework, where do you want to go tomorrow?</title>
		<link>http://www.beyondcoding.com/2008/07/05/zend-framework-where-do-you-want-to-go-tomorrow/</link>
		<comments>http://www.beyondcoding.com/2008/07/05/zend-framework-where-do-you-want-to-go-tomorrow/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 17:05:47 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Lucene]]></category>
		<category><![CDATA[Zend_Search_Lucene]]></category>

		<guid isPermaLink="false">http://thislab.com/?p=41</guid>
		<description><![CDATA[Two weeks ago I started working with Zend Framework at work. I chose to use Zend Framework for one primary reason: Zend. Even though I have plenty of experience with CodeIgniter and Kohana, I simply could not take any risks using them for a rather large project at a company I had just joined. My [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago I started working with Zend Framework at work. I chose to use Zend Framework for one primary reason: Zend. Even though I have plenty of experience with CodeIgniter and Kohana, I simply could not take any risks using them for a rather large project at a company I had just joined.</p>
<p>My experience so far is mixed. Probably because I am so used to the way CodeIgniter and Kohana do things, Zend Framework just appears utterly complicated and difficult to work with (at the beginning).</p>
<p><span id="more-50"></span></p>
<p>When Zend Framework was first announced, the developers have promised us one thing: extreme simplicity. I was &#8216;extremely&#8217; excited, but it turned out that it wasn&#8217;t the case. Ironically, Zend Framework is the most difficult one I have come crossed so far. I mean, as complicated as Symfony is, it has brilliant documentation and an active community to back it up.</p>
<p>Initially I was under the impression that the Zend Framework&#8217;s documentation is excellent, simply because the documentation site looks very informative (quantity wise). After a few days of using it, I realised that I was wrong again. The documentation is often outdated, sometimes inaccurate (might be typo) and most importantly, very difficult to find specific information. The funny thing is, often than not I still need to rely on Google or some other external sources to find necessary information.</p>
<p>Setting up bootstrap and environment file is a boring job. Fortunately there are a couple of good tutorials on the cyber space. The quick start guide on the Zend Wiki however, is lack in both details and elegance.</p>
<p>Apart from the &#8216;Zend&#8217; name, there is another reason why I used it for this particular project: Zend_Search_Lucene. The project we&#8217;re working on involves a collection of product information, therefore a more advanced search engine would be a highly welcomed feature.</p>
<p>Unfortuantely, Zend_Search_Lucene doesn&#8217;t really meet my expectation. First of all is the performance issue. On my local machine at work, a brand new 24&#8243; iMac with 2.8Ghz CPU and 4GB RAM, it takes around 2 seconds to perform a single word search on 5,000 indexed products. Second of all, the search implementation is flawed, at least the default algorithm is. We have noticed quite a number of unrelated search results come at the top of returned result set, and furthermore, the case insensitive search doesn&#8217;t even work. So far I am not really impressed by Zend_Search_Lucene. I have tweaked the implementation quite a bit and still couldn&#8217;t get 100% satisfactory search results, not to mention the extremely disappointing performance.</p>
<p>I think it is silly to call the current Zend Framework version 1.5. I mean, come on, where are the basic features such as a pagination? I am aware of Zym and Zend_Paginator (which could be seen in 1.6 incubator). After wasting several hours researching and working on 3rd party implementations, in the end I gave up and quickly made one myself. I felt very unproductive and unintuitive. Using a framework is supposed to save time, but Zend Framework at its current state, isn&#8217;t doing a good job for me, and it probably won&#8217;t be for a while.</p>
<p>Contrary to the &#8216;awesomeness&#8217; of Rails 2.0 and 2.1, I find Zend Framework extremely &#8216;boring&#8217;. PHP is known for easily make websites and web applications, but it looks like Zend has decided to throw that away and follow Java and .NET.</p>
<p>Oh and I almost forgot to mention the awkward naming conventions that we &#8216;sometimes&#8217; have to follow. For instance, action helpers must follow the &#8216;underscore rule&#8217; otherwise they won&#8217;t function, but some other parts of the framework don&#8217;t necessarily enforce this convention.</p>
<p>At the beginning of this post, I said my experience with the framework is mixed. Well, that&#8217;s true. Even though it has its flaws, limitations and glitches, it still is a highly usable web framework. It is especially useful for specific functions that Zend has provided components for, for example the Zend_PDF component.</p>
<p>I wish Zend Framework was a lot more complete than it currently is. An object relational mapper would be nice. (And again, yes I am aware of the discussion of the possibility of including an ActiveRecord implementation.)</p>
<p>As unimpressed as I am, Zend Framework is still my number 1 choice for medium to large sized projects which require team collaboration. For smaller projects I&#8217;d definitely use Kohana, CodeIgniter or some other smaller players. And for &#8216;fancy&#8217; web applications, Ruby on Rails is where my heart is. :)</p>
<p>And that concludes my rant. :)</p>

	Tags: <a href="http://www.beyondcoding.com/tag/lucene/" title="Lucene" rel="tag">Lucene</a>, <a href="http://www.beyondcoding.com/tag/zend-framework/" title="Zend Framework" rel="tag">Zend Framework</a>, <a href="http://www.beyondcoding.com/tag/zend_search_lucene/" title="Zend_Search_Lucene" rel="tag">Zend_Search_Lucene</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<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> (11)</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> (48)</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/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> (52)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2008/07/05/zend-framework-where-do-you-want-to-go-tomorrow/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Zend Framework 1.5 Released</title>
		<link>http://www.beyondcoding.com/2008/03/18/zend-framework-15-released/</link>
		<comments>http://www.beyondcoding.com/2008/03/18/zend-framework-15-released/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 21:24:24 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://thislab.com/2008/03/18/zend-framework-15-released/</guid>
		<description><![CDATA[And alongside with the new release, they have revamped their website too. The website looks better than before, but&#8230; oops&#8230; that happened when I tried to use the search box: They have now included a quick start guide which is awesome. For some reason though, I still can&#8217;t find a change log on their website. [...]]]></description>
			<content:encoded><![CDATA[<p>And alongside with the new release, they have revamped their website too.</p>
<p>The website looks better than before, but&#8230; oops&#8230; that happened when I tried to use the search box:</p>
<p><img src='http://www.beyondcoding.com/wp-content/uploads/2008/03/zend-framework-website-error.png' alt='Zend Framework website error' /></p>
<p>They have now included a quick start guide which is awesome. For some reason though, I still can&#8217;t find a change log on their website.</p>
<p>In my opinion the new website is still horrible to use, the home page is more confusing than ever (huh? why is the roadmap under &#8216;Give Back&#8217;?). I guess the designer didn&#8217;t read <a href="http://www.sensible.com/">Steve Krug</a>&#8216;s <a href="http://en.wikipedia.org/wiki/Don't_Make_Me_Think">Don&#8217;t Make Me Think</a>. ;)</p>
<p>It feels very &#8216;Microsoft&#8217;y&#8230; fingers crossed&#8230;</p>

	Tags: <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/11/14/using-zend-framework-with-kohana/" title="Using Zend Framework with Kohana (November 14, 2008)">Using Zend Framework with Kohana</a> (11)</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> (48)</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/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> (52)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2008/03/18/zend-framework-15-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Layerful + Kohana + Zend Framework = Easy User Applications</title>
		<link>http://www.beyondcoding.com/2008/03/17/layerful-kohana-zend-framework-easy-user-applications/</link>
		<comments>http://www.beyondcoding.com/2008/03/17/layerful-kohana-zend-framework-easy-user-applications/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 18:22:55 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Layerful]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://thislab.com/2008/03/17/layerful-kohana-zend-framework-easy-user-applications/</guid>
		<description><![CDATA[Here is a brief overview of the system workflow: Of course the actual system will be a lot more complex due to cross-referencing components, modules, libraries, helpers, but you get the idea. :) Tags: Kohana, Layerful, workflow, Zend Framework Related posts Layerful Framework Performance in Kohana (1) Using Zend Framework with Kohana (11) Using Zend [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a brief overview of the system workflow:</p>
<p><img src='http://www.beyondcoding.com/wp-content/uploads/2008/03/application-framework-workflow_525x389shkl.png' alt='Application framework workflow' /></p>
<p>Of course the actual system will be a lot more complex due to cross-referencing components, modules, libraries, helpers, but you get the idea. :)</p>

	Tags: <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/workflow/" title="workflow" rel="tag">workflow</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/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/11/14/using-zend-framework-with-kohana/" title="Using Zend Framework with Kohana (November 14, 2008)">Using Zend Framework with Kohana</a> (11)</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> (48)</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/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> (24)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2008/03/17/layerful-kohana-zend-framework-easy-user-applications/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Notes on Choosing a PHP Framework: A Quick Comparison of CodeIgniter and Kohana</title>
		<link>http://www.beyondcoding.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/</link>
		<comments>http://www.beyondcoding.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 05:40:54 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[php framework]]></category>

		<guid isPermaLink="false">http://thislab.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/</guid>
		<description><![CDATA[Update: There is now a more recent comparison of CodeIgniter 1.7.1, Kohana 2.3.1 and Yii 1.0.3. When I was reading through my subscribed feeds I came across this post: Notes on Choosing a PHP Framework: A Comparison of CakePHP and the Zend Framework by Chad Kieffer. Chad has done a great job comparing the two [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong><a href="http://www.beyondcoding.com/2009/03/02/choosing-a-php-framework-round-2-yii-vs-kohana-vs-codeigniter/">Update: There is now a more recent comparison of CodeIgniter 1.7.1, Kohana 2.3.1 and Yii 1.0.3.</a></strong></em></p>
<p>When I was reading through my subscribed feeds I came across this post: <a href="http://2tbsp.com/node/87">Notes on Choosing a PHP Framework: A Comparison of CakePHP and the Zend Framework</a> by Chad Kieffer.</p>
<p>Chad has done a great job comparing the two frameworks that he&#8217;s interested in. That inspired me to write something up for the frameworks that <em>I</em> prefer and use. :)</p>
<p>I began hunting for PHP frameworks ever since Ruby on Rails hit the street. Coincidentally one of the first PHP frameworks I played with was <a href="http://cakephp.org/">CakePHP</a>. At that time CakePHP&#8217;s documentation was nearly non-existent so I had to seek for an alternative. I did a lot of searches, and researches, and finally I was happy to see <a href="http://codeigniter.com/">CodeIgniter</a>. Its user guide was what impressed me the most, I am sure many of the fellow CI users would agree with me on this one. Because of the excellent documentation, I was able to start working on projects right after I spent a few hours on the user guide! Developing apps on CI was such a breeze! Today, I develop web applications in CodeIgniter, Kohana and <a href="http://framework.zend.com/">Zend Framework</a>. If you want to find out how to use Zend Framework components with CI or Kohana, please read my previous blog entry: <a href="http://thislab.com/2008/02/21/using-zend-framework-with-codeigniter/">Using Zend Framework with CodeIgniter</a>.</p>
<p><span id="more-24"></span></p>
<p>From version 1.2 when I first started coding on CI, to the newly released version 1.6.1 it sure is a long way. CodeIgniter has progressed well and gained many web developers&#8217; trust, despite a few glitches. One of which was the spawn of the fork: <a href="http://kohanaphp.com/">Kohana</a>.</p>
<p>CodeIgniter had some low periods where developers were all focused on pushing out new releases of <a href="http://expressionengine.com/">ExpressionEngine</a>, their commercial blogging/cms product. Some of the users on the CI forum got frustrated because their bug reports and feature requests were ignored. As a result of that, BlueFlame was born, and later renamed to Kohana.</p>
<p>Kohana is relatively unknown to the public. In fact, most of the Kohana users are ex-CI users or users that uses both CI and Kohana (like myself). According to the Kohana homepage and <a href="http://en.wikipedia.org/wiki/KohanaPHP#Differences_Between_Kohana_and_CodeIgniter">Wikipedia</a>, the differences between Kohana and CodeIgniter are:</p>
<ol>
<li><strong>Strict PHP5 OOP.</strong> Offers many benefits: visibility protection, automatic class loading, overloading, interfaces, abstracts, and singletons.</li>
<li>Kohana has joined the GoPHP5 initiative. All releases from 2.2 on will conform with this project.</li>
<li>Continues CodeIgniter design patterns. Anyone who has used CodeIgniter will quickly understand Kohana&#8217;s structure and design patterns.</li>
<li><strong>Community, not company, driven.</strong> Kohana is driven by community discussion, ideas, and code. Kohana developers are from all around the world, each with their own talents. This allows a rapid and flexible development cycle that can respond to bugs and requests within hours, instead of days or months.</li>
<li><strong>GET, POST, COOKIE, and SESSION arrays all work as expected.</strong> Kohana does not limit your access to global data, but offers the same filtering and XSS protection that CodeIgniter does.</li>
<li><strong>Cascading resources, modules, and inheritance.</strong> Controllers, models, libraries, helpers, and views can be loaded from any location within your system, application, or module paths. Configuration options are inherited and can by dynamically overwritten by each application.</li>
<li><strong>No namespace conflicts.</strong> Class suffixes, like _Controller, are used to prevent namespace conflicts. This allows a User&#8217;s controller and Users model to both be loaded at the same time.</li>
<li><strong>True auto-loading of classes.</strong> This includes libraries, controllers, models, and helpers. This is not pre-loading, but true dynamic loading of classes, as they are requested.</li>
<li><strong>Helpers are static classes, not functions.</strong> For example, instead of using form_open(), you would use form::open().</li>
<li><strong>Library drivers and API consistency.</strong> Libraries can use different &#8220;drivers&#8221; to handle different external APIs transparently. For example, multiple session storage options are available (database, cookie, and native), but the same interface is used for all of them. This allows new drivers to be developed for existing libraries, which keeps the API consistent and transparent.</li>
<li><strong>Powerful event handler.</strong> Kohana events can by dynamically added to, replaced, or even removed completely. This allows many changes to Kohana execution process, without modification to existing system code.</li>
</ol>
<p>As you can see, whilst maintaining a certain level of similarity to CodeIgniter, Kohana does offer some advantages (at the same time, some disadvantages). Let&#8217;s take a look at a few quick comparisons. Grading scale: Limited < Fair < Good < Excellent. Please note: 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.</p>
<table border="1" cellspacing="0" cellpadding="5">
<caption>Feature Comparison of CodeIgniter and Kohana</caption>
<tr>
<th>Feature</th>
<th>CodeIgniter 1.6.1</th>
<th>Kohana 2.1.1</th>
<th>Notes</th>
</tr>
<tr>
<td>License</td>
<td><a href="http://codeigniter.com/user_guide/license.html">Apache/BSD-style</a></td>
<td><a href="http://kohanaphp.com/license.html">new BSD</a></td>
<td>Licenses are similar, although Kohana uses the new BSD license which is slightly more flexible than CI&#8217;s modified BSD license.</td>
</tr>
<tr>
<td>PHP compatibility</td>
<td>4.3.2+ and 5</td>
<td>5.1.3+</td>
<td>CodeIgniter supports PHP4 whilst Kohana is a stict PHP5 framework. If you are using PHP5 then Kohana offers more OOP and performance advantages. Start from version 2.2 (yet to be released), Kohana will only support PHP 5.2+.</td>
</tr>
<tr>
<td>Supported Databases</td>
<td>MySQL (4.1+)<br />MySQLi<br />MS SQL<br />PostgreSQL<br />SQLite<br />Oracle<br />ODBC</td>
<td>MySQL<br />PostgreSQL<br />SQLite</td>
<td>CodeIgniter&#8217;s longer history ensures us a more widely available database support options than Kohana, although in the future Kohana is likely to support more databases too.</td>
</tr>
<tr>
<td>Community</td>
<td><a href="http://codeigniter.com/forums/">Forum</a><br /><a href="http://codeigniter.com/wiki/">Wiki</a><br /><a href="http://codeigniter.com/bug_tracker/">Bug Tracker</a></td>
<td><a href="http://forum.kohanaphp.com/">Forum</a><br /><a href="http://trac.kohanaphp.com/">Trac</a><br /><a href="irc://irc.freenode.net/kohana">IRC</a></td>
<td>CodeIgniter obviously has a much larger community and offers a wiki for community members to share tutorials and code snippets. Kohana on the other hand, has a smaller community, however the developers are actively online on the forum and IRC.</td>
</tr>
<tr>
<td>Documentation / User Guide</td>
<td>Excellent</td>
<td>Limited</td>
<td>CodeIgniter is known for its excellent user guide. Kohana is in the process of improving its documentation.</td>
</tr>
<tr>
<td>Tutorial / Sample Availability</td>
<td>Good</td>
<td>Fair</td>
<td>Tutorials are available on both of their forums. CodeIgniter has the advantage of having a wiki for easier navigation. Kohana on the other hand, has a dedicated <a href="http://kohanaphp.com/tutorials.html">tutorial page</a> for some of the tutorials.</td>
</tr>
<tr>
<td>MVC</td>
<td>Strict</td>
<td>Strict</td>
<td>Both frameworks use the same MVC approach.</td>
</tr>
<tr>
<td>Modular / HMVC</td>
<td>Via 3rd party libraries</td>
<td>Built in</td>
<td>Kohana is built with HMVC in mind whilst CodeIgniter has some 3rd party libraries such as <a href="http://codeigniter.com/forums/viewthread/65749/">Matchbox</a> and <a href="http://codeigniter.com/forums/viewthread/72123/">Modular HMVC</a> to accomplish the same effect.</td>
</tr>
<tr>
<td>Conventions</td>
<td>Flexible</td>
<td>Flexible</td>
<td>Unlike CakePHP, both of the frameworks offer flexible convensions. There are some defaults but most of them can be overwritten.</td>
</tr>
<tr>
<td>Configuration</td>
<td>PHP files</td>
<td>PHP files</td>
<td>In my opinion Kohana is more configurable than CodeIgniter yet it is simpler (less clustered) to do so! Most of the Kohana configuration files are stored in the system folder, you only copy and paste the ones you actually need to modify, and modify them accordingly. CodeIgniter&#8217;s config files are all stored in the application folder.</td>
</tr>
<tr>
<td>Database Abstraction</td>
<td>Modified ActiveRecord</td>
<td>Modified ActiveRecord<br />ORM (optional)</td>
<td>Both frameworks use the modified ActiveRecord pattern. Kohana has an optional ORM module. CodeIgniter has some ORM and Rails-style ActiveRecord implementation avaliable via 3rd party libraries.</td>
</tr>
<tr>
<td>ACL</td>
<td>Via 3rd party libraries</td>
<td>Auth library (optional)</td>
<td>Neither of the frameworks forces you to use a specific ACL mechanism. CodeIgniter does not have one built in, and Kohana has one available as an optional module.</td>
</tr>
<tr>
<td>Validation</td>
<td>Good</td>
<td>Good</td>
<td>Both frameworks offer a good built in validtion layer. Kohana 2.2 is planned to have some significant improvements for the validation library.</td>
</tr>
<tr>
<td>Caching</td>
<td>Limited</td>
<td>Fair</td>
<td>In my opinion both of the caching features are limited. Kohana offers a slightly more useful cache library that supports file, SQLite, APC, eAccelerator, memcache, and Xcache based caching, with tag support.</td>
</tr>
<tr>
<td>Session</td>
<td>Good</td>
<td>Excellent</td>
<td>CodeIgniter 1.6 has improved its session library, but it&#8217;s still inferior to Kohana&#8217;s implementation. Kohana&#8217;s session library supports both encryption and storing session data in database.</td>
</tr>
<tr>
<td>Logging / Debugging</td>
<td>Good</td>
<td>Excellent</td>
<td>Both frameworks offer very good logging and debugging mechanisms. Kohana is a little bit ahead thanks to PHP5&#8242;s native Exception class and its powerful event handlers.</td>
</tr>
<tr>
<td>Templating</td>
<td>Native PHP</td>
<td>Native PHP</td>
<td>Templating is *very* easy for both frameworks. If you can skin WordPress, then you&#8217;d have no problems at all skinning CI or Kohana. If you want though, you can still incorporate one of the 3rd party templating solutions such as Smarty.</td>
</tr>
<tr>
<td>Helpers</td>
<td>Good</td>
<td>Good</td>
<td>Helpers are usually libraries that used for simple, repetitive tasks. Both frameworks offer a wide range of helpers for handling forms, URLs and dates, etc.</td>
</tr>
<tr>
<td>JavaScript / AJAX</td>
<td>N/A</td>
<td>N/A</td>
<td>Both frameworks respect your choice of JavaScript / AJAX frameworks. Unlike CakePHP and Ruby on Rails, they don&#8217;t have built-in helpers for any of the JavaScript libraries. This offers more flexibility as well as the use of unobtrusive JavaScript.</td>
</tr>
<tr>
<td>Web Services</td>
<td>Fair</td>
<td>Fair</td>
<td>I could be wrong but I don&#8217;t think either framework supports (or at least encourages) RESTful design&#8230;</td>
</tr>
<tr>
<td>Localization</td>
<td>Limited</td>
<td>Good</td>
<td>CodeIgniter has limited i18n support whilst Kohana offers a bit more (timezone / full UTF8 layer, etc).</td>
</tr>
<tr>
<td>Unit Testing</td>
<td>Limited</td>
<td>None *</td>
<td>CodeIgniter&#8217;s built in unit testing class is very limited. * Kohana as of version 2.1.1 does not have a unit testing class, however it is planned for version 2.2.</td>
</tr>
</table>
<h3>The Verdict</h3>
<p>I had a hard time deciding which of these two I use. In the end, I chose to use both. Why? Because they each have its advantages and disadvantages.</p>
<p>CodeIgniter is great for small to medium sized projects, especially good for legacy servers which have PHP4 installed. The fantastic user guide made coding in CI very efficient.</p>
<p>Kohana is probably better for larger sized projects as well as projects that need more flexible extensions. PHP5 offers better (proper) OOP support as the foundation, plus Kohana&#8217;s several better feature implementation make it a strong competitor to its predecessor.</p>
<p>There is no right or wrong for which framework you use, everyone has its own taste. For me, CodeIgniter&#8217;s excellent documentation and Kohana&#8217;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? :)</p>
<p>Feel free to share your opinion and experiences!</p>
<p><strong>Update log:</strong></p>
<p>[2008-02-23]<br />
 &#8211; Removed MS SQL support for Kohana (confirmed by <a href="http://forum.kohanaphp.com/account.php?u=1">Shadowhand</a>)<br />
 &#8211; Updated cache driver description for Kohana (confirmed by Shadowhand)<br />
 &#8211; Edited unicode / UTF8 description for Kohana (confirmed by Shadowhand)</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/framework/" title="framework" rel="tag">framework</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/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/21/using-zend-framework-with-codeigniter/" title="Using Zend Framework with CodeIgniter (February 21, 2008)">Using Zend Framework with CodeIgniter</a> (48)</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> (63)</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> (16)</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/16/kohana-extended-transparently/" title="Kohana extended, transparently :) (March 16, 2008)">Kohana extended, transparently :)</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2008/02/23/notes-on-choosing-a-php-framework-a-quick-comparison-of-codeigniter-and-kohana/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>Using Zend Framework with CodeIgniter</title>
		<link>http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/</link>
		<comments>http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 19:43:08 +0000</pubDate>
		<dc:creator>Fred Wu</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[php framework]]></category>

		<guid isPermaLink="false">http://thislab.com/2008/02/21/using-zend-framework-with-codeigniter/</guid>
		<description><![CDATA[If you ever wanted to integrate CodeIgniter and Zend Framework, you might have come across this tutorial by Daniel Vecchiato. Whilst Daniel has done a great job demonstrating the possibility of using the two frameworks together, concerns have been made: do we actually need to use hooks? As I understand it, hooks are used to [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever wanted to integrate CodeIgniter and Zend Framework, you might have come across <a href="http://www.4webby.com/freakauth/tutorials/using-zend-framework-components-in-code-igniter">this tutorial</a> by Daniel Vecchiato.</p>
<p>Whilst Daniel has done a great job demonstrating the possibility of using the two frameworks together, concerns have been made: do we actually need to use hooks?</p>
<p>As I understand it, hooks are used to extend the <strong>core</strong> functionalities of CodeIgniter (as explained in the <a href="http://codeigniter.com/user_guide/general/hooks.html">user guide</a>). Obviously Zend Framework and CodeIgniter are two different systems and there is no intention for us to <strong>extend</strong> CodeIgniter&#8217;s core functionality with Zend Framework.</p>
<p>Using hooks can be dangerous as it&#8217;s system-wide, and it modifies the system behaviour.</p>
<p>What I have done is to simply use CodeIgniter&#8217;s library structure to load the Zend Framework resources. Below is the tutorial.</p>
<p><span id="more-23"></span></p>
<p>Assuming you already have CodeIgniter installed. If not please refer to the <a href="http://codeigniter.com/user_guide/installation/index.html">user guide</a> for installation.</p>
<ol>
<li>Download Zend Framework from the <a href="http://framework.zend.com/">official website</a>.</li>
<li>Unzip the Zend Framework package, and copy the <em>Zend</em> folder (under <em>Library</em>) to your CodeIgniter installation&#8217;s <em>application/libraries/</em>. You can actually place the folder anywhere, but remember to alter the script accordingly (read the comments in the script!).</li>
<li>Place the library script (provided at the end of the post) in <em>application/libraries/</em></li>
<li>Done! That&#8217;s all you need to do. Now, let us see an example of using the library.</li>
</ol>
<h3>Usage Sample</h3>
<pre class="brush: php;">
&lt;?php

class Welcome extends Controller {

	function Welcome()
	{
		parent::Controller();
	}

	function index()
	{
		$this-&gt;load-&gt;library('zend', 'Zend/Service/Flickr');
		// newer versions of CodeIgniter have updated its loader API slightly,
		// we can no longer pass parameters to our library constructors
		// therefore, we should load the library like this:
		// $this-&gt;load-&gt;library('zend');
		// $this-&gt;zend-&gt;load('Zend/Service/Flickr');

		$flickr = new Zend_Service_Flickr('YOUR_FLICKR_API_KEY');

		$results = $flickr-&gt;tagSearch('php');
		foreach ($results as $result)
		{
			echo $result-&gt;title . '&lt;br /&gt;';
		}
		//$this-&gt;load-&gt;view('welcome_message');
	}
}
?&gt;
</pre>
<h3>Library Script</h3>
<p>Copy the code and paste it to a new file called <strong><em>Zend.php</em></strong> in <em>application/libraries/</em>.</p>
<pre class="brush: php;">
&lt;?php if (!defined('BASEPATH')) {exit('No direct script access allowed');}

/**
 * Zend Framework Loader
 *
 * Put the 'Zend' folder (unpacked from the Zend Framework package, under 'Library')
 * in CI installation's 'application/libraries' folder
 * You can put it elsewhere but remember to alter the script accordingly
 *
 * Usage:
 *   1) $this-&gt;load-&gt;library('zend', 'Zend/Package/Name');
 *   or
 *   2) $this-&gt;load-&gt;library('zend');
 *      then $this-&gt;zend-&gt;load('Zend/Package/Name');
 *
 * * the second usage is useful for autoloading the Zend Framework library
 * * Zend/Package/Name does not need the '.php' at the end
 */
class CI_Zend
{
	/**
	 * Constructor
	 *
	 * @param	string $class class name
	 */
	function __construct($class = NULL)
	{
		// include path for Zend Framework
		// alter it accordingly if you have put the 'Zend' folder elsewhere
		ini_set('include_path',
		ini_get('include_path') . PATH_SEPARATOR . APPPATH . 'libraries');

		if ($class)
		{
			require_once (string) $class . EXT;
			log_message('debug', &quot;Zend Class $class Loaded&quot;);
		}
		else
		{
			log_message('debug', &quot;Zend Class Initialized&quot;);
		}
	}

	/**
	 * Zend Class Loader
	 *
	 * @param	string $class class name
	 */
	function load($class)
	{
		require_once (string) $class . EXT;
		log_message('debug', &quot;Zend Class $class Loaded&quot;);
	}
}

?&gt;
</pre>
<p>Happy coding! Oh and don&#8217;t forget, Zend Framework is PHP 5 only, so it won&#8217;t work on your PHP 4 installation.</p>
<h3>Update: Using it with Kohana</h3>
<h4>Update: The following instructions are deprecated, please follow the <a href="http://www.beyondcoding.com/2008/11/14/using-zend-framework-with-kohana/">updated one here</a>.</h4>
<p>Even though <a href="http://www.kohanaphp.com/">Kohana</a> has the <a href="http://doc.kohanaphp.com/general/libraries">ability</a> to load vendor classes, I still find it useful to use the library approach so that loading Zend Framework libraries will be transparent. :)</p>
<p>Usage is exactly the same as in CodeIgniter.</p>
<pre class="brush: php;">
&lt;?php defined('SYSPATH') or die('No direct script access.');

/**
 * Zend Framework Loader
 *
 * Put the 'Zend' folder (unpacked from the Zend Framework package, under 'Library')
 * in CI installation's 'application/libraries' folder
 * You can put it elsewhere but remember to alter the script accordingly
 *
 * Usage:
 *   1) $this-&gt;load-&gt;library('zend', 'Zend/Package/Name');
 *   or
 *   2) $this-&gt;load-&gt;library('zend');
 *      then $this-&gt;zend-&gt;load('Zend/Package/Name');
 *
 * * the second usage is useful for autoloading the Zend Framework library
 * * Zend/Package/Name does not need the '.php' at the end
 */
class Zend
{
	/**
	 * Constructor
	 *
	 * @param	string $class class name
	 */
	function __construct($class = NULL)
	{
		// include path for Zend Framework
		// alter it accordingly if you have put the 'Zend' folder elsewhere
		ini_set('include_path',
		ini_get('include_path') . PATH_SEPARATOR . APPPATH . 'libraries');

		if ($class)
		{
			require_once (string) $class . EXT;
			Log::add('debug', &quot;Zend Class $class Loaded&quot;);
		}
		else
		{
			Log::add('debug', &quot;Zend Class Initialized&quot;);
		}
	}

	/**
	 * Zend Class Loader
	 *
	 * @param	string $class class name
	 */
	function load($class)
	{
		require_once (string) $class . EXT;
		Log::add('debug', &quot;Zend Class $class Loaded&quot;);
	}
}

?&gt;
</pre>

	Tags: <a href="http://www.beyondcoding.com/tag/codeigniter/" title="CodeIgniter" rel="tag">CodeIgniter</a>, <a href="http://www.beyondcoding.com/tag/framework/" title="framework" rel="tag">framework</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/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> (52)</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> (63)</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> (16)</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/16/kohana-extended-transparently/" title="Kohana extended, transparently :) (March 16, 2008)">Kohana extended, transparently :)</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/feed/</wfw:commentRss>
		<slash:comments>48</slash:comments>
		</item>
	</channel>
</rss>

