<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Autoloading in Zend Framework &#8211; how (not) to do it</title>
	<atom:link href="http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/</link>
	<description>Technical and business stuff for the open-minded</description>
	<lastBuildDate>Thu, 15 Dec 2011 03:39:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Zend Framework Autoloading &#124; Kerek egy ég alatt</title>
		<link>http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/comment-page-1/#comment-787</link>
		<dc:creator>Zend Framework Autoloading &#124; Kerek egy ég alatt</dc:creator>
		<pubDate>Sun, 20 Nov 2011 21:48:09 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.wimgodden.be/?p=16#comment-787</guid>
		<description>[...] Autoloading in Zend Framework – how (not) to do it       Kategória: Zend Framework &#124; A közvetlen link.    &#8592; Ajax betöltés ikon generátor Thumbnail generation at Zend Framework &#8594; [...]</description>
		<content:encoded><![CDATA[<p>[...] Autoloading in Zend Framework – how (not) to do it       Kategória: Zend Framework | A közvetlen link.    &larr; Ajax betöltés ikon generátor Thumbnail generation at Zend Framework &rarr; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/comment-page-1/#comment-255</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Thu, 22 Jul 2010 11:25:27 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.wimgodden.be/?p=16#comment-255</guid>
		<description>Zend auto loader is the biggest heap of crap I think that exists in the Zend Framework, possibly the PHP community at large.

It&#039;s confusing, illogical, inconsistent and a bugger to setup. At least before with includes everywhere problems were easy to trace!

Why can I have a controller in a module load fine with Module_Controller and then when I try and extend another controller it can&#039;t bloody find it?

Not being able to auto load models from modules easily is a joke.</description>
		<content:encoded><![CDATA[<p>Zend auto loader is the biggest heap of crap I think that exists in the Zend Framework, possibly the PHP community at large.</p>
<p>It&#8217;s confusing, illogical, inconsistent and a bugger to setup. At least before with includes everywhere problems were easy to trace!</p>
<p>Why can I have a controller in a module load fine with Module_Controller and then when I try and extend another controller it can&#8217;t bloody find it?</p>
<p>Not being able to auto load models from modules easily is a joke.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wimg</title>
		<link>http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/comment-page-1/#comment-49</link>
		<dc:creator>wimg</dc:creator>
		<pubDate>Mon, 27 Jul 2009 18:54:11 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.wimgodden.be/?p=16#comment-49</guid>
		<description>Feel free to do so !</description>
		<content:encoded><![CDATA[<p>Feel free to do so !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricardo</title>
		<link>http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/comment-page-1/#comment-48</link>
		<dc:creator>Ricardo</dc:creator>
		<pubDate>Mon, 27 Jul 2009 18:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.wimgodden.be/?p=16#comment-48</guid>
		<description>I have founded your article very intresting, i waswondering if you dont mind if i translate this one to spanish, and put it on my website with a link to yours.
thanks in advance whatever your answear is!
ps: sorry about my english!</description>
		<content:encoded><![CDATA[<p>I have founded your article very intresting, i waswondering if you dont mind if i translate this one to spanish, and put it on my website with a link to yours.<br />
thanks in advance whatever your answear is!<br />
ps: sorry about my english!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wimg</title>
		<link>http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/comment-page-1/#comment-38</link>
		<dc:creator>wimg</dc:creator>
		<pubDate>Fri, 10 Jul 2009 13:56:12 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.wimgodden.be/?p=16#comment-38</guid>
		<description>If you don&#039;t have any modules, but just 1 model directory, all you need to do is set the include_path to include that directory. You can do that in .htaccess or your virtualhost configuration.
The Zend_Loader will automatically load the model from that directory when you instantiate a new object of the class.

If you&#039;re using multiple modules, use Option 5 of the article. It&#039;s the most flexible and dynamic solution.</description>
		<content:encoded><![CDATA[<p>If you don&#8217;t have any modules, but just 1 model directory, all you need to do is set the include_path to include that directory. You can do that in .htaccess or your virtualhost configuration.<br />
The Zend_Loader will automatically load the model from that directory when you instantiate a new object of the class.</p>
<p>If you&#8217;re using multiple modules, use Option 5 of the article. It&#8217;s the most flexible and dynamic solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: egeske</title>
		<link>http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/comment-page-1/#comment-35</link>
		<dc:creator>egeske</dc:creator>
		<pubDate>Thu, 09 Jul 2009 14:24:50 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.wimgodden.be/?p=16#comment-35</guid>
		<description>So.... to close.   What is the best way to do this?  I am new to zend framework and trying to understand the loader class.

I am using Zend_Loader_Autoloader::getInstance();   

How could I assign my models folder so I can just call the classes?</description>
		<content:encoded><![CDATA[<p>So&#8230;. to close.   What is the best way to do this?  I am new to zend framework and trying to understand the loader class.</p>
<p>I am using Zend_Loader_Autoloader::getInstance();   </p>
<p>How could I assign my models folder so I can just call the classes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wimg</title>
		<link>http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/comment-page-1/#comment-4</link>
		<dc:creator>wimg</dc:creator>
		<pubDate>Fri, 09 Jan 2009 16:26:35 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.wimgodden.be/?p=16#comment-4</guid>
		<description>I&#039;m afraid I have to disagree there. Regardless of whether you use a bytecode caching system, option 1 is not recommended.
For starters, if you use option 1 with Zend Framework, you will have to include every single model in your bootstrap (and theoretically, every single Zend Framework class, but let&#039;s skip that assumption). That means loading massive amounts of code (agreed, it&#039;s bytecode, but nevertheless it&#039;s still code) that will never get executed.
For example : I have a Zend Framework application with 11 modules, each holding several models, together holding over 6.000 lines of PHP code. Even when using eAccelerator that means a huge memory footprint, which is being loaded every single time someone accesses the site.
By using dynamic loading, you can still use bytecode caching and load only those models required for the specific task. This means performance gain and lower memory footprint, meaning your system can take a higher load.
You mention increased maintainability when using option 1. However, every single change within your project needs to be reflected into your bootstrap.
On the other hand, when using autoloading, you don&#039;t have to worry about anything, meaning zero maintainability effort.

It gets even worse when you integrate things like Propel... if you need to start including all those classes as well, the memory footprint becomes massive.

Also, you might want to take a look at http://framework.zend.com/wiki/display/ZFDEV/Performance+-+Requiring+the+Autoloader</description>
		<content:encoded><![CDATA[<p>I&#8217;m afraid I have to disagree there. Regardless of whether you use a bytecode caching system, option 1 is not recommended.<br />
For starters, if you use option 1 with Zend Framework, you will have to include every single model in your bootstrap (and theoretically, every single Zend Framework class, but let&#8217;s skip that assumption). That means loading massive amounts of code (agreed, it&#8217;s bytecode, but nevertheless it&#8217;s still code) that will never get executed.<br />
For example : I have a Zend Framework application with 11 modules, each holding several models, together holding over 6.000 lines of PHP code. Even when using eAccelerator that means a huge memory footprint, which is being loaded every single time someone accesses the site.<br />
By using dynamic loading, you can still use bytecode caching and load only those models required for the specific task. This means performance gain and lower memory footprint, meaning your system can take a higher load.<br />
You mention increased maintainability when using option 1. However, every single change within your project needs to be reflected into your bootstrap.<br />
On the other hand, when using autoloading, you don&#8217;t have to worry about anything, meaning zero maintainability effort.</p>
<p>It gets even worse when you integrate things like Propel&#8230; if you need to start including all those classes as well, the memory footprint becomes massive.</p>
<p>Also, you might want to take a look at <a href="http://framework.zend.com/wiki/display/ZFDEV/Performance+-+Requiring+the+Autoloader" rel="nofollow">http://framework.zend.com/wiki/display/ZFDEV/Performance+-+Requiring+the+Autoloader</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Allaert</title>
		<link>http://techblog.wimgodden.be/2008/12/21/autoloading-in-zend-framework-how-not-to-do-it/comment-page-1/#comment-3</link>
		<dc:creator>Patrick Allaert</dc:creator>
		<pubDate>Fri, 09 Jan 2009 15:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.wimgodden.be/?p=16#comment-3</guid>
		<description>Hi Wim,

I think you didn&#039;t take into account the possibility to have a bytecode cache mechanism (which I strongly recommend in production) such as APC, eAccelerator, Zend accelerator,... Those bytecode cache mechanism change drastically the way (include&#124;require)(_once) works!
Having such a configuration and not using the *_once() version to include files turns &quot;Option 1&quot; as the best one (performance and maintainability-wise).

Regards</description>
		<content:encoded><![CDATA[<p>Hi Wim,</p>
<p>I think you didn&#8217;t take into account the possibility to have a bytecode cache mechanism (which I strongly recommend in production) such as APC, eAccelerator, Zend accelerator,&#8230; Those bytecode cache mechanism change drastically the way (include|require)(_once) works!<br />
Having such a configuration and not using the *_once() version to include files turns &#8220;Option 1&#8243; as the best one (performance and maintainability-wise).</p>
<p>Regards</p>
]]></content:encoded>
	</item>
</channel>
</rss>

