<?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: Alternatives of PHP ?</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Wed, 10 Mar 2010 23:22:55 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: NTDOC</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-19856</link>
		<dc:creator>NTDOC</dc:creator>
		<pubDate>Tue, 05 Dec 2006 09:18:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-19856</guid>
		<description>@Harry Fuecks

Perl is great but with so many dead links to what were booming sites before is sad.  Perhaps a bad perception on my part but it seems to me that a lot of the open source projects seem to lack the wealth of community support they once had years ago.</description>
		<content:encoded><![CDATA[<p>@Harry Fuecks</p>
<p>Perl is great but with so many dead links to what were booming sites before is sad.  Perhaps a bad perception on my part but it seems to me that a lot of the open source projects seem to lack the wealth of community support they once had years ago.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rene L.</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2715</link>
		<dc:creator>Rene L.</dc:creator>
		<pubDate>Fri, 22 Sep 2006 14:31:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2715</guid>
		<description>Learn how easy it is to use a SAX parser (PEAR::XML_Parser) which allows to quickly process large XML documents without loading it into RAM
http://www.schst.net/index.php?__path=articles.xml-parser</description>
		<content:encoded><![CDATA[<p>Learn how easy it is to use a SAX parser (PEAR::XML_Parser) which allows to quickly process large XML documents without loading it into RAM<br />
<a href="http://www.schst.net/index.php?__path=articles.xml-parser" rel="nofollow">http://www.schst.net/index.php?__path=articles.xml-parser</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2574</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Sat, 16 Sep 2006 06:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2574</guid>
		<description>C# has the MySql Connector/NET and is reasonably fast and predictable. The Mono project has a page on the topic with a quick example - http://mono-project.com/MySQL there is also the native System.Xml classes for handling Xml internally.</description>
		<content:encoded><![CDATA[<p>C# has the MySql Connector/NET and is reasonably fast and predictable. The Mono project has a page on the topic with a quick example &#8211; <a href="http://mono-project.com/MySQL" rel="nofollow">http://mono-project.com/MySQL</a> there is also the native System.Xml classes for handling Xml internally.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2496</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Thu, 14 Sep 2006 16:00:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2496</guid>
		<description>Harry, 

No it is not like 1GB XML file, but more like 100 10MB XML Files, which would not be the problem if memory would not be leaked by PHP.</description>
		<content:encoded><![CDATA[<p>Harry, </p>
<p>No it is not like 1GB XML file, but more like 100 10MB XML Files, which would not be the problem if memory would not be leaked by PHP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry Fuecks</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2494</link>
		<dc:creator>Harry Fuecks</dc:creator>
		<pubDate>Thu, 14 Sep 2006 15:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2494</guid>
		<description>As it goes PHP isn&#039;t too bad at looping over lists of things, if that&#039;s what you&#039;re doing. But if your XML file is really that big, you&#039;ll have problems no matter what language you use.

Some random thoughts;

Stream the XML - using something like a SAX API (not DOM which loads the entire document)

If you need to do some kind of calculation based on the entire document i.e. you need to see all the data to be able to produce the final result, you might consider storing intermediate values to file. At the far end of this way of thinking is Google&#039;s MapReduce (http://en.wikipedia.org/wiki/MapReduce) - distribute the processing. The livejournal guys have something heading towards a Perl implementation of the same - see links here: http://del.icio.us/harryf/gearman . Another angle would be to consider an MMap based solution - in Perl check out http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html for example

One advantage of Perl is it&#039;s attracted the type of developers that like to solve this kind of problem (unlike PHP). Browse CPAN - Perl&#039;s XML tools a also good. And demand Unicode support (some like Perl have it... other languages don&#039;t) ;)



http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html</description>
		<content:encoded><![CDATA[<p>As it goes PHP isn&#8217;t too bad at looping over lists of things, if that&#8217;s what you&#8217;re doing. But if your XML file is really that big, you&#8217;ll have problems no matter what language you use.</p>
<p>Some random thoughts;</p>
<p>Stream the XML &#8211; using something like a SAX API (not DOM which loads the entire document)</p>
<p>If you need to do some kind of calculation based on the entire document i.e. you need to see all the data to be able to produce the final result, you might consider storing intermediate values to file. At the far end of this way of thinking is Google&#8217;s MapReduce (<a href="http://en.wikipedia.org/wiki/MapReduce" rel="nofollow">http://en.wikipedia.org/wiki/MapReduce</a>) &#8211; distribute the processing. The livejournal guys have something heading towards a Perl implementation of the same &#8211; see links here: <a href="http://del.icio.us/harryf/gearman" rel="nofollow">http://del.icio.us/harryf/gearman</a> . Another angle would be to consider an MMap based solution &#8211; in Perl check out <a href="http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html" rel="nofollow">http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html</a> for example</p>
<p>One advantage of Perl is it&#8217;s attracted the type of developers that like to solve this kind of problem (unlike PHP). Browse CPAN &#8211; Perl&#8217;s XML tools a also good. And demand Unicode support (some like Perl have it&#8230; other languages don&#8217;t) <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html" rel="nofollow">http://cpan.uwinnipeg.ca/htdocs/Cache-FastMmap/Cache/FastMmap.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2402</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 11 Sep 2006 13:01:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2402</guid>
		<description>It is actually pretty interesting.  Even in Web applications you need to write some scripts every so often - when you do some database structure changes, data loading, removing old data etc. 

Using other language may mean you will have to duplicate certain portion of application functionality, leading to problems with maintainence.</description>
		<content:encoded><![CDATA[<p>It is actually pretty interesting.  Even in Web applications you need to write some scripts every so often &#8211; when you do some database structure changes, data loading, removing old data etc. </p>
<p>Using other language may mean you will have to duplicate certain portion of application functionality, leading to problems with maintainence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stepz</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2401</link>
		<dc:creator>stepz</dc:creator>
		<pubDate>Mon, 11 Sep 2006 12:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2401</guid>
		<description>If you change your mind and still want to use your PHP expertise, then XMLReader is really nice for huge XML -&gt; database transformations. If you don&#039;t need to do complicated processing of the data then it&#039;s quite nice and if you take care to avoid circular references (not that hard with the XMLReader processing model), doesn&#039;t leak memory. I haven&#039;t had the &quot;pleasure&quot; of working with gigabyte sized XML files, but hundreds of MB&#039;s aren&#039;t a problem. As I have 6 years of experience using PHP, the development goes really fast too. Not that Python, et al are bad for this kind of thing, but experience really counts towards development time.</description>
		<content:encoded><![CDATA[<p>If you change your mind and still want to use your PHP expertise, then XMLReader is really nice for huge XML -&gt; database transformations. If you don&#8217;t need to do complicated processing of the data then it&#8217;s quite nice and if you take care to avoid circular references (not that hard with the XMLReader processing model), doesn&#8217;t leak memory. I haven&#8217;t had the &#8220;pleasure&#8221; of working with gigabyte sized XML files, but hundreds of MB&#8217;s aren&#8217;t a problem. As I have 6 years of experience using PHP, the development goes really fast too. Not that Python, et al are bad for this kind of thing, but experience really counts towards development time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Beat Vontobel</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2400</link>
		<dc:creator>Beat Vontobel</dc:creator>
		<pubDate>Mon, 11 Sep 2006 12:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2400</guid>
		<description>Possible memory leaks were exactly the reason why I never used PHP for anything else but short running scripts (like web apps). As soon as I got the task to write some long running daemons in a scripting language for the first time some three years ago, I turned to Perl or even Bash (for simpler stuff), even if I never hit a real problem with memory leaks in PHP before.

But as soon as I started to write the first few lines of the deamon in PHP, I started to get some bad feelings about it (even if it would&#039;ve fit for the task at hand and I was actually almost only using PHP at that time). I just realized that nobody was using PHP for anything that runs longer than a few seconds - and I just didn&#039;t want to be the first one to hit the possible bugs.</description>
		<content:encoded><![CDATA[<p>Possible memory leaks were exactly the reason why I never used PHP for anything else but short running scripts (like web apps). As soon as I got the task to write some long running daemons in a scripting language for the first time some three years ago, I turned to Perl or even Bash (for simpler stuff), even if I never hit a real problem with memory leaks in PHP before.</p>
<p>But as soon as I started to write the first few lines of the deamon in PHP, I started to get some bad feelings about it (even if it would&#8217;ve fit for the task at hand and I was actually almost only using PHP at that time). I just realized that nobody was using PHP for anything that runs longer than a few seconds &#8211; and I just didn&#8217;t want to be the first one to hit the possible bugs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2399</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 11 Sep 2006 12:03:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2399</guid>
		<description>Hubert, 

I knew something would write about set_error_handler.  Unfortunately it does not work. 

Here is what documentation says:

The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.

Here is little example with problem I&#039;ve mentioned:

&lt;?php

function myErrorHandler($errno, $errstr, $errfile, $errline)
{
  echo(&quot;Error !&quot;);
}

set_error_handler(&quot;myErrorHandler&quot;);

$a=false;

$a-&gt;method();
?&gt;

Error handler does not help in this case.</description>
		<content:encoded><![CDATA[<p>Hubert, </p>
<p>I knew something would write about set_error_handler.  Unfortunately it does not work. </p>
<p>Here is what documentation says:</p>
<p>The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.</p>
<p>Here is little example with problem I&#8217;ve mentioned:</p>
<p>< ?php</p>
<p>function myErrorHandler($errno, $errstr, $errfile, $errline)<br />
{<br />
  echo("Error !");<br />
}</p>
<p>set_error_handler("myErrorHandler");</p>
<p>$a=false;</p>
<p>$a->method();<br />
?></p>
<p>Error handler does not help in this case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/comment-page-1/#comment-2398</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 11 Sep 2006 11:34:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/09/alternatives-of-php/#comment-2398</guid>
		<description>Java....  It is just whole another world. I&#039;m not saying it is bad though.

Things I find inconvenient (possibly wrong is)

- Need to compile stuff. For scripts I prefer to be able to run them right after the changes.
- Class names.  They are smart and standardized which does not make them pretty for my taste.
- Too much standardization. For example Connector/J has to be JDBC complaint which means it has to do many smart things which are required by specs.
- Love for complication.  Java applications are typically designed &quot;right&quot; which makes them complicated. You can take a look at any stack trace posted for Connector/J bugs... it is rarely less than 20 levels.
- Too many third party extensions, many acre commercial.  
- Not overly convenient to work with strings.
- Product of large company. With Perl and PHP it is relatively easy to reach developers. 
- Fully OO.  I like objects but not for 2 line scripts. 

I guess most of them are just lame excuses the right reason would be I just do not feel like it. I enjoy playing with something which allows me to do things quick and dirty.  Most of my tasks are far in complexity and reliability requirements from plane auto pilot.  

Java is probably good for enterprise world but I do not expect it to get too much traction in Web words which wants applications to be quickly developed by students  implementing prototypes for their ideas.</description>
		<content:encoded><![CDATA[<p>Java&#8230;.  It is just whole another world. I&#8217;m not saying it is bad though.</p>
<p>Things I find inconvenient (possibly wrong is)</p>
<p>- Need to compile stuff. For scripts I prefer to be able to run them right after the changes.<br />
- Class names.  They are smart and standardized which does not make them pretty for my taste.<br />
- Too much standardization. For example Connector/J has to be JDBC complaint which means it has to do many smart things which are required by specs.<br />
- Love for complication.  Java applications are typically designed &#8220;right&#8221; which makes them complicated. You can take a look at any stack trace posted for Connector/J bugs&#8230; it is rarely less than 20 levels.<br />
- Too many third party extensions, many acre commercial.<br />
- Not overly convenient to work with strings.<br />
- Product of large company. With Perl and PHP it is relatively easy to reach developers.<br />
- Fully OO.  I like objects but not for 2 line scripts. </p>
<p>I guess most of them are just lame excuses the right reason would be I just do not feel like it. I enjoy playing with something which allows me to do things quick and dirty.  Most of my tasks are far in complexity and reliability requirements from plane auto pilot.  </p>
<p>Java is probably good for enterprise world but I do not expect it to get too much traction in Web words which wants applications to be quickly developed by students  implementing prototypes for their ideas.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
