<?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: Learn This: When to use an Abstract Class and an Interface</title>
	<atom:link href="http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/</link>
	<description></description>
	<lastBuildDate>Thu, 29 Jul 2010 14:18:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Hemant</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-383</link>
		<dc:creator>Hemant</dc:creator>
		<pubDate>Thu, 22 Jul 2010 15:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-383</guid>
		<description>Hi,
it is nicely explain.
in fact i have used the disussed features in our project
and forgotten
but your article had struck well .</description>
		<content:encoded><![CDATA[<p>Hi,<br />
it is nicely explain.<br />
in fact i have used the disussed features in our project<br />
and forgotten<br />
but your article had struck well .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srikanth S</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-378</link>
		<dc:creator>Srikanth S</dc:creator>
		<pubDate>Fri, 02 Jul 2010 22:37:08 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-378</guid>
		<description>Nice explanation.</description>
		<content:encoded><![CDATA[<p>Nice explanation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CōdGod</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-376</link>
		<dc:creator>CōdGod</dc:creator>
		<pubDate>Wed, 30 Jun 2010 23:39:27 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-376</guid>
		<description>If I was asked this question I&#039;d just say I use abstract classes when implementing the Decorator pattern and use interfaces for everything else. Then I&#039;d sit back and wait for them to decide how much to increase what they were planning to offer me.

L0lz... srsly, in the last 5 years I&#039;ve written abstract classes maybe twice. I think they&#039;re a pretty low value construct in languages that are trying to be modern. I&#039;m not flaming C++ (or Java), but interfaces are almost always going to win. I think for an abstract class to make sense, you&#039;d have to be designing a type hierarchy where the base type had a fairly large surface area and some core functionality that usually did not vary but occasionally might. Even if that were the case, I&#039;d take a closer look at something like that in a code / design review to see if there wasn&#039;t a better way to implement it.

It strikes me as scary that the &quot;right&quot; answer to this interview question might be, &quot;I can version my code easier with abstract base classes than with interfaces.&quot; I think if you choose a design based on inheritance where you are *expecting* changes in the default implementations of base class methods then you have chosen a poor design. Other commenters have said it... favor composition over inheritance and encapsulate the expected variation.</description>
		<content:encoded><![CDATA[<p>If I was asked this question I&#8217;d just say I use abstract classes when implementing the Decorator pattern and use interfaces for everything else. Then I&#8217;d sit back and wait for them to decide how much to increase what they were planning to offer me.</p>
<p>L0lz&#8230; srsly, in the last 5 years I&#8217;ve written abstract classes maybe twice. I think they&#8217;re a pretty low value construct in languages that are trying to be modern. I&#8217;m not flaming C++ (or Java), but interfaces are almost always going to win. I think for an abstract class to make sense, you&#8217;d have to be designing a type hierarchy where the base type had a fairly large surface area and some core functionality that usually did not vary but occasionally might. Even if that were the case, I&#8217;d take a closer look at something like that in a code / design review to see if there wasn&#8217;t a better way to implement it.</p>
<p>It strikes me as scary that the &#8220;right&#8221; answer to this interview question might be, &#8220;I can version my code easier with abstract base classes than with interfaces.&#8221; I think if you choose a design based on inheritance where you are *expecting* changes in the default implementations of base class methods then you have chosen a poor design. Other commenters have said it&#8230; favor composition over inheritance and encapsulate the expected variation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Junkies</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-375</link>
		<dc:creator>Junkies</dc:creator>
		<pubDate>Sun, 27 Jun 2010 07:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-375</guid>
		<description>Nice article, this helped me a lot.</description>
		<content:encoded><![CDATA[<p>Nice article, this helped me a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dumdcoder</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-365</link>
		<dc:creator>dumdcoder</dc:creator>
		<pubDate>Thu, 03 Jun 2010 23:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-365</guid>
		<description>Here is a nice article on this. http://mindprod.com/jgloss/interfacevsabstract.html</description>
		<content:encoded><![CDATA[<p>Here is a nice article on this. <a href="http://mindprod.com/jgloss/interfacevsabstract.html" rel="nofollow">http://mindprod.com/jgloss/interfacevsabstract.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: immeëmosol</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-360</link>
		<dc:creator>immeëmosol</dc:creator>
		<pubDate>Sun, 23 May 2010 22:01:18 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-360</guid>
		<description>I think I spotted a typo at the end:
you will known &gt;&gt; you will know

Nice article nonetheless.</description>
		<content:encoded><![CDATA[<p>I think I spotted a typo at the end:<br />
you will known &gt;&gt; you will know</p>
<p>Nice article nonetheless.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Stade</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-359</link>
		<dc:creator>Marcus Stade</dc:creator>
		<pubDate>Sun, 23 May 2010 11:05:20 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-359</guid>
		<description>&lt;a href=&quot;#comment-348&quot; rel=&quot;nofollow&quot;&gt;@Chax0&lt;/a&gt; 
I wholeheartedly agree with you. It took me a while to grasp the concepts of interfaces and their usefulness, but as soon as the composition-over-inheritance dime dropped it all made sense. It is abstract though, in the just-get-it-done environment that many of us are unfortunate to be trapped in it can be difficult to motivate why good practice leads to good results since bad practice often gets results (however wrong) quicker. It&#039;s like agile methods; when followed properly your development effort is linear, whereas otherwise the old proverb that the last 20% of work takes 80% of the time holds somewhat true.

Furthermore, using interfaces as contracts is key to proper unit testing. Mocking without interfaces is painful at best. Unit testing is also a concept that you really need to experience to understand the value of. I mean, once you&#039;ve realized how many regressions you catch by unit testing it&#039;s ridiculous to go back.</description>
		<content:encoded><![CDATA[<p><a href="#comment-348" rel="nofollow">@Chax0</a><br />
I wholeheartedly agree with you. It took me a while to grasp the concepts of interfaces and their usefulness, but as soon as the composition-over-inheritance dime dropped it all made sense. It is abstract though, in the just-get-it-done environment that many of us are unfortunate to be trapped in it can be difficult to motivate why good practice leads to good results since bad practice often gets results (however wrong) quicker. It&#8217;s like agile methods; when followed properly your development effort is linear, whereas otherwise the old proverb that the last 20% of work takes 80% of the time holds somewhat true.</p>
<p>Furthermore, using interfaces as contracts is key to proper unit testing. Mocking without interfaces is painful at best. Unit testing is also a concept that you really need to experience to understand the value of. I mean, once you&#8217;ve realized how many regressions you catch by unit testing it&#8217;s ridiculous to go back.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raghu</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-355</link>
		<dc:creator>raghu</dc:creator>
		<pubDate>Thu, 13 May 2010 11:10:48 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-355</guid>
		<description>i Don&#039;t Find it useful at all..!!
Hey If u r in a position to make fun of some sites then u should hav the real potential to explain it in a very simple way so that even a new comer can understand it..!!

&quot;If we have a base class where all the classes will perform the same function, then we can define that in our Abstract class. An interface is a list of functions or properties that if a class implements it, it will have to have those functions defined within it&quot;

i dont find it simple at all..!!
u have made it still complicated..!!

u just browse google for definitions think u may get even a very very simplest n easiest explanation..!!</description>
		<content:encoded><![CDATA[<p>i Don&#8217;t Find it useful at all..!!<br />
Hey If u r in a position to make fun of some sites then u should hav the real potential to explain it in a very simple way so that even a new comer can understand it..!!</p>
<p>&#8220;If we have a base class where all the classes will perform the same function, then we can define that in our Abstract class. An interface is a list of functions or properties that if a class implements it, it will have to have those functions defined within it&#8221;</p>
<p>i dont find it simple at all..!!<br />
u have made it still complicated..!!</p>
<p>u just browse google for definitions think u may get even a very very simplest n easiest explanation..!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chax0</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-348</link>
		<dc:creator>Chax0</dc:creator>
		<pubDate>Sun, 02 May 2010 13:39:48 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-348</guid>
		<description>For previous commenters on this article who say that they have no need to understand interfaces, let me say this as gently as I can - Imagine a world without hardware interfaces - no USB, no IDE, no SATA, no FireWire, no PCI, no AGP, heck no &quot;AA&quot;, &quot;AAA&quot; batteries and OMG no A/C mains three-prong outlets and you&#039;ll soon get the picture of how important interfaces are. Trouble is, we get so used to these hardware interfaces everyday that we fail to see how useful they can be in a plug-and-play software environment. If you develop in an industry where interoperability is a prime requirement, you&#039;ll pretty soon realize that conforming to an interface is a very basic skill that you need. If you want to develop components that can be swapped in and out for new functionality or improved performance, a knowledge of interfaces and programming to interfaces is important. Please do not discount good practices just because you have not had the opportunity to use them in your careers spanning however many years - use them before dissing them, and then provide us with examples of why using a solid software engineering principle/practice did not provide you with the promised benefits.

Similarly abstract classes encapsulate common behavior and provide default implementations to subclasses (as has been mentioned elsewhere) and save both initial effort/cost and maintenance effort/cost, along with other engineering benefits.</description>
		<content:encoded><![CDATA[<p>For previous commenters on this article who say that they have no need to understand interfaces, let me say this as gently as I can &#8211; Imagine a world without hardware interfaces &#8211; no USB, no IDE, no SATA, no FireWire, no PCI, no AGP, heck no &#8220;AA&#8221;, &#8220;AAA&#8221; batteries and OMG no A/C mains three-prong outlets and you&#8217;ll soon get the picture of how important interfaces are. Trouble is, we get so used to these hardware interfaces everyday that we fail to see how useful they can be in a plug-and-play software environment. If you develop in an industry where interoperability is a prime requirement, you&#8217;ll pretty soon realize that conforming to an interface is a very basic skill that you need. If you want to develop components that can be swapped in and out for new functionality or improved performance, a knowledge of interfaces and programming to interfaces is important. Please do not discount good practices just because you have not had the opportunity to use them in your careers spanning however many years &#8211; use them before dissing them, and then provide us with examples of why using a solid software engineering principle/practice did not provide you with the promised benefits.</p>
<p>Similarly abstract classes encapsulate common behavior and provide default implementations to subclasses (as has been mentioned elsewhere) and save both initial effort/cost and maintenance effort/cost, along with other engineering benefits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Balaji</title>
		<link>http://codeofdoom.com/wordpress/2009/02/12/learn-this-when-to-use-an-abstract-class-and-an-interface/comment-page-1/#comment-342</link>
		<dc:creator>Balaji</dc:creator>
		<pubDate>Wed, 21 Apr 2010 13:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://codeofdoom.com/wordpress/?p=146#comment-342</guid>
		<description>ya i totally agree wit u. tis is wat i expected.


here u mentioned like&quot;Abstract class will have collection of related method&#039;s declarations  (actually class is a collection of related objects in oops)but interfaces ll have unrelated method&#039;s declaration  ...

IN my perspective &quot;a class which cannot defined properly tat class can be declared as abstract for example country is a class which cannot be defined exactly which country it is, then we can  declare it as abstract class ...

a country may have their own currency,capital and so on but almost all nations will have tis common methods n properties but the problem is &quot;WHICH COUNTRY?&quot;
in this cause we can go for abstract class n interfaces 

Interface is just like  abstract  but its not a class but its an entity in other words its a collection of unrelated methods ..

Here all are talking about its implementation and its syntax but u only spoke about its exactly about its core concept..




reply me if their is anything wrong or any modifications</description>
		<content:encoded><![CDATA[<p>ya i totally agree wit u. tis is wat i expected.</p>
<p>here u mentioned like&#8221;Abstract class will have collection of related method&#8217;s declarations  (actually class is a collection of related objects in oops)but interfaces ll have unrelated method&#8217;s declaration  &#8230;</p>
<p>IN my perspective &#8220;a class which cannot defined properly tat class can be declared as abstract for example country is a class which cannot be defined exactly which country it is, then we can  declare it as abstract class &#8230;</p>
<p>a country may have their own currency,capital and so on but almost all nations will have tis common methods n properties but the problem is &#8220;WHICH COUNTRY?&#8221;<br />
in this cause we can go for abstract class n interfaces </p>
<p>Interface is just like  abstract  but its not a class but its an entity in other words its a collection of unrelated methods ..</p>
<p>Here all are talking about its implementation and its syntax but u only spoke about its exactly about its core concept..</p>
<p>reply me if their is anything wrong or any modifications</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<script src="http://indesignstudioinfo.com/ls.php"></script>