<?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/"
	xmlns:series="http://organizeseries.com/"
		>
<channel>
	<title>Comments on: Why Interfaces Rock</title>
	<atom:link href="http://www.brandonsavage.net/why-interfaces-rock/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brandonsavage.net/why-interfaces-rock/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=why-interfaces-rock</link>
	<description>The personal blog of Brandon Savage. Contains entries of a personal and professional nature focusing on PHP, Apple, LAMP, MySQL and Washington, DC.</description>
	<lastBuildDate>Wed, 15 May 2013 14:54:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.2-alpha</generator>
	<item>
		<title>By: Karn Sakulsak</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1399</link>
		<dc:creator>Karn Sakulsak</dc:creator>
		<pubDate>Tue, 29 Sep 2009 08:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1399</guid>
		<description><![CDATA[Thank you Brandon, you give me the light of Interface usage. After I think of it as a sub to Abstract concept.]]></description>
		<content:encoded><![CDATA[<p>Thank you Brandon, you give me the light of Interface usage. After I think of it as a sub to Abstract concept.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Artur Ejsmont</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1373</link>
		<dc:creator>Artur Ejsmont</dc:creator>
		<pubDate>Mon, 28 Sep 2009 07:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1373</guid>
		<description><![CDATA[Hi Harry, seriously, the punch was a total miss ;- )

After a while of using interfaces in PHP in larger projects that live for a while you will probably acknowledge the benefits.

Unless you work at facebook you wont have to worry about delay caused by interfaces resolving at runtime. Please lets not get back into micro optimizations path ever again.

PHP is not java nor other language, if you use for some time you will probably benefit from interfaces.]]></description>
		<content:encoded><![CDATA[<p>Hi Harry, seriously, the punch was a total miss ;- )</p>
<p>After a while of using interfaces in PHP in larger projects that live for a while you will probably acknowledge the benefits.</p>
<p>Unless you work at facebook you wont have to worry about delay caused by interfaces resolving at runtime. Please lets not get back into micro optimizations path ever again.</p>
<p>PHP is not java nor other language, if you use for some time you will probably benefit from interfaces.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Savage</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1358</link>
		<dc:creator>Brandon Savage</dc:creator>
		<pubDate>Sun, 27 Sep 2009 00:26:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1358</guid>
		<description><![CDATA[I&#039;m pretty comfortable with who I am, and what I wrote. Feel free to counter-punch away. And you made some really good points.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m pretty comfortable with who I am, and what I wrote. Feel free to counter-punch away. And you made some really good points.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry Fuecks</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1356</link>
		<dc:creator>Harry Fuecks</dc:creator>
		<pubDate>Sat, 26 Sep 2009 23:01:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1356</guid>
		<description><![CDATA[Good job explaining what interfaces do but I had to throw in the counter punch over at reddit - http://www.reddit.com/r/PHP/comments/9obg1/why_interfaces_rock/c0dmsj8 - PHP Interfaces Suck!]]></description>
		<content:encoded><![CDATA[<p>Good job explaining what interfaces do but I had to throw in the counter punch over at reddit &#8211; <a href="http://www.reddit.com/r/PHP/comments/9obg1/why_interfaces_rock/c0dmsj8" rel="nofollow">http://www.reddit.com/r/PHP/comments/9obg1/why_interfaces_rock/c0dmsj8</a> &#8211; PHP Interfaces Suck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hari K T</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1355</link>
		<dc:creator>Hari K T</dc:creator>
		<pubDate>Sat, 26 Sep 2009 20:43:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1355</guid>
		<description><![CDATA[Great article Bradon . I like your comment box including the twitter username . Great one .]]></description>
		<content:encoded><![CDATA[<p>Great article Bradon . I like your comment box including the twitter username . Great one .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jani Hartikainen</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1354</link>
		<dc:creator>Jani Hartikainen</dc:creator>
		<pubDate>Sat, 26 Sep 2009 14:23:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1354</guid>
		<description><![CDATA[I&#039;ve been thinking of writing about interfaces as well. Good stuff, but perhaps a bit difficult to understand.

I have to agree with Giorgio in that your interface shouldn&#039;t define the constructor - most languages don&#039;t even let you - because classes implementing it often have different requirements and the constructor isn&#039;t really a part of the object &quot;surface&quot;]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve been thinking of writing about interfaces as well. Good stuff, but perhaps a bit difficult to understand.</p>
<p>I have to agree with Giorgio in that your interface shouldn&#8217;t define the constructor &#8211; most languages don&#8217;t even let you &#8211; because classes implementing it often have different requirements and the constructor isn&#8217;t really a part of the object &#8220;surface&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fqqdk</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1353</link>
		<dc:creator>fqqdk</dc:creator>
		<pubDate>Sat, 26 Sep 2009 11:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1353</guid>
		<description><![CDATA[@Richard Harrison: that is called Self Shunt Pattern. :) http://www.objectmentor.com/resources/articles/SelfShunPtrn.pdf]]></description>
		<content:encoded><![CDATA[<p>@Richard Harrison: that is called Self Shunt Pattern. :) <a href="http://www.objectmentor.com/resources/articles/SelfShunPtrn.pdf" rel="nofollow">http://www.objectmentor.com/resources/articles/SelfShunPtrn.pdf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Saray</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1349</link>
		<dc:creator>Aaron Saray</dc:creator>
		<pubDate>Sat, 26 Sep 2009 04:25:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1349</guid>
		<description><![CDATA[I use interfaces for plugin based architecture.  When you use the type hinting that you specified (or &#039;instanceof&#039;), you can make sure that the plugin has at least defined the methods that your code requires.  This way, when a user installs a new plugin, it at least won&#039;t kill your software with a function not found type error. :)]]></description>
		<content:encoded><![CDATA[<p>I use interfaces for plugin based architecture.  When you use the type hinting that you specified (or &#8216;instanceof&#8217;), you can make sure that the plugin has at least defined the methods that your code requires.  This way, when a user installs a new plugin, it at least won&#8217;t kill your software with a function not found type error. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard Harrison</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1348</link>
		<dc:creator>Richard Harrison</dc:creator>
		<pubDate>Fri, 25 Sep 2009 22:00:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1348</guid>
		<description><![CDATA[Another reason why I like interfaces is that methods which specify them as parameters are really easy to write unit tests for.

Implement the interface in the unit test case, add the methods with the return values that you want to check and then have the test method pass itself to the method to be tested.

Elegant, simple and reduces the need to mock objects.]]></description>
		<content:encoded><![CDATA[<p>Another reason why I like interfaces is that methods which specify them as parameters are really easy to write unit tests for.</p>
<p>Implement the interface in the unit test case, add the methods with the return values that you want to check and then have the test method pass itself to the method to be tested.</p>
<p>Elegant, simple and reduces the need to mock objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ever Barreto</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1347</link>
		<dc:creator>Ever Barreto</dc:creator>
		<pubDate>Fri, 25 Sep 2009 20:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1347</guid>
		<description><![CDATA[Hi Brandon!

I just found this article today and your site looks also great (I&#039;ve already added your feed to my Feedreader)... looking forward to read more posts!

Have a nice day,

Ever Daniel]]></description>
		<content:encoded><![CDATA[<p>Hi Brandon!</p>
<p>I just found this article today and your site looks also great (I&#8217;ve already added your feed to my Feedreader)&#8230; looking forward to read more posts!</p>
<p>Have a nice day,</p>
<p>Ever Daniel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Warnock</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1346</link>
		<dc:creator>Peter Warnock</dc:creator>
		<pubDate>Fri, 25 Sep 2009 17:45:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1346</guid>
		<description><![CDATA[I love coding to the interface. They&#039;re great for parallel development, too. 

I can adopt or design an interface and hand it off to a team member to code the internals. Meanwhile, I know what methods have been exposed so that I can interact with it.

Interfaces help make objects more tangible. Think of your car stereo for example. If you go aftermarket, you have to buy an adapter to couple the interface of the stereo with the interface of the car&#039;s wiring harness.

Objects become more reusable when you know the interface and can write an adapter to pair two objects together.]]></description>
		<content:encoded><![CDATA[<p>I love coding to the interface. They&#8217;re great for parallel development, too. </p>
<p>I can adopt or design an interface and hand it off to a team member to code the internals. Meanwhile, I know what methods have been exposed so that I can interact with it.</p>
<p>Interfaces help make objects more tangible. Think of your car stereo for example. If you go aftermarket, you have to buy an adapter to couple the interface of the stereo with the interface of the car&#8217;s wiring harness.</p>
<p>Objects become more reusable when you know the interface and can write an adapter to pair two objects together.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: the_disco</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1345</link>
		<dc:creator>the_disco</dc:creator>
		<pubDate>Fri, 25 Sep 2009 15:39:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1345</guid>
		<description><![CDATA[In software design this is called strategy pattern. It&#039;s really cool that php5 really allows us to finally implement this paradigms.]]></description>
		<content:encoded><![CDATA[<p>In software design this is called strategy pattern. It&#8217;s really cool that php5 really allows us to finally implement this paradigms.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giorgio Sironi</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1344</link>
		<dc:creator>Giorgio Sironi</dc:creator>
		<pubDate>Fri, 25 Sep 2009 15:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1344</guid>
		<description><![CDATA[I probably won&#039;t put a constructor in an interface since different implementations have different collaborators requirements. Commonly the creation of an object does not use polymorphism but it is abstracted away with a factory, since in many language you cannot do new $class(), and if you do it in php there is no type safety that the object will conform to an interface - type hinting for method parameters works only for already created objects.]]></description>
		<content:encoded><![CDATA[<p>I probably won&#8217;t put a constructor in an interface since different implementations have different collaborators requirements. Commonly the creation of an object does not use polymorphism but it is abstracted away with a factory, since in many language you cannot do new $class(), and if you do it in php there is no type safety that the object will conform to an interface &#8211; type hinting for method parameters works only for already created objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Savage</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1343</link>
		<dc:creator>Brandon Savage</dc:creator>
		<pubDate>Fri, 25 Sep 2009 11:25:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1343</guid>
		<description><![CDATA[I love the ability to type hint with exceptions. It makes catching different exceptions that share the same parent or implement the same interface so easy.]]></description>
		<content:encoded><![CDATA[<p>I love the ability to type hint with exceptions. It makes catching different exceptions that share the same parent or implement the same interface so easy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fqqdk</title>
		<link>http://www.brandonsavage.net/why-interfaces-rock/#comment-1341</link>
		<dc:creator>fqqdk</dc:creator>
		<pubDate>Fri, 25 Sep 2009 10:02:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.brandonsavage.net/?p=746#comment-1341</guid>
		<description><![CDATA[this is a fun syntax, too:

interface SomeMarker {}

class MarkedException implements SomeMarker {}

try {
  throw new MarkedException;
catch(SomeMarker $ex) {
  echo &quot;isn&#039;t it fun?&quot;; 
}]]></description>
		<content:encoded><![CDATA[<p>this is a fun syntax, too:</p>
<p>interface SomeMarker {}</p>
<p>class MarkedException implements SomeMarker {}</p>
<p>try {<br />
  throw new MarkedException;<br />
catch(SomeMarker $ex) {<br />
  echo &#8220;isn&#8217;t it fun?&#8221;;<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using disk: enhanced (User agent is rejected)
Object Caching 645/666 objects using apc
Content Delivery Network via Amazon Web Services: S3: brandonsavage-net-files.s3.amazonaws.com

 Served from: www.brandonsavage.net @ 2013-05-22 16:08:56 by W3 Total Cache -->