<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-13073408.post4601178792543137442..comments</id><updated>2011-05-26T12:09:49.499-04:00</updated><category term='c#'/><category term='LINQ'/><category term='Visual Studio'/><category term='technology'/><category term='csharp'/><category term='MVC'/><category term='bugs'/><category term='development'/><category term='programming'/><category term='Razor'/><category term='web development'/><category term='productivity'/><category term='Windows7'/><category term='Windows'/><category term='IIS'/><category term='networking'/><category term='hardware'/><category term='database'/><category term='.NET'/><category term='ASP.NET'/><category term='T4MVC'/><title type='text'>Comments on Compiled Thoughts: abstract VS. virtual explained</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.compiledthoughts.com/feeds/4601178792543137442/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html'/><author><name>Peter Lanoie</name><uri>http://www.blogger.com/profile/11480942345027154915</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_1ODj8s-E01o/SpfoAWkvESI/AAAAAAAAAK8/6z4OkQUZQEk/s1600-R/1f8b331ee1b89573b7632226b8e6632b.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13073408.post-3124855431357250998</id><published>2011-05-26T12:09:49.499-04:00</published><updated>2011-05-26T12:09:49.499-04:00</updated><title type='text'>I still don&amp;#39;t see the point of virtual. Since ...</title><content type='html'>I still don&amp;#39;t see the point of virtual. Since you can override a non virtual method, what&amp;#39;s the point of having virtual at all?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/3124855431357250998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/3124855431357250998'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html?showComment=1306426189499#c3124855431357250998' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html' ref='tag:blogger.com,1999:blog-13073408.post-4601178792543137442' source='http://www.blogger.com/feeds/13073408/posts/default/4601178792543137442' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-727239089'/></entry><entry><id>tag:blogger.com,1999:blog-13073408.post-6686792610201464616</id><published>2011-03-17T15:45:09.414-04:00</published><updated>2011-03-17T15:45:09.414-04:00</updated><title type='text'>Thanks for the post and article.  I&amp;#39;m a newbie...</title><content type='html'>Thanks for the post and article.  I&amp;#39;m a newbie to C# and this def. helped clear up the confusion i had between abstract &amp;amp; virtual modifiers.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/6686792610201464616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/6686792610201464616'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html?showComment=1300391109414#c6686792610201464616' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html' ref='tag:blogger.com,1999:blog-13073408.post-4601178792543137442' source='http://www.blogger.com/feeds/13073408/posts/default/4601178792543137442' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1029985508'/></entry><entry><id>tag:blogger.com,1999:blog-13073408.post-6173582111295559766</id><published>2010-12-02T11:52:48.503-05:00</published><updated>2010-12-02T11:52:48.503-05:00</updated><title type='text'>Very nice and short article with a clear point. I ...</title><content type='html'>Very nice and short article with a clear point. I read it because I was not sure on the issue.&lt;br /&gt;However, I would just like to add something that can be easily concluded from what is written and what you could have mentioned in there:&lt;br /&gt;1) A class with an abstract method must be abstract as it doesn&amp;#39;t have the implementation for one of its methods.&lt;br /&gt;2) A virtual method is sort-of default implementation which can be overridden. Thus, when there is a virtual method, the compiler acts as follows (in any inherited class):&lt;br /&gt;- if there is no override it uses the method from parent class (default implementation)&lt;br /&gt;- if there is override it uses the overridden method from the inherited class.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/6173582111295559766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/6173582111295559766'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html?showComment=1291308768503#c6173582111295559766' title=''/><author><name>oggy</name><uri>http://www.blogger.com/profile/11984698600886992183</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://3.bp.blogspot.com/_mPa-cAP2jdQ/SvXOufRqV8I/AAAAAAAAAG0/B7ac3VyFkf0/S220/WaterSkiing.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html' ref='tag:blogger.com,1999:blog-13073408.post-4601178792543137442' source='http://www.blogger.com/feeds/13073408/posts/default/4601178792543137442' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1621372813'/></entry><entry><id>tag:blogger.com,1999:blog-13073408.post-5728346478174623843</id><published>2010-01-18T02:45:59.351-05:00</published><updated>2010-01-18T02:45:59.351-05:00</updated><title type='text'>In few words it is expaining lots of.Thank you.</title><content type='html'>In few words it is expaining lots of.Thank you.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/5728346478174623843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/5728346478174623843'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html?showComment=1263800759351#c5728346478174623843' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html' ref='tag:blogger.com,1999:blog-13073408.post-4601178792543137442' source='http://www.blogger.com/feeds/13073408/posts/default/4601178792543137442' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1388119162'/></entry><entry><id>tag:blogger.com,1999:blog-13073408.post-3788523009906240139</id><published>2009-08-02T16:10:31.844-04:00</published><updated>2009-08-02T16:10:31.844-04:00</updated><title type='text'>Thank you for the article, that helps me a lot. As...</title><content type='html'>Thank you for the article, that helps me a lot. As an C# newbie, I have a lot to get familiar with. Cheers!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/3788523009906240139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/3788523009906240139'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html?showComment=1249243831844#c3788523009906240139' title=''/><author><name>Stephen</name><uri>http://www.blogger.com/profile/00039787110083814434</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html' ref='tag:blogger.com,1999:blog-13073408.post-4601178792543137442' source='http://www.blogger.com/feeds/13073408/posts/default/4601178792543137442' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1527449084'/></entry><entry><id>tag:blogger.com,1999:blog-13073408.post-5268887806911719010</id><published>2008-03-13T17:06:00.000-04:00</published><updated>2008-03-13T17:06:00.000-04:00</updated><title type='text'>Isn't that rather the point of abstract methods?  ...</title><content type='html'>Isn't that rather the point of abstract methods?  The super class defines methods that it will call at some point and it's up to the sub class to provide the concrete implementation.  This and the "Hollywood Principle" are defined in the "Template Pattern" section of the HFDP book (~page 289).  Good catch.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/5268887806911719010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/5268887806911719010'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html?showComment=1205442360000#c5268887806911719010' title=''/><author><name>Peter Lanoie</name><uri>http://www.blogger.com/profile/11480942345027154915</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://bp0.blogger.com/_1ODj8s-E01o/R5AQEseoU-I/AAAAAAAAABo/bExSSgWV7v0/S220/PeterHead.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html' ref='tag:blogger.com,1999:blog-13073408.post-4601178792543137442' source='http://www.blogger.com/feeds/13073408/posts/default/4601178792543137442' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1229900851'/></entry><entry><id>tag:blogger.com,1999:blog-13073408.post-4959426329315602729</id><published>2008-03-13T13:19:00.000-04:00</published><updated>2008-03-13T13:19:00.000-04:00</updated><title type='text'>Of course, I tend to use abstract classes more for...</title><content type='html'>Of course, I tend to use abstract classes more for the "Interface" (not as in an &lt;B&gt;actual&lt;/B&gt; interface, but as you say, using it to compose objects of "generic" types rather than concrete classes..&lt;BR/&gt;&lt;BR/&gt;I too am also a great fan of head first design patterns ;)&lt;BR/&gt;&lt;BR/&gt;In my comment I was referring more to the "Hollywood Principle" (don't call us, we'll call you), I believe it gets a mention once or twice in HFDP.. Where you can use hook methods to allow subclasses to add customised logic in between steps within the superclass, this may be some form of environment preparation (or whatever). I found that this simple construct allows you to create generic classes that may not always be immediately obvious, and if required, can later be refactored to remove any bad smells.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/4959426329315602729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/4959426329315602729'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html?showComment=1205428740000#c4959426329315602729' title=''/><author><name>Rob</name><uri>http://www.blogger.com/profile/14925295471808014539</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html' ref='tag:blogger.com,1999:blog-13073408.post-4601178792543137442' source='http://www.blogger.com/feeds/13073408/posts/default/4601178792543137442' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1822598589'/></entry><entry><id>tag:blogger.com,1999:blog-13073408.post-1091002772080245175</id><published>2008-03-13T12:11:00.000-04:00</published><updated>2008-03-13T12:11:00.000-04:00</updated><title type='text'>Rob,&lt;br&gt;&lt;br&gt;Inheritance has its place, but it's of...</title><content type='html'>Rob,&lt;BR/&gt;&lt;BR/&gt;Inheritance has its place, but it's often overused.  Just be careful about how you use it.  One fundamental design principal is "Favor composition over inheritance".  That principal can also be phrased like this "HAS-A can be better than IS-A". [Thanks to &lt;A HREF="http://www.oreilly.com/catalog/hfdesignpat/" REL="nofollow"&gt;Head First Design Patterns&lt;/A&gt; for enlightening me on those ideas.]  While it may not be as programmatically elegant, it's often technically and logically simpler to introduce functionality into a class by including another class as a member of it instead of trying to marry the new stuff into a super class.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/1091002772080245175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/1091002772080245175'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html?showComment=1205424660000#c1091002772080245175' title=''/><author><name>Peter Lanoie</name><uri>http://www.blogger.com/profile/11480942345027154915</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://bp0.blogger.com/_1ODj8s-E01o/R5AQEseoU-I/AAAAAAAAABo/bExSSgWV7v0/S220/PeterHead.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html' ref='tag:blogger.com,1999:blog-13073408.post-4601178792543137442' source='http://www.blogger.com/feeds/13073408/posts/default/4601178792543137442' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1229900851'/></entry><entry><id>tag:blogger.com,1999:blog-13073408.post-5025492597064876211</id><published>2008-03-13T11:29:00.000-04:00</published><updated>2008-03-13T11:29:00.000-04:00</updated><title type='text'>Good point to raise, Peter, I see many new develop...</title><content type='html'>Good point to raise, Peter, I see many new developers such as myself not using abstract classes enough.&lt;BR/&gt;&lt;BR/&gt;Since I have been trying to bone up on design patterns, I am beginning to see the importance, and increase my reliance on abstract classes. They are &lt;B&gt;VERY&lt;/B&gt; useful..&lt;BR/&gt;&lt;BR/&gt;A good follow on to this may be to outline hook methods? They are a very powerful part of "&lt;I&gt;abstract class programming&lt;/I&gt;", they can really help in creating abstract classes that are customisable and extensible?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/5025492597064876211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13073408/4601178792543137442/comments/default/5025492597064876211'/><link rel='alternate' type='text/html' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html?showComment=1205422140000#c5025492597064876211' title=''/><author><name>Rob</name><uri>http://www.blogger.com/profile/14925295471808014539</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.compiledthoughts.com/2008/03/abstract-vs-virtual-explained.html' ref='tag:blogger.com,1999:blog-13073408.post-4601178792543137442' source='http://www.blogger.com/feeds/13073408/posts/default/4601178792543137442' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1822598589'/></entry></feed>
