<?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: PHP vs Ruby &#8211; Practical Language Differences</title>
	<atom:link href="http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/</link>
	<description>Notes by Lee Blue</description>
	<lastBuildDate>Fri, 26 Feb 2010 19:31:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: funkengrooven</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-40</link>
		<dc:creator>funkengrooven</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:29:42 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-40</guid>
		<description>Mason I am not sure what you mean by:
If you instantiate B, a child of A, and ask A what kind of object it is (through some method in A), it will say A in PHP, and B in Ruby. The correct answer should be B.

&lt;?
class a { function x() { echo â€œ
b is an instance of : â€ . get_class($this); } }
class b extends a {
}
$b = new b(); echo â€œ
b is an instance of : â€ . get_class($b); $b-&gt;x();
?&gt;

yeilds

b is an instance of : b b is an instance of : b
As I would expect.</description>
		<content:encoded><![CDATA[<p>Mason I am not sure what you mean by:<br />
If you instantiate B, a child of A, and ask A what kind of object it is (through some method in A), it will say A in PHP, and B in Ruby. The correct answer should be B.</p>
<p>< ?<br />
class a { function x() { echo â€œ<br />
b is an instance of : â€ . get_class($this); } }<br />
class b extends a {<br />
}<br />
$b = new b(); echo â€œ<br />
b is an instance of : â€ . get_class($b); $b->x();<br />
?></p>
<p>yeilds</p>
<p>b is an instance of : b b is an instance of : b<br />
As I would expect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mason</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-39</link>
		<dc:creator>Mason</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-39</guid>
		<description>I posted this elsewhere, on a site that commented on your article, but I thought Iâ€™d leave it here as well.

â€œNevertheless both languages can do almost the same things. Both languages have try/catch/throw style exception handling. Exceptions are new to PHP5 as PHP4 does not have them. Both languages can be used in an object oriented way.â€

Eww. Ruby is a pure-OO implementation. PHPâ€™s was tacked on at the end. The result? Nasty hierarchy polymorphism and introspection. Actually, nasty introspection in general. Thatâ€™s the reason you canâ€™t do ActiveRecord in PHP the way you can in Ruby.

If you instantiate B, a child of A, and ask A what kind of object it is (through some method in A), it will say A in PHP, and B in Ruby. The correct answer should be B.
â€œBoth languages have additional functionality that can be added through libraries.â€
Ruby also supports Mixins, which is why Rails has all those pretty â€˜acts asâ€™ decorators. Acts as List. Acts as Authenticated. These little bits are the parts that make Rails a joy to work in. Free functionality across objects without cluttering your code.

â€œI have not yet run into a time when I was working with one language and hit a road block where the language I was using was not capable of expressing the functionality I needed. Sometimes things are easier in one language versus the other but both PHP and Ruby have been able to â€œdoâ€ the same things.â€

The joy in programming in Ruby is that you can express more with less code, and in a clearer fashion. Yes, PHP can do:

for($i = 0; $i
but Ruby can do:
3.times { &#124;i&#124; puts i }

or

3.times do &#124;i&#124; puts i end

I think thatâ€™s pretty cool.

â€œAs the owner of a web development company many of our smaller clients do not have the budget for their own VPS account and even if they did, we donâ€™t have the staff to manage a large number of VPS accounts or dedicated servers.â€

Linode VPS starting at $19/mo. Spend a little more and throw multiple hosts on there.
â€œFor large projects, it may be worth the trouble, but for small to medium sized projects, PHP is much easier to deploy, less expensive to host, and the language is capable of taking on everything those types of sites require.â€

PHP is easier to throw togetherâ€¦ but thereâ€™s an awesome feeling in properly deploying a Rails app using a Capistrano setup. Not only do you have versioned code, because youâ€™re using Subversion, but you also have versioned releases, with the ability to roll back at any time. Need to add a machine? Throw it in your deploy.rb file and redeploy.
â€œFor our projects, development time with PHP is not noticeably longer than with Ruby on Rails. Ruby on Rails integrates a lot of things for the developer.â€

Unless his projects are all â€œhello worldâ€, I find this hard to believe. Once you have even a little fluency in Rails, your dev time will drop. This past weekend was the Rails Rumble, where 150 teams developed 150 full applications. While some of them are a bit lameâ€¦ itâ€™s amazing to see what people could throw together in 48 hours using Rails. Try doing that with PHP or a PHP framework, and Iâ€™d be surprised if you could hit half the high points they did.

â€œThere is ActiveRecord for managing the link between models and the database, migrations for keeping development and live databases in sync, built in testing, the ajax â€“ prototype javascript library is included, and you get a well defined file system structure. While it may not all be packaged together as well, PHP can do all of the above.â€

This paragraph is what I hated most. He goes on listing all the positives on Rails, and how well it executes on these points, and then goes on to say, â€œWhile it may not be packaged together as wellâ€¦â€â€”that, my friend, is the REASON Rails took off. Rails is a collection of Gemsâ€¦ ActiveRecord, ActionPack, ActionView, etc, but itâ€™s put together in a such a way that it totally enables the developer to do marvelous things in little time.

I donâ€™t get it.</description>
		<content:encoded><![CDATA[<p>I posted this elsewhere, on a site that commented on your article, but I thought Iâ€™d leave it here as well.</p>
<p>â€œNevertheless both languages can do almost the same things. Both languages have try/catch/throw style exception handling. Exceptions are new to PHP5 as PHP4 does not have them. Both languages can be used in an object oriented way.â€</p>
<p>Eww. Ruby is a pure-OO implementation. PHPâ€™s was tacked on at the end. The result? Nasty hierarchy polymorphism and introspection. Actually, nasty introspection in general. Thatâ€™s the reason you canâ€™t do ActiveRecord in PHP the way you can in Ruby.</p>
<p>If you instantiate B, a child of A, and ask A what kind of object it is (through some method in A), it will say A in PHP, and B in Ruby. The correct answer should be B.<br />
â€œBoth languages have additional functionality that can be added through libraries.â€<br />
Ruby also supports Mixins, which is why Rails has all those pretty â€˜acts asâ€™ decorators. Acts as List. Acts as Authenticated. These little bits are the parts that make Rails a joy to work in. Free functionality across objects without cluttering your code.</p>
<p>â€œI have not yet run into a time when I was working with one language and hit a road block where the language I was using was not capable of expressing the functionality I needed. Sometimes things are easier in one language versus the other but both PHP and Ruby have been able to â€œdoâ€ the same things.â€</p>
<p>The joy in programming in Ruby is that you can express more with less code, and in a clearer fashion. Yes, PHP can do:</p>
<p>for($i = 0; $i<br />
but Ruby can do:<br />
3.times { |i| puts i }</p>
<p>or</p>
<p>3.times do |i| puts i end</p>
<p>I think thatâ€™s pretty cool.</p>
<p>â€œAs the owner of a web development company many of our smaller clients do not have the budget for their own VPS account and even if they did, we donâ€™t have the staff to manage a large number of VPS accounts or dedicated servers.â€</p>
<p>Linode VPS starting at $19/mo. Spend a little more and throw multiple hosts on there.<br />
â€œFor large projects, it may be worth the trouble, but for small to medium sized projects, PHP is much easier to deploy, less expensive to host, and the language is capable of taking on everything those types of sites require.â€</p>
<p>PHP is easier to throw togetherâ€¦ but thereâ€™s an awesome feeling in properly deploying a Rails app using a Capistrano setup. Not only do you have versioned code, because youâ€™re using Subversion, but you also have versioned releases, with the ability to roll back at any time. Need to add a machine? Throw it in your deploy.rb file and redeploy.<br />
â€œFor our projects, development time with PHP is not noticeably longer than with Ruby on Rails. Ruby on Rails integrates a lot of things for the developer.â€</p>
<p>Unless his projects are all â€œhello worldâ€, I find this hard to believe. Once you have even a little fluency in Rails, your dev time will drop. This past weekend was the Rails Rumble, where 150 teams developed 150 full applications. While some of them are a bit lameâ€¦ itâ€™s amazing to see what people could throw together in 48 hours using Rails. Try doing that with PHP or a PHP framework, and Iâ€™d be surprised if you could hit half the high points they did.</p>
<p>â€œThere is ActiveRecord for managing the link between models and the database, migrations for keeping development and live databases in sync, built in testing, the ajax â€“ prototype javascript library is included, and you get a well defined file system structure. While it may not all be packaged together as well, PHP can do all of the above.â€</p>
<p>This paragraph is what I hated most. He goes on listing all the positives on Rails, and how well it executes on these points, and then goes on to say, â€œWhile it may not be packaged together as wellâ€¦â€â€”that, my friend, is the REASON Rails took off. Rails is a collection of Gemsâ€¦ ActiveRecord, ActionPack, ActionView, etc, but itâ€™s put together in a such a way that it totally enables the developer to do marvelous things in little time.</p>
<p>I donâ€™t get it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OHR</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-38</link>
		<dc:creator>OHR</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-38</guid>
		<description>So many development languages now, why a new one come out? I get a ruby project source, but I can not runt it properlyâ€¦ itâ€™s a pain</description>
		<content:encoded><![CDATA[<p>So many development languages now, why a new one come out? I get a ruby project source, but I can not runt it properlyâ€¦ itâ€™s a pain</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: logical</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-37</link>
		<dc:creator>logical</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:26:12 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-37</guid>
		<description>Whenever you see one of these comparisons, efficiency and server load are never tested.
I have used both ruby and php for years. The opinion of myself and many other professionals is that if you think and breath OOP, then you are going to do far better with PHP. Not to mention the efficiency considerations.
As for speed of coding, I would challenge those who post â€œmake a blog in 15 minutes using rubyâ€ tutorials. My experience is that my PHP teams have completed entire, production quality projects in consistently fractions of the time as the ruby teams.
Maybe if youâ€™re making a â€˜hello worldâ€™ blog, you might get it done a few minutes faster, but if youâ€™re designing a full featured object oriented application, PHP will yield secure, comprehensive, maintainable code with a development time that rivals the toughest competitors.</description>
		<content:encoded><![CDATA[<p>Whenever you see one of these comparisons, efficiency and server load are never tested.<br />
I have used both ruby and php for years. The opinion of myself and many other professionals is that if you think and breath OOP, then you are going to do far better with PHP. Not to mention the efficiency considerations.<br />
As for speed of coding, I would challenge those who post â€œmake a blog in 15 minutes using rubyâ€ tutorials. My experience is that my PHP teams have completed entire, production quality projects in consistently fractions of the time as the ruby teams.<br />
Maybe if youâ€™re making a â€˜hello worldâ€™ blog, you might get it done a few minutes faster, but if youâ€™re designing a full featured object oriented application, PHP will yield secure, comprehensive, maintainable code with a development time that rivals the toughest competitors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-36</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:25:40 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-36</guid>
		<description>I know that Yahoo! selected Symfony for their Yahoo! Bookmarks application. Does anyone know of any other examples of any PHP frameworks being used in significant, production applications? Of course, there are all the basecamp applications using Ruby on Rails. It would be interesting to see which PHP frameworks people are choosing for their applications. Any thoughts?</description>
		<content:encoded><![CDATA[<p>I know that Yahoo! selected Symfony for their Yahoo! Bookmarks application. Does anyone know of any other examples of any PHP frameworks being used in significant, production applications? Of course, there are all the basecamp applications using Ruby on Rails. It would be interesting to see which PHP frameworks people are choosing for their applications. Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: D.h.</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-35</link>
		<dc:creator>D.h.</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:25:07 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-35</guid>
		<description>The only PHP framework comparable to Rails in terms of functionality out of the box is Akelos.
They have directly ported Rails to PHP and it works fantastically.</description>
		<content:encoded><![CDATA[<p>The only PHP framework comparable to Rails in terms of functionality out of the box is Akelos.<br />
They have directly ported Rails to PHP and it works fantastically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob McCormick</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-34</link>
		<dc:creator>Bob McCormick</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:23:47 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-34</guid>
		<description>What Iâ€™d REALLY like to see is a comparison with the new Zend Framework and Rails.
The Zend framework has finally come out of beta and looks very promising to me, though I havenâ€™t had time to play with it much yet.
I played with Rails quite a bit and loved many of the concepts, but for me the deployment killed the deal. Also, having no possible way to protect source code for commercial apps kinda pushed me back to Zend.
Iâ€™ll be looking hard at Zend Framework for my next project to see if it can cut down on development time as much as the Rails dev time. Deployment is certainly easier â€“ have already confirmed that.
Any thoughts on comparing these two? Zendâ€™s website has a banner that is stating that over 2 million downloads have transpired, so wondering if this framework is going to be the â€˜Oneâ€™ that can take on the Rails jaugernaut. Will certainly be interesting to see some comparisons as time moves on.</description>
		<content:encoded><![CDATA[<p>What Iâ€™d REALLY like to see is a comparison with the new Zend Framework and Rails.<br />
The Zend framework has finally come out of beta and looks very promising to me, though I havenâ€™t had time to play with it much yet.<br />
I played with Rails quite a bit and loved many of the concepts, but for me the deployment killed the deal. Also, having no possible way to protect source code for commercial apps kinda pushed me back to Zend.<br />
Iâ€™ll be looking hard at Zend Framework for my next project to see if it can cut down on development time as much as the Rails dev time. Deployment is certainly easier â€“ have already confirmed that.<br />
Any thoughts on comparing these two? Zendâ€™s website has a banner that is stating that over 2 million downloads have transpired, so wondering if this framework is going to be the â€˜Oneâ€™ that can take on the Rails jaugernaut. Will certainly be interesting to see some comparisons as time moves on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate Klaiber</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-33</link>
		<dc:creator>Nate Klaiber</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:23:12 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-33</guid>
		<description>@pcdinh Please site specific examples that Rails is â€˜much slower, less scalable and less flexible.â€™ This kind of FUD gets spread around all of the time, with no facts to back anything up. You canâ€™t point to a specific deployment environment, because it could be different from one setup to another. Having worked with both Rails and PHP, I know that each has their bottlenecks with poor programming, but that lies with the programmer â€“ not the language or framework.
Also, Ruby on Rails is not as impressive as top-notch PHP frameworks? Please explain to me why the top notch PHP frameworks all came out AFTER RoR, and they all attempt to imitate the RoR functionality? How then is Rails not as impressive? Im not bashing. I used CakePHP at a previous place of employment and absolutely loved it. If I had to do other PHP jobs I would use it, hands down. They have great documentation and a good core team. BUT â€“ they still play catch up, or have to make convoluted workarounds, to achieve what Rails does out of the box. This has more to do with Ruby being a true OO language, versus PHPâ€™s tacked on OO. Again, this just seems like more FUD without any details â€“ could you provide more?</description>
		<content:encoded><![CDATA[<p>@pcdinh Please site specific examples that Rails is â€˜much slower, less scalable and less flexible.â€™ This kind of FUD gets spread around all of the time, with no facts to back anything up. You canâ€™t point to a specific deployment environment, because it could be different from one setup to another. Having worked with both Rails and PHP, I know that each has their bottlenecks with poor programming, but that lies with the programmer â€“ not the language or framework.<br />
Also, Ruby on Rails is not as impressive as top-notch PHP frameworks? Please explain to me why the top notch PHP frameworks all came out AFTER RoR, and they all attempt to imitate the RoR functionality? How then is Rails not as impressive? Im not bashing. I used CakePHP at a previous place of employment and absolutely loved it. If I had to do other PHP jobs I would use it, hands down. They have great documentation and a good core team. BUT â€“ they still play catch up, or have to make convoluted workarounds, to achieve what Rails does out of the box. This has more to do with Ruby being a true OO language, versus PHPâ€™s tacked on OO. Again, this just seems like more FUD without any details â€“ could you provide more?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Joyce</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-32</link>
		<dc:creator>John Joyce</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-32</guid>
		<description>Hosting Rails is not expensive. You can host it at Dream Host!! or any other shared host that provides Ruby/Rails and shell access with fcgi. Rails and Ruby are currently slower than PHP in many situations. No doubt about that. But far easier to learn, use, and maintain. VPS hosting is appropriate for Python based frameworks as well as Rails, and for anything big and serious, it is not expensive, it is the correct way to scale up for higher traffic sites. From there you scale up to dedicated hosting. Beyond that, you can look forward to the soon to come Ruby 1.9 or 2.0 (whatever it will be when it is released) as being much faster, as well as Rails 2.0 (probably dependent on the next Ruby) There is also JRuby, a Java based implementation of Ruby that is making huge advancements at an incredible pace, and will soon preclude the need to know Java even!</description>
		<content:encoded><![CDATA[<p>Hosting Rails is not expensive. You can host it at Dream Host!! or any other shared host that provides Ruby/Rails and shell access with fcgi. Rails and Ruby are currently slower than PHP in many situations. No doubt about that. But far easier to learn, use, and maintain. VPS hosting is appropriate for Python based frameworks as well as Rails, and for anything big and serious, it is not expensive, it is the correct way to scale up for higher traffic sites. From there you scale up to dedicated hosting. Beyond that, you can look forward to the soon to come Ruby 1.9 or 2.0 (whatever it will be when it is released) as being much faster, as well as Rails 2.0 (probably dependent on the next Ruby) There is also JRuby, a Java based implementation of Ruby that is making huge advancements at an incredible pace, and will soon preclude the need to know Java even!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew</title>
		<link>http://www.refreshinglyblue.com/2007/08/20/php-vs-ruby-practical-language-differences/comment-page-1/#comment-31</link>
		<dc:creator>Matthew</dc:creator>
		<pubDate>Fri, 16 Nov 2007 05:21:42 +0000</pubDate>
		<guid isPermaLink="false">http://refreshinglyblue.com/?p=12#comment-31</guid>
		<description>Youâ€™ll find that that link about namespaces in PHP is actually in relation to the yet un-released version of PHP 6 (release = stable release). (Which, mind you, cannot come fast enough).</description>
		<content:encoded><![CDATA[<p>Youâ€™ll find that that link about namespaces in PHP is actually in relation to the yet un-released version of PHP 6 (release = stable release). (Which, mind you, cannot come fast enough).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
