<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1046464" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1046464</link>
    <description></description>
    <language>en</language>
          <item>
    <title>I often use interfaces to</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/php-interfaces-and-abstract-classes#comment-1248397</link>
    <description> &lt;p&gt;I often use interfaces to group like behavior on similar objects so the &#039;manager&#039; class may expect only an instance of the interface, rather than a full class.&lt;/p&gt;
&lt;p&gt;Consider:&lt;br /&gt;
A Car and a Bicycle should both move(SomeType direction) in terms of being objects in traffic, and so perhaps implement the &#039;iMoveable&#039; interface&lt;/p&gt;
&lt;p&gt;Now a TrafficCop object may have the method addEntity(iMoveable object), instead of having an addCar(Car theCar) method and a addBicycle(Bicycle aBike) method.  It can do this because all TrafficCop needs to know is that objects it obtains through the addEntity method implement a method called &#039;move(SomeType direction)&#039;&lt;/p&gt;
&lt;p&gt;And, later on, when you realize you forgot pedestrians in your implementation, no changes are required in your TrafficCop implementation...  If city planners could only design to interfaces! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/big.png&quot; title=&quot;Laughing out loud&quot; alt=&quot;Laughing out loud&quot; class=&quot;smiley-content&quot; /&gt;.&lt;/p&gt;
&lt;p&gt;Abstract classes allow for a partial implementation of an object, so other objects may extend the abstract, without the implementer having to worry that someone may try to instantiate the partial implementation...&lt;/p&gt;
 </description>
     <pubDate>Thu, 15 Apr 2010 15:17:19 +0000</pubDate>
 <dc:creator>Shaggy</dc:creator>
 <guid isPermaLink="false">comment 1248397 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>OK, so it provides a kind of</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/php-interfaces-and-abstract-classes#comment-1248316</link>
    <description> &lt;p&gt;OK, so it provides a kind of framework or standard for other people to implement, but what is the point.&lt;/p&gt;
&lt;p&gt;From what I know, it was to enforce how your class is to be used then inherited/extended.  I don&#039;t think there is a point other than that.&lt;/p&gt;
&lt;p&gt;It doesn&#039;t do any performance improvements that I know of, and no, I have not had any use for them.  Maybe if I coded with a team, but I usually do not.&lt;/p&gt;
 </description>
     <pubDate>Sun, 11 Apr 2010 02:58:55 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1248316 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
