<?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"
	>
<channel>
	<title>Comments on: The garbage you can&#8217;t dispose of&#8230;</title>
	<atom:link href="http://www.sitepoint.com/blogs/2004/05/28/the-garbage-you-cant-dispose-of/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2004/05/28/the-garbage-you-cant-dispose-of/</link>
	<description></description>
	<pubDate>Sun, 07 Sep 2008 21:05:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Joshua Eichorn</title>
		<link>http://www.sitepoint.com/blogs/2004/05/28/the-garbage-you-cant-dispose-of/#comment-407</link>
		<dc:creator>Joshua Eichorn</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-407</guid>
		<description>&lt;p&gt;Thats why no one extends from the PEAR class unless they need destructors.  In fact most people try to not even include PEAR.inc until they are actually raising an error.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>Thats why no one extends from the PEAR class unless they need destructors.  In fact most people try to not even include PEAR.inc until they are actually raising an error.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: CT</title>
		<link>http://www.sitepoint.com/blogs/2004/05/28/the-garbage-you-cant-dispose-of/#comment-408</link>
		<dc:creator>CT</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-408</guid>
		<description>&lt;p&gt;I have found that it is very easy to code PEAR compatible classes that are a fraction the size of the PEAR ones by only implementing the methods that I use. Like you I only use isError and raiseError. The improved Error class would probably be under 1k. &lt;/p&gt;

&lt;p&gt;The same with PEAR DB. It is posible to create a class that is under 5k that implements the methods, for a single DB type, used by 90% of PEAR DB users (connect, query, limitQuery, nextId, isError, getMessage and result: fetchRow, numRows, isError, getMessage). Compare that with 34k for DB.php, 30k for DB/mysql.php, and 62k for DB/common.php. The bloat and waste in PEAR is amazing. And lose the wasteful factory pattern. &lt;/p&gt;

&lt;p&gt;The great things about compatable classes is that other programmers already know the interface and you can always switch back later if necessary. Maybe you WACTies can code up a set of PEAR compatable classes that are not so bloated and wasteful. &lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>I have found that it is very easy to code PEAR compatible classes that are a fraction the size of the PEAR ones by only implementing the methods that I use. Like you I only use isError and raiseError. The improved Error class would probably be under 1k. </p>
<p>The same with PEAR DB. It is posible to create a class that is under 5k that implements the methods, for a single DB type, used by 90% of PEAR DB users (connect, query, limitQuery, nextId, isError, getMessage and result: fetchRow, numRows, isError, getMessage). Compare that with 34k for DB.php, 30k for DB/mysql.php, and 62k for DB/common.php. The bloat and waste in PEAR is amazing. And lose the wasteful factory pattern. </p>
<p>The great things about compatable classes is that other programmers already know the interface and you can always switch back later if necessary. Maybe you WACTies can code up a set of PEAR compatable classes that are not so bloated and wasteful. </p>]]></content:encoded>
	</item>
	<item>
		<title>By: HarryF</title>
		<link>http://www.sitepoint.com/blogs/2004/05/28/the-garbage-you-cant-dispose-of/#comment-409</link>
		<dc:creator>HarryF</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-409</guid>
		<description>&lt;p&gt;Hi Joshua&lt;/p&gt;

&lt;p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;
Thats why no one extends from the PEAR class unless they need destructors. In fact most people try to not even include PEAR.inc until they are actually raising an error.&lt;br /&gt;
&lt;/p&gt;&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Yes and no. Seems like, for the most part, PEAR developers avoid it but there are a couple of exceptions which are getting widely used, like DB_Common (all the concrete DB implementations extend this) in PEAR::DB and XML_Parser (alot of the XML related packages extend XML_Parser and thereby extend PEAR). Neither of these seems to actually use the destructor functionality.&lt;/p&gt;

&lt;p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;
Maybe you WACTies can code up a set of PEAR compatable classes that are not so bloated and wasteful.&lt;br /&gt;
&lt;/p&gt;&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Problem then is you get into supporting your own version - more work in other words. Generally it's not critical anyway - this is more a special case where it was.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>Hi Joshua</p>
<p>
<blockquote>
<p>
Thats why no one extends from the PEAR class unless they need destructors. In fact most people try to not even include PEAR.inc until they are actually raising an error.
</p>
</blockquote>
</p><p>Yes and no. Seems like, for the most part, PEAR developers avoid it but there are a couple of exceptions which are getting widely used, like DB_Common (all the concrete DB implementations extend this) in PEAR::DB and XML_Parser (alot of the XML related packages extend XML_Parser and thereby extend PEAR). Neither of these seems to actually use the destructor functionality.</p>
<p>
<blockquote>
<p>
Maybe you WACTies can code up a set of PEAR compatable classes that are not so bloated and wasteful.
</p>
</blockquote>
</p><p>Problem then is you get into supporting your own version - more work in other words. Generally it&#8217;s not critical anyway - this is more a special case where it was.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Knowles</title>
		<link>http://www.sitepoint.com/blogs/2004/05/28/the-garbage-you-cant-dispose-of/#comment-410</link>
		<dc:creator>Alan Knowles</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-410</guid>
		<description>&lt;p&gt;i'm not sure DB_Common is a big issue - you are probably  likely to only use 1 instance of it. XML_Parser is a bit more of a nightmare..&lt;/p&gt;

&lt;p&gt;This is a bug in PEAR - the _PEAR destructor should not be defined.. - hence the array should not be created unless there is a real destructor.... Have you filed a bug :)&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>i&#8217;m not sure DB_Common is a big issue - you are probably  likely to only use 1 instance of it. XML_Parser is a bit more of a nightmare..</p>
<p>This is a bug in PEAR - the _PEAR destructor should not be defined.. - hence the array should not be created unless there is a real destructor&#8230;. Have you filed a bug :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: CT</title>
		<link>http://www.sitepoint.com/blogs/2004/05/28/the-garbage-you-cant-dispose-of/#comment-411</link>
		<dc:creator>CT</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-411</guid>
		<description>&lt;p&gt;"Problem then is you get into supporting your own version - more work in other words. Generally it's not critical anyway - this is more a special case where it was."&lt;/p&gt;

&lt;p&gt;But Wact did its own DAOs. Why not make them PEAR DB API compatable?&lt;/p&gt;

&lt;p&gt;"i'm not sure DB_Common is a big issue - you are probably likely to only use 1 instance of it. XML_Parser is a bit more of a nightmare.."&lt;/p&gt;

&lt;p&gt;They both are. Too many includes; too large includes. Luckily PHP5's PDO and XML will solve both these problems. &lt;br /&gt;
&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>&#8220;Problem then is you get into supporting your own version - more work in other words. Generally it&#8217;s not critical anyway - this is more a special case where it was.&#8221;</p>
<p>But Wact did its own DAOs. Why not make them PEAR DB API compatable?</p>
<p>&#8220;i&#8217;m not sure DB_Common is a big issue - you are probably likely to only use 1 instance of it. XML_Parser is a bit more of a nightmare..&#8221;</p>
<p>They both are. Too many includes; too large includes. Luckily PHP5&#8217;s PDO and XML will solve both these problems. </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Lukas</title>
		<link>http://www.sitepoint.com/blogs/2004/05/28/the-garbage-you-cant-dispose-of/#comment-412</link>
		<dc:creator>Lukas</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-412</guid>
		<description>&lt;p&gt;this bug is fixed now. a reference is now only stored if a PEAR destructor method is defined. So this will only affect those classes that rely on PEAR's destructor emulation.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>this bug is fixed now. a reference is now only stored if a PEAR destructor method is defined. So this will only affect those classes that rely on PEAR&#8217;s destructor emulation.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: HarryF</title>
		<link>http://www.sitepoint.com/blogs/2004/05/28/the-garbage-you-cant-dispose-of/#comment-413</link>
		<dc:creator>HarryF</dc:creator>
		<pubDate>Wed, 31 Dec 1969 19:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-413</guid>
		<description>&lt;p&gt;Hi Lukas,&lt;/p&gt;

&lt;p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;br /&gt;
this bug is fixed now. a reference is now only stored if a PEAR destructor method is defined. So this will only affect those classes that rely on PEAR's destructor emulation.&lt;br /&gt;
&lt;/p&gt;&lt;/blockquote&gt;&lt;/p&gt;

&lt;p&gt;Many thanks for the info and for fixing it.&lt;/p&gt;

&lt;p&gt;All the best,&lt;/p&gt;

&lt;p&gt;Harry&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>Hi Lukas,</p>
<p>
<blockquote>
<p>
this bug is fixed now. a reference is now only stored if a PEAR destructor method is defined. So this will only affect those classes that rely on PEAR&#8217;s destructor emulation.
</p>
</blockquote>
</p><p>Many thanks for the info and for fixing it.</p>
<p>All the best,</p>
<p>Harry</p>]]></content:encoded>
	</item>
</channel>
</rss>
