<?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>Alexey Zakhlestins blog &#187; eZComponents</title>
	<atom:link href="http://blog.milkfarmsoft.com/category/computers/programming/php/ezcomponents/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.milkfarmsoft.com</link>
	<description>Programming for Mac and Web</description>
	<lastBuildDate>Sun, 13 Jun 2010 15:42:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
	<atom:link rel="hub" href="http://superfeedr.com/hubbub" />
			<item>
		<title>PHP+SCGI part 2: problem with eZComponents</title>
		<link>http://blog.milkfarmsoft.com/2007/06/phpscgi-part-2-problem-with-ezcomponents/</link>
		<comments>http://blog.milkfarmsoft.com/2007/06/phpscgi-part-2-problem-with-ezcomponents/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 09:58:39 +0000</pubDate>
		<dc:creator>indeyets</dc:creator>
				<category><![CDATA[eZComponents]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scgi]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=52</guid>
		<description><![CDATA[<p>Thanks for all the comments to my &#8220;Application Server in PHP? wellâ€¦ Yes!&#8221; posting. I was really amazed to see that many interested people. Your support gives me a great motivation. Thanks, guys!  </p>
<p>I am currently thinking about proper object hierarchy and, actually, I changed it completely 3 times already in my thoughts. I finally <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.milkfarmsoft.com/2007/06/phpscgi-part-2-problem-with-ezcomponents/">PHP+SCGI part 2: problem with eZComponents</a></span>]]></description>
			<content:encoded><![CDATA[<p>Thanks for all the comments to my <a href="http://blog.milkfarmsoft.com/?p=51">&#8220;Application Server in PHP? wellâ€¦ Yes!&#8221; posting</a>. I was really amazed to see that many interested people. Your support gives me a great motivation. Thanks, guys! <img src='http://blog.milkfarmsoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I am currently thinking about proper object hierarchy and, actually, I changed it completely 3 times already in my thoughts. I finally &#8220;see the light&#8221;â„¢ and will implement it on a weekend. I think about converting SCGI-part to a simple &#8220;driver&#8221; and move all http-related stuff to a separate driver-agnostic set of classes (Probably, that would be a class per kind of http-request and a class per kind of http-response). This way, I would be able to implement FastCGI as anther driver without altering applications. If you have any better ideas â€” let me know.</p>
<p>For now, I made another example application. This time, with some benchmarking in thoughts. <a href="http://appserver-in-php.googlecode.com/svn/trunk/examples/scgi-ezc/">Here it is</a>.</p>
<p>This example supposes, that you have <a href="http://ez.no/ezcomponents">ezcomponents</a> folder on the one level with the svn-checked-out <a href="http://appserver-in-php.googlecode.com/svn/trunk/">&#8220;trunk&#8221; of my googlecode-project</a>. And, you can start &#8220;runner.php&#8221; both as SCGI-server (using CLI) or as usual mod_php/(fast)cgi application. The idea was to see if there will be any noticeable speed difference between approaches. Butâ€¦ it showed the other thing <img src='http://blog.milkfarmsoft.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I used <a href="http://ez.no/doc/components/view/latest/(file)/classtrees_Graph.html">ezcGraph</a> in my application and noticed a serious memory-leaking. Obviously, ezcGraph has the <a href="http://blog.milkfarmsoft.com/?p=51#comment-5979">forementioned in comments</a> problem with cycled references. The solution is, to add some kind of &#8220;<strong>public function clean()</strong>&#8221; method, which would remove references in the object, and objects which were auto-generated by it, so it would later be cleaned-up by a garbage-collector. I implemented a quick-fix locally and it did help to some degreee, but I definitely missed some references, so it still leaked. I think that someone who knows internals of eZComponents better should do it.</p>
<p><a href="http://www.derickrethans.nl/">Derick</a>? Anyone? Can this be done?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.milkfarmsoft.com/2007/06/phpscgi-part-2-problem-with-ezcomponents/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
