<?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>Professional PHP &#187; oop</title>
	<atom:link href="http://www.procata.com/blog/archives/tag/oop/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.procata.com/blog</link>
	<description>PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.</description>
	<lastBuildDate>Tue, 20 Oct 2009 00:57:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Endpoints of the Scale of Stupidity on Video</title>
		<link>http://www.procata.com/blog/archives/2007/11/02/the-endpoints-of-the-scale-of-stupidity-on-video/</link>
		<comments>http://www.procata.com/blog/archives/2007/11/02/the-endpoints-of-the-scale-of-stupidity-on-video/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 20:55:22 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/11/02/the-endpoints-of-the-scale-of-stupidity-on-video/</guid>
		<description><![CDATA[A quote from Cal Henderson (via simonwillison) presents a &#8220;Web Application Scale of Stupidity:&#8221;

&#124; OGF (One Giant Function) ---- Sanity ---- OOP (Object Oriented Programming) &#124;

The scale that Cal is talking about is actually better known as modularity:

&#124; Few large modules ----  Sanity? ---- Many Small Modules &#124;

If you haven&#8217;t listened to Alan Kay [...]]]></description>
			<content:encoded><![CDATA[<p>A quote from Cal Henderson (via <a href="http://simonwillison.net/2007/Nov/2/cal/">simonwillison</a>) presents a &#8220;Web Application Scale of Stupidity:&#8221;<br />
<code><br />
| OGF (One Giant Function) ---- Sanity ---- OOP (Object Oriented Programming) |<br />
</code></p>
<p>The scale that Cal is talking about is actually better known as <a href="http://sunnyday.mit.edu/16.355/parnas-criteria.html">modularity</a>:</p>
<p><code><br />
| Few large modules ----  Sanity? ---- Many Small Modules |<br />
</code></p>
<p>If you haven&#8217;t listened to Alan Kay talk about the benefits of many small modules, you should do so now.  Alan Kay coined the term Object Oriented.  Love OO or hate OO, if you have an opinion on it, you should know what he was thinking.  Hint, it wasn&#8217;t C++.</p>
<p><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-2950949730059754521&#038;hl=en" flashvars=""> </embed></p>
<p>On the other end of the scale, One Giant Function is generally known as <a href="http://www.laputan.org/pub/foote/mud.pdf">Big ball of Mud</a>(PDF)  Here is Brian Foote&#8217;s presentation on the paper (read the paper first).</p>
<p><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=8693679271218408739&#038;hl=en" flashvars=""> </embed></p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/11/02/the-endpoints-of-the-scale-of-stupidity-on-video/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OOP is Mature, not Dead</title>
		<link>http://www.procata.com/blog/archives/2007/01/07/oop-is-mature-not-dead/</link>
		<comments>http://www.procata.com/blog/archives/2007/01/07/oop-is-mature-not-dead/#comments</comments>
		<pubDate>Sun, 07 Jan 2007 20:51:16 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[closures]]></category>
		<category><![CDATA[late-static-binding]]></category>
		<category><![CDATA[object-oriented-programming]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[uniform-access-principle]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/01/07/oop-is-mature-not-dead/</guid>
		<description><![CDATA[I ran across an interesting series of blog posts by Karsten Wagner claiming that OOP is dead (part 2 and part 3).  The premise behind these posts is that OOP has failed to deliver and that it is on the decline in favor of more functional or meta programming techniques.  Maybe its true [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across an interesting series of blog posts by Karsten Wagner claiming that <a href="http://kawagner.blogspot.com/2006/08/oop-is-dead.html">OOP is dead</a> (<a href="http://kawagner.blogspot.com/2006/08/oop-is-dead-part-2.html">part 2</a> and <a href="http://kawagner.blogspot.com/2006/08/oop-is-dead-part-3.html">part 3</a>).  The premise behind these posts is that OOP has failed to deliver and that it is on the decline in favor of more functional or meta programming techniques.  Maybe its true that the discussion of the merits of OOP is on the decline.  At least if you read <a href="http://reddit.com/">reddit</a>.</p>
<p>However, OOP is not on the decline.  Quite simply, it has become mature.  The discussion may be on the decline because almost every language that anyone actually uses implements a core set of OOP features.  OOP has won its arguments.  Good luck taking a language mainstream without it.</p>
<p>Oh, yeah, there are some OOP features that are still controversial or unusual.  There is the single versus multiple inheritance debate, or perhaps Ruby&#8217;s open classes.  But, I think these things have a way of cross-pollinating across the popular languages when they make sense.</p>
<p>A good example of this cross-pollination is happening now with properties, accessor methods and the <a href="http://en.wikipedia.org/wiki/Uniform_access_principle">uniform access principle</a>.  Language support for declared accessor method is slowly creeping across all of the major languages.  Not that Objective C is all that popular, but <a href="http://developer.apple.com/leopard/overview/tools.html">Objective C 2.0</a> adds support for &#8216;em.  Even stodgy old Java is considering <a href="http://www.javalobby.org/java/forums/t88090.html">language level property support</a>.</p>
<p>Sadly, PHP does not yet have language support for declared properties with accessor methods.  What are <a href="http://us2.php.net/manual/en/language.oop5.overloading.php">__get and __set</a>?  They&#8217;re property missing handlers, not accessor methods.  You can simulate accessor methods with them, but that is a poor solution for most applications.  There is no way to support differing visibility, for example protected setters and public getters.  Property not found handlers are prohibitively verbose to write, have a poor performance profile, have no capability for reflection, cause interoperability problems, and have inheritance edge case gotchas (not present in the java beans model, for example).  My hope is to see good language support for properties in PHP 6.</p>
<p>Closures may not be object oriented, but they seem to be undergoing that same language cross-pollination.  Thats seems to be a pretty good sign that they are useful.  It doesn&#8217;t have to be closures OR objects, it can be closures AND objects.  We can use each when they make sense.</p>
<p>Closures are another wish list item for PHP 6.  PHP is almost wired for them with its <a href="http://us2.php.net/callback">callback</a> psuedo type.  Everywhere you can use a callback in PHP, you could use a closure.  I&#8217;d like to see the callback Pinocchio become a real boy like integer or boolean.  The cool thing is that with PHP&#8217;s weak typing the string and array forms of the callback pseudo-type can automatically be converted to a native closure type when needed.</p>
<p>As I said, the core OOP features that most programmers use are in all the mainstream languages.  The interesting part is how they handle the OOP edge cases.  This is the space where the framework developers live.  As I wrote in <a href="http://www.procata.com/blog/archives/2006/01/13/building-a-culture-of-objects-in-php/">culture of objects</a>, PHP has some problems here.  In some ways I think Ruby&#8217;s support for edge cases is exactly what allow a framework such as rails to be built in it, although, I&#8217;m not familiar enough with Ruby to say for certain.</p>
<p>I think addressing some of these issues in PHP 6 will make it a Ruby killer for web applications.  It isn&#8217;t necessary to be perfect here, just to be good enough and allow the larger community, distribution, and stability to take over.  Unfortunately, there is a long lead time here.  If PHP 6  were to add support for declared accessor methods, closures, and late static binding &#8212; my top three framework enablers &#8212; it would still be at least 2-3 years before PHP 6 was sufficiently deployed and the frameworks could adapt to the new features.</p>
<p>In the meantime, while the PHP culture may have problems, the Ruby culture may not be without its own problems.  The influx of <a href="http://www.randomhacks.net/articles/2005/12/03/why-ruby-is-an-acceptable-lisp">lisp</a> and smalltalk programmers, two languages that did not go &#8220;mainstream&#8221; may <a href="http://beust.com/weblog/archives/000382.html">prevent Ruby from going mainstream</a>.  Take a look at <a href="http://blog.lostlake.org/index.php?/archives/11-The-Impending-Ruby-Fracture.html">The impending ruby fracture</a>.  Isn&#8217;t this one of the things that happened to SmallTalk and Lisp?  I&#8217;m still not convinced that Ruby hasn&#8217;t inherited many of the same maintenance problems from its Perl heritage.  Just like english, huh?  Only time will reveal Ruby&#8217;s maintenance characteristics.  I give it about 2 to 3 years for today&#8217;s Rails systems to hit full legacy mode. How long do you think it will take for top notch unicode support in Ruby?</p>
<p>Obviously PHP 6 is all about teh unicode.  Including an opcode cache is going to be an important performance and adoption driver.  However, I&#8217;d like to see more progress on framework enablers.  I really want to see these in the next major PHP deployment cycle and not in the PHP 7 deployment cycle.  Are there framework enablers other than closures, declared property accessors and late static binding that I have overlooked?</p>
<p>I have high hopes for PHP 6 as a mature and mainstream language.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/01/07/oop-is-mature-not-dead/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>php&#124;architect Test Pattern</title>
		<link>http://www.procata.com/blog/archives/2006/03/21/phparchitect-test-pattern/</link>
		<comments>http://www.procata.com/blog/archives/2006/03/21/phparchitect-test-pattern/#comments</comments>
		<pubDate>Wed, 22 Mar 2006 00:34:23 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[object-oriented-programming]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php-architect]]></category>
		<category><![CDATA[phparch]]></category>
		<category><![CDATA[test-pattern]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=177</guid>
		<description><![CDATA[The March issue of php&#124;architect came out yesterday.  I&#8217;m excited to see this issue finally out.  I&#8217;ve taken over writing the monthly Test Pattern column from Marcus Baker and this issue contains my first column.
Writing doesn&#8217;t come easy to me.  Writing this blog for the past two years has helped me improve. [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://phparch.com/issue.php?mid=76">March issue</a> of <a href="http://phparch.com/issue.php?mid=76">php|architect</a> came out yesterday.  I&#8217;m excited to see this issue finally out.  I&#8217;ve taken over writing the monthly Test Pattern column from <a href="http://www.lastcraft.com/blog/">Marcus Baker</a> and this issue contains my first column.</p>
<p>Writing doesn&#8217;t come easy to me.  Writing this blog for the past two years has helped me improve.  However, I have to admit that I was quite worried just before the column was due.  I just re-read it for the first time since turning it in and I am happy with the result.  This is due in no small part to some great advise and encouragement from Marcus.</p>
<p>This month&#8217;s column takes on the topic of organizing code.  I wanted to convey some of the fundamental principles underlying the object oriented paradigm, but in a way that goes beyond objects.  In the mid 90&#8217;s, I had what I consider a major professional epiphany when I finally understood object oriented programming.  This month&#8217;s column is my best attempt to concisely explain the heart of that epiphany.  </p>
<p>I&#8217;m proud of this month&#8217;s column.  I hope you&#8217;ll check it out.</p>
<p><a href="http://shiflett.org/archive/214">Chris Shiflett</a> has some thoughts about the security corner column in the same issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2006/03/21/phparchitect-test-pattern/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Building a culture of objects in PHP</title>
		<link>http://www.procata.com/blog/archives/2006/01/13/building-a-culture-of-objects-in-php/</link>
		<comments>http://www.procata.com/blog/archives/2006/01/13/building-a-culture-of-objects-in-php/#comments</comments>
		<pubDate>Fri, 13 Jan 2006 07:36:25 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[active-record]]></category>
		<category><![CDATA[design-patterns]]></category>
		<category><![CDATA[late-static-binding]]></category>
		<category><![CDATA[object-oriented-programming]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[zend-framework]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=150</guid>
		<description><![CDATA[This is a follow up post to Why isn&#8217;t PHP the natural successor to Java?
Joshua Eichorn (among others) notices that active record can&#8217;t work as shown in the Zend Framework webcast.  The syntax presented during the web cast is not possible in PHP because of inherited static methods are treated.  Mike Naberezny notes [...]]]></description>
			<content:encoded><![CDATA[<p>This is a follow up post to <a href="http://www.procata.com/blog/archives/2005/09/29/why-isnt-php-the-natural-successor-to-java/">Why isn&#8217;t PHP the natural successor to Java?</a></p>
<p>Joshua Eichorn (<a href="http://shiflett.org/archive/171">among others</a>) notices that <a href="http://blog.joshuaeichorn.com/archives/2006/01/09/zactiverecord-cant-work/">active record can&#8217;t work</a> as shown in the <a href="http://www.procata.com/blog/archives/2005/12/05/zend-framework-webcast/">Zend Framework webcast</a>.  The syntax presented during the web cast is not possible in PHP because of inherited static methods are treated.  Mike Naberezny notes the problem and suggests that it will end up getting fixed in PHP:</p>
<blockquote><p>Weâ€™ve been working on the solution to the problem with statics on the C front, so eventually it will be solved there.</p></blockquote>
<p>In the sitepoint thread <a href="http://www.sitepoint.com/forums/showthread.php?t=334377">Trouble in Zend Framework Land?</a>, 33degrees smells vaporware:</p>
<blockquote><p>I find it amusing that they did the webcast using that syntax, while there is currently no way of implementing it in PHP5. Makes you wonder how much code they&#8217;d actually written at that point.
</p></blockquote>
<p><a href="http://elizabethmariesmith.com/2006/01/09/annoying-statics-in-php/">Elizabeth Marie Smith</a> does too and adds:</p>
<blockquote><p>
I find it rather annoying that they havenâ€™t fixed the problem BEFORE now &#8211; after all, the bugs (marked bogus or wont fix because obviously the zend guys werenâ€™t using php5 at that point if they didnâ€™t see the problem until zend framework came along) the bugs/requests have been around for a LONG TIME
</p></blockquote>
<p>I look at this incident as an incredibly good omen.  My optimism about Zend&#8217;s PHP framework is not for the framework itself, but for what it means for OO support in PHP.  In my book, the more developers that have commit access to both ZPF and to PHP, the better PHP 6 will be for me.  I look at ZPF as an important step in building a culture of objects in the PHP community.</p>
<p>What?</p>
<p>In my previous post, I talked about how the leaders of the agile development culture seemed to be migrating from Java to Ruby with nary a glance at PHP.  One of the reasons is that PHP lacks a culture of objects.</p>
<p>Support for object oriented constructs in PHP is relatively new, rough, and uneven.  PHP competetors Ruby, Python, Java, and .NET all have OO class libraries, yet PHP does not.  The classes and interfaces that PHP does have are not necessarily what I would hold up as paragons of modern OO design.  </p>
<p>I can see why this would be the case. PHP is written in C.  Being an <a href="http://www.procata.com/blog/archives/2005/05/10/expert-programmers/">expert</a> in C programming does not necessarily make one an expert in object oriented programming (nor does it preclude it).  My impression from reading the php-dev mailing list is that of a C culture rather than a object culture.  (witness the <a href="http://www.procata.com/blog/archives/2004/07/29/goto-in-php/">goto vs exceptions</a> debate.)</p>
<p>I&#8217;ll save any critique of PHP&#8217;s built in classes for OO for future blog posts.  Instead, lets look at PHP&#8217;s documentation.  I regard PHP&#8217;s online documentation as excellent.  Its one of the factors that drew me to PHP in the first place.  I especially like the comments system.  Yet, go the the <a href="">front page</a> and search for one of the built in classes.  Try &#8220;exception.&#8221;  Helpful?  Did you know to switch the dropdown from the default functions option first?  I&#8217;d like to link to the documentation for the Exception class.  Where should I link?  Classes are not first class citizens in the PHP manual as functions are.</p>
<p>Try searching for the &#8216;getTraceAsString&#8217; method of the Exception class.  I&#8217;d like to leave a comment about it, where should I go?</p>
<p>My purpose is not to run down PHP&#8217;s support for objects.  Merely to suggest that there is more work yet to be done for first class support.</p>
<p>Ok, so PHP doesn&#8217;t exactly have a culture of objects.  Who cares about objects?</p>
<p>To answer that, I want to explore the complex relationship between PHP and Zend.  A good way to highlight the distinction is to look at the PHP usage numbers and the adoption rates for PHP 5.  While web hosts account for the vast majority of the PHP <a href="http://www.php.net/usage.php">usage numbers</a> as reported, they have been <a href="http://www.nexen.net/interview/index.php?id=50">slow to convert to PHP 5</a>.  On the other hand, <a href="http://www.internetnews.com/ent-news/article.php/3573486">Zend reports</a> that 50% of their customers have adopted PHP 5, suggesting that Zend&#8217;s customers are a bit different than the general PHP using population.</p>
<p>I think the PHP 5 adoption rates show that Zend&#8217;s customers care about objects. I suspect that some of the object support in PHP 5 is a result of feedback from Zend&#8217;s customers.</p>
<p>Zend is not a charity.  I would imagine the ZPF project consumes a great number of resources and they are doing it for a reason.  I think Zend&#8217;s customers also care about frameworks.  It sure looks to me like the ZPF project was triggered by Rails.</p>
<p>So somewhere in the ZPF project, they should be trying to do the same thing in rails and in ZPF and comparing the code.  (if they don&#8217;t there are a bunch of bloggers, me included, who will do it for them.)  I&#8217;m sure their customers will do it too.  Perhaps the Active Record syntax shown in the webcast was inspired from such a comparison?  I think that in order to look good in these comparisons, some aspects of PHP&#8217;s object support are going to have to be improved.  Static inheritance won&#8217;t be the last thing to get fixed.</p>
<p>Its is the zend framework effort thats going to put the finish on what PHP 5 started.  I honestly believe that PHP 6 is going to end up a runaway success.  (Is it still true that only the even numbered star trek moves are good?)</p>
<p>So if PHP doesn&#8217;t exactly have the best reputation as an object oriented language, what can we do about it.  Or specifically, what can Zend do about it?</p>
<p>Well, when Microsoft was being criticized for the lack of patterns in their PetStore example, what did the do?  One, they fixed it.  Two, they hired Martin Fowler&#8217;s company to <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/esp.asp">write about .net patterns</a>.  Ever notice how many .Net patterns there are in Martin Fowler&#8217;s Patterns of Enterprise Application Architecture Book?</p>
<p>I&#8217;d like to see Zend hire a reputable object guru to help PHP turn around its object reputation.  This should be someone who is known outside the PHP community, someone who has been going to OOPSLA for longer than PHP has existed.  Someone who has a book on object oriented programming, articles, a blog, and who is an expert at teaching object oriented programming (<a href="http://www.procata.com/blog/archives/2005/05/10/expert-programmers/">10 years to be an expert</a>).  Writing and teaching help hone ones thoughts and this job requires a communicator.</p>
<p>To start, Zend can put this person to work both advising on ZPF and telling the world about ZPF.  However, I would hope a longer term goal would be to apply some deep experience in coordinating and advising on the classes and interfaces that are going into the language itself.</p>
<p>I would hate to see the sales objection &#8220;php&#8217;s functions are inconsistent&#8221; morph into &#8220;php&#8217;s classes are inconsistent.&#8221;  Not only that, today&#8217;s class and interface designs are going to be around a long time.  Public refactoring is not a good in a language class library or in a widely used framework.  Witness the slow adoption of PHP 5 and the problems with reference changes in 4.4, 5.0.5.  Deep experience can help get a better design at the outset.</p>
<p>I for one welcome our new object oriented overlords.  <img src='http://www.procata.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2006/01/13/building-a-culture-of-objects-in-php/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Language Peeves</title>
		<link>http://www.procata.com/blog/archives/2005/11/06/language-peeves/</link>
		<comments>http://www.procata.com/blog/archives/2005/11/06/language-peeves/#comments</comments>
		<pubDate>Sun, 06 Nov 2005 16:30:20 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[object-oriented-programming]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=154</guid>
		<description><![CDATA[Phil Ringnalda grinds his teeth when people say depreciated instead of deprecated.  I know how he feels.  The one that bothers me is hearing people say orientated instead of oriented, as in &#8220;object orientated.&#8221;
]]></description>
			<content:encoded><![CDATA[<p>Phil Ringnalda <a href="http://weblog.philringnalda.com/2005/11/05/i-give-up-on-depreciated">grinds his teeth</a> when people say depreciated instead of deprecated.  I know how he feels.  The one that bothers me is hearing people say orientated instead of oriented, as in &#8220;object orientated.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/11/06/language-peeves/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Why isn&#8217;t PHP the natural successor to Java?</title>
		<link>http://www.procata.com/blog/archives/2005/09/29/why-isnt-php-the-natural-successor-to-java/</link>
		<comments>http://www.procata.com/blog/archives/2005/09/29/why-isnt-php-the-natural-successor-to-java/#comments</comments>
		<pubDate>Thu, 29 Sep 2005 17:42:19 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Agile Methods]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[language-comparison]]></category>
		<category><![CDATA[object-oriented-programming]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php-frameworks]]></category>
		<category><![CDATA[programming-language]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=140</guid>
		<description><![CDATA[Loud thinking declares that Java has lost its aura of invincibility.  Jason Hunter sums it up nicely:
Ruby on Rails today looks poised to eat Java&#8217;s mindshare on the web tier. If not Rails, then something else.
It does seem like Java&#8217;s mindshare is on the decline, along with sun&#8217;s fortunes. There is some evidence that [...]]]></description>
			<content:encoded><![CDATA[<p>Loud thinking <a href="http://www.loudthinking.com/arc/000517.html">declares</a> that Java has lost its aura of invincibility.  Jason Hunter <a href="http://www.servlets.com/blog/archives/000068.html">sums it up</a> nicely:</p>
<blockquote><p>Ruby on Rails today looks poised to eat Java&#8217;s mindshare on the web tier. If not Rails, then something else.</p></blockquote>
<p>It does seem like Java&#8217;s mindshare is on the <a href="http://gnuvince.net/?p=62">decline</a>, along with sun&#8217;s fortunes. There is <a href="http://www.surveymonkey.com/DisplaySummary.asp?SID=1360166&#038;U=136016677100">some evidence</a> that rails is drawing mindshare from PHP as well.  (Mind share is the grown-up way of saying &#8220;what the cool kids are doing.&#8221;)</p>
<p>So why isn&#8217;t PHP that something else?</p>
<p>i think its the unit testing, &#8220;You aren&#8217;t gonna need it,&#8221; &#8220;Do the simplest thing that could possibly work&#8221; folk that are dismantling Java&#8217;s mindshare.  As they gain it, Java loses it.  Some of that is showing up in the java community itself in concepts like POJOs and dependency injection.  Some of it shows up in an exodus from Java to dynamic languages.</p>
<p>So why are the agile leaders like <a href="http://www.martinfowler.com/bliki/RubyPeople.html">Martin Fowler</a> and <a href="http://blogs.pragprog.com/cgi-bin/pragdave.cgi">Dave Thomas</a> working with Ruby instead of PHP?  David Heinemeier Hansson <a href="">directly credits</a> these guys with influencing his decision to stop programming rails in PHP and move to ruby.  I suspect that its the dynamic, smalltalk, like features of Ruby that appeal the the agile methods leaders.</p>
<p>Rails could have been a PHP framework, but wasn&#8217;t.  Although, I&#8217;m not sure that it would get the attention it is if it were a PHP framework.  The rails, ruby combination may be greater than the sum of the parts.</p>
<p>I can&#8217;t speak for anyone else, but I have some ideas about why PHP might not appeal to the agile method and java is too complicated folk:</p>
<ul>
<li>Too many globals &#8211; globals make unit testing more difficult and prevent integrating work from different developers, let alone different organizations.</li>
<li>No culture of objects &#8211; PHP has made great strides in this area, but I don&#8217;t get the impression that many of the folk that work on and with PHP really buy into object oriented programming the way that the agile methods folk do.</li>
<li>Crowded namespaces &#8211; How many functions is PHP up to?  Constants?</li>
<li>incomplete component model &#8211; This is another integration thing.  PHP has too many islands and not enough continents.  (I&#8217;m talking beans here, but definitely not EJB.)</li>
<li>No mature frameworks &#8211; Ruby has been around a long time, but didn&#8217;t really start gulping mindshare until Rails came along.  See <a href="http://www.procata.com/blog/archives/2004/11/28/the-value-of-mvc/">The Value of MVC</a>.</li>
<li>No closures &#8211; Its a dynamic thing.</li>
<li>Expert level gotchas &#8211; hopping on the learning curve is easy.  Reaching the top, not so much.</li>
</ul>
<p>I&#8217;ll elaborate on each of these points in a series of upcoming posts.</p>
<p>I&#8217;ll close by saying that life is not a zero sum game.  The success of Ruby and Rails does not diminish the success of PHP.  The cool kids were doing Java and now some of them are doing Ruby.  Oh, well.  Its disappointing that more of them aren&#8217;t doing PHP, but PHP has many things going for it.  That, however, is a different series of posts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/09/29/why-isnt-php-the-natural-successor-to-java/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>
