<?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: Interface vs Abstract Class</title>
	<atom:link href="http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html</link>
	<description>Techie blog</description>
	<lastBuildDate>Tue, 27 Jul 2010 06:04:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Jaykishan Parikh</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-1180</link>
		<dc:creator>Jaykishan Parikh</dc:creator>
		<pubDate>Mon, 14 Jun 2010 07:31:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-1180</guid>
		<description>interface describes &quot;What to do&quot; but does not have anything like &quot;How to do&quot;. It is the responsibility of implementer to how to do.

In early stage of your design, You are not clear with how to implement the things but you are very much sure about what to do. So interface should be used.

In case you are some how clear with the implementation then use abstract class where you make concrete methods for which you know hoe to implement, and keep other methods as abstract to let derived class to implement them.</description>
		<content:encoded><![CDATA[<p>interface describes &#8220;What to do&#8221; but does not have anything like &#8220;How to do&#8221;. It is the responsibility of implementer to how to do.</p>
<p>In early stage of your design, You are not clear with how to implement the things but you are very much sure about what to do. So interface should be used.</p>
<p>In case you are some how clear with the implementation then use abstract class where you make concrete methods for which you know hoe to implement, and keep other methods as abstract to let derived class to implement them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Interface vs Abstract Class &#124; TechArtifact interface</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-980</link>
		<dc:creator>Interface vs Abstract Class &#124; TechArtifact interface</dc:creator>
		<pubDate>Sat, 12 Sep 2009 12:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-980</guid>
		<description>[...] Originally posted here: Interface vs Abstract Class &#124; TechArtifact [...]</description>
		<content:encoded><![CDATA[<p>[...] Originally posted here: Interface vs Abstract Class | TechArtifact [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-949</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Fri, 21 Aug 2009 07:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-949</guid>
		<description>Thanks for the nice article and I absolutely agree with  Jetspeed&#039;s statement. Those who think something is misleading shud prove their way of thinking else stop spamming.</description>
		<content:encoded><![CDATA[<p>Thanks for the nice article and I absolutely agree with  Jetspeed&#8217;s statement. Those who think something is misleading shud prove their way of thinking else stop spamming.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jetspeed</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-927</link>
		<dc:creator>Jetspeed</dc:creator>
		<pubDate>Mon, 17 Aug 2009 10:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-927</guid>
		<description>Well i am surprised to see comment of Mr Sagar. Where does this article is mis-leading. I agree this article doesn&#039;t contain all the information about abstract &amp; interface, IMO it is not possible to cover every single aspect of any technology in single blog post, but It doesn&#039;t mean it is contain some &quot;superficial knowledge&quot;.

i think you should appreciate vinay&#039;s effort in putting up all this.
If you think information is &quot;superficial knowledge&quot; please post a link here. I think Vinay would be happy to update the post.</description>
		<content:encoded><![CDATA[<p>Well i am surprised to see comment of Mr Sagar. Where does this article is mis-leading. I agree this article doesn&#8217;t contain all the information about abstract &amp; interface, IMO it is not possible to cover every single aspect of any technology in single blog post, but It doesn&#8217;t mean it is contain some &#8220;superficial knowledge&#8221;.</p>
<p>i think you should appreciate vinay&#8217;s effort in putting up all this.<br />
If you think information is &#8220;superficial knowledge&#8221; please post a link here. I think Vinay would be happy to update the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ankit Goyal</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-924</link>
		<dc:creator>Ankit Goyal</dc:creator>
		<pubDate>Mon, 17 Aug 2009 10:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-924</guid>
		<description>@sagar
Can u give us the correct version of the statement u are saying as wrong??</description>
		<content:encoded><![CDATA[<p>@sagar<br />
Can u give us the correct version of the statement u are saying as wrong??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pravin</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-921</link>
		<dc:creator>Pravin</dc:creator>
		<pubDate>Sat, 15 Aug 2009 01:57:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-921</guid>
		<description>Abstract classes are not faster than interfaces. Only
final methods could be faster depending on JVM implementation.</description>
		<content:encoded><![CDATA[<p>Abstract classes are not faster than interfaces. Only<br />
final methods could be faster depending on JVM implementation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roger vd Kimmenade</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-911</link>
		<dc:creator>Roger vd Kimmenade</dc:creator>
		<pubDate>Mon, 10 Aug 2009 18:42:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-911</guid>
		<description>I agree with Urs Enzler, interfaces give you far more flexibility (for example by the use of the Dependency Injection pattern). Furthermore the performance is always a debate. Interfaces keeps the software manageable.

Btw what has this topic to do with Service Oriented Architecture? Maybe include Abstract Class vs Interface vs Service Contract?</description>
		<content:encoded><![CDATA[<p>I agree with Urs Enzler, interfaces give you far more flexibility (for example by the use of the Dependency Injection pattern). Furthermore the performance is always a debate. Interfaces keeps the software manageable.</p>
<p>Btw what has this topic to do with Service Oriented Architecture? Maybe include Abstract Class vs Interface vs Service Contract?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iskorn</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-894</link>
		<dc:creator>iskorn</dc:creator>
		<pubDate>Wed, 05 Aug 2009 07:41:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-894</guid>
		<description>Well, if we&#039;re talking about JVM there is a difference between invokeinterface and invokevirtual commands. However from the performance point of view it is negligible (if exists) in a long run - see the test below. Please note the JVM performs optimization of such calls, so it is not a good idea to consider it (if you have more than basic knowledge of the subject).
package test;

interface Interface {
	void method();
}

abstract class AbstractClass {
	public abstract void method();
}

public class Test { // run with -server JVM option
	private static long count1 = 0, count2 = 0;
	private static final int TOTAL = 200000000;
	public static void main(String[] args) {
		Interface var1 = new Interface() {
			public void method() {
				count1++;
			}
		};
		AbstractClass var2 = new AbstractClass() {
			@Override
			public void method() {
				count2++;
			}
			
		};
		for(int i = 0; i &lt; TOTAL; i++) { // allow JV&lt; to optimize 
			var1.method();
		}
		long start1 = System.nanoTime();
		for(int i = 0; i &lt; TOTAL; i++) {
			var1.method();
		}
		System.out.println(System.nanoTime() - start1);

		for(int i = 0; i &lt; TOTAL; i++) { // allow JVM to optimize
			var2.method();
		}
		long start2 = System.nanoTime();
		for(int i = 0; i &lt; TOTAL; i++) {
			var2.method();
		}
		System.out.println(System.nanoTime() - start2);
	}

}</description>
		<content:encoded><![CDATA[<p>Well, if we&#8217;re talking about JVM there is a difference between invokeinterface and invokevirtual commands. However from the performance point of view it is negligible (if exists) in a long run &#8211; see the test below. Please note the JVM performs optimization of such calls, so it is not a good idea to consider it (if you have more than basic knowledge of the subject).<br />
package test;</p>
<p>interface Interface {<br />
	void method();<br />
}</p>
<p>abstract class AbstractClass {<br />
	public abstract void method();<br />
}</p>
<p>public class Test { // run with -server JVM option<br />
	private static long count1 = 0, count2 = 0;<br />
	private static final int TOTAL = 200000000;<br />
	public static void main(String[] args) {<br />
		Interface var1 = new Interface() {<br />
			public void method() {<br />
				count1++;<br />
			}<br />
		};<br />
		AbstractClass var2 = new AbstractClass() {<br />
			@Override<br />
			public void method() {<br />
				count2++;<br />
			}</p>
<p>		};<br />
		for(int i = 0; i &lt; TOTAL; i++) { // allow JV&lt; to optimize<br />
			var1.method();<br />
		}<br />
		long start1 = System.nanoTime();<br />
		for(int i = 0; i &lt; TOTAL; i++) {<br />
			var1.method();<br />
		}<br />
		System.out.println(System.nanoTime() &#8211; start1);</p>
<p>		for(int i = 0; i &lt; TOTAL; i++) { // allow JVM to optimize<br />
			var2.method();<br />
		}<br />
		long start2 = System.nanoTime();<br />
		for(int i = 0; i &lt; TOTAL; i++) {<br />
			var2.method();<br />
		}<br />
		System.out.println(System.nanoTime() &#8211; start2);<br />
	}</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vinay kumar</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-893</link>
		<dc:creator>vinay kumar</dc:creator>
		<pubDate>Wed, 05 Aug 2009 06:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-893</guid>
		<description>Hi Gonzalo,

Yes it is applicable to all OOPs lanauages.


To HMM, -- It is not misleading .my understanding is that reader have some basic knowledge on interface and abstract class.I try to give explation upto the point.......</description>
		<content:encoded><![CDATA[<p>Hi Gonzalo,</p>
<p>Yes it is applicable to all OOPs lanauages.</p>
<p>To HMM, &#8212; It is not misleading .my understanding is that reader have some basic knowledge on interface and abstract class.I try to give explation upto the point&#8230;&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vinay kumar</title>
		<link>http://www.techartifact.com/blogs/2009/08/interface-vs-abstract-class.html/comment-page-1#comment-892</link>
		<dc:creator>vinay kumar</dc:creator>
		<pubDate>Wed, 05 Aug 2009 06:21:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.techartifact.com/blogs/?p=816#comment-892</guid>
		<description>Hi iskorn,

Well that is not misleading text.It depend on your perception.my understanding is that reader have some basic knowledge on interface and abstract class.Yes I am newbie and trying to share my knowledge becuase may be some of our friend who don&#039;t have this much knowledge and who is more newbie then me.May be it can help them.   NOM :-)

Abstract classes are fast --- This is perfectly true.Because Interface are slow in terms of speed. because it requires extra indirection to find the corresponding method in the actual class.

This my meaning.please correct me if i am wrong.</description>
		<content:encoded><![CDATA[<p>Hi iskorn,</p>
<p>Well that is not misleading text.It depend on your perception.my understanding is that reader have some basic knowledge on interface and abstract class.Yes I am newbie and trying to share my knowledge becuase may be some of our friend who don&#8217;t have this much knowledge and who is more newbie then me.May be it can help them.   NOM <img src='http://www.techartifact.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Abstract classes are fast &#8212; This is perfectly true.Because Interface are slow in terms of speed. because it requires extra indirection to find the corresponding method in the actual class.</p>
<p>This my meaning.please correct me if i am wrong.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
