<?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: Når skal man bruke SOLID prinsippene?</title>
	<atom:link href="http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/</link>
	<description>om livet som .net utvikler</description>
	<lastBuildDate>Wed, 08 Feb 2012 09:53:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Torbjørn</title>
		<link>http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50531</link>
		<dc:creator>Torbjørn</dc:creator>
		<pubDate>Sun, 03 May 2009 20:46:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50531</guid>
		<description>Yes, yes, we agree. I think maybe I just reached that maturity level, and I just wanted to shout it to the world :)

Let&#039;s hope my readers also read the comments.. I wouldn&#039;t want my post to make people stop applying good design principles. As with most techniques, especially so within agile, one should apply them fully to start with - the way the masters describe them based on their experiences - and then later figure out as one go what works best for oneself in specific cases.</description>
		<content:encoded><![CDATA[<p>Yes, yes, we agree. I think maybe I just reached that maturity level, and I just wanted to shout it to the world :)</p>
<p>Let&#8217;s hope my readers also read the comments.. I wouldn&#8217;t want my post to make people stop applying good design principles. As with most techniques, especially so within agile, one should apply them fully to start with &#8211; the way the masters describe them based on their experiences &#8211; and then later figure out as one go what works best for oneself in specific cases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tore Vestues</title>
		<link>http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50525</link>
		<dc:creator>Tore Vestues</dc:creator>
		<pubDate>Sun, 03 May 2009 19:30:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50525</guid>
		<description>I totally agree on following principles (or patterns) for their own sake is a bad thing. It creates accidental complexity, and that’s the kind of complexity we can best live without.

On the other hand I find some principles fundamental. I am passionate about readable and maintainable code. I have seen quite a lot of the opposite in my years as a developer, and know how hard unreadable code is to maintain. Some principles have to be applied to some degree at all times in order to write understandable code. 

Creating classes with several distinct and different responsibilities often creates a distinct smell of unreadableness. To prevent this smell Robert Martin talks about, among other things, SRP. I like to talk about cohesion. Cohesion is about placing logic where it belongs, and being able to find it when you need it. I think SRP is a great principle to get higher cohesion. I split my classes if they are getting hard to understand, and they tend to be hard to understand when they have too many responsibilities.


When it comes to the Solid-principles:

The problem with the Solid-principles these days is that people seem to think that those are the five only true principles of design. First, There are many others and IMHO also a few more fundamental and important principles than the Solid-principles. Second, I do not actually find all five of the Solid-principles that important in my daily work. I love SRP for maintainability (and I focus on cohesion all day long). I use DIP daily for testing. Sometimes, when I feel really clever, I use OCP. But when it comes to LSP I think a more important principle is &quot;Be very skeptical of inheritance all together&quot;.

- Tore Vestues</description>
		<content:encoded><![CDATA[<p>I totally agree on following principles (or patterns) for their own sake is a bad thing. It creates accidental complexity, and that’s the kind of complexity we can best live without.</p>
<p>On the other hand I find some principles fundamental. I am passionate about readable and maintainable code. I have seen quite a lot of the opposite in my years as a developer, and know how hard unreadable code is to maintain. Some principles have to be applied to some degree at all times in order to write understandable code. </p>
<p>Creating classes with several distinct and different responsibilities often creates a distinct smell of unreadableness. To prevent this smell Robert Martin talks about, among other things, SRP. I like to talk about cohesion. Cohesion is about placing logic where it belongs, and being able to find it when you need it. I think SRP is a great principle to get higher cohesion. I split my classes if they are getting hard to understand, and they tend to be hard to understand when they have too many responsibilities.</p>
<p>When it comes to the Solid-principles:</p>
<p>The problem with the Solid-principles these days is that people seem to think that those are the five only true principles of design. First, There are many others and IMHO also a few more fundamental and important principles than the Solid-principles. Second, I do not actually find all five of the Solid-principles that important in my daily work. I love SRP for maintainability (and I focus on cohesion all day long). I use DIP daily for testing. Sometimes, when I feel really clever, I use OCP. But when it comes to LSP I think a more important principle is &#8220;Be very skeptical of inheritance all together&#8221;.</p>
<p>- Tore Vestues</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nijhof</title>
		<link>http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50523</link>
		<dc:creator>Mark Nijhof</dc:creator>
		<pubDate>Sun, 03 May 2009 19:19:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50523</guid>
		<description>Well when doing TDD it becomes very cumbersome to not apply SOLID, then you suddenly have so much setup in your tests and external dependencies that your head explodes :) So if you are doing proper TDD then I don&#039;t think you have a problem discovering when to and when not to apply the right principles. TDD and SOLID go hand in hand.

Btw I agree with the last sentence 1000% and that is the reason why I would not easily write a post suggesting that developers perhaps should not follow the principles. I believe when the developers are mature enough to see that violation is better then following a principle that then they are mature enough to decide not to follow it. The problem usually is that principles are left behind because the developer doesn&#039;t really understand it.</description>
		<content:encoded><![CDATA[<p>Well when doing TDD it becomes very cumbersome to not apply SOLID, then you suddenly have so much setup in your tests and external dependencies that your head explodes :) So if you are doing proper TDD then I don&#8217;t think you have a problem discovering when to and when not to apply the right principles. TDD and SOLID go hand in hand.</p>
<p>Btw I agree with the last sentence 1000% and that is the reason why I would not easily write a post suggesting that developers perhaps should not follow the principles. I believe when the developers are mature enough to see that violation is better then following a principle that then they are mature enough to decide not to follow it. The problem usually is that principles are left behind because the developer doesn&#8217;t really understand it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Torbjørn</title>
		<link>http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50521</link>
		<dc:creator>Torbjørn</dc:creator>
		<pubDate>Sun, 03 May 2009 19:02:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50521</guid>
		<description>Despite what you are saying - and I believe you are correct about most of it - the realization I made before I wrote this article really made it clear to me how it all fits together: The principles, the pattern, TDD, refactoring, and agile design and coding in general.

You don&#039;t write code without a test. You don&#039;t refactor without a need. You don&#039;t apply the patterns without a violation to a principle that you have discovered through some change you had to do to the code because of a test.

But since developers usually apply too few of the principles, I understand why this hasn&#039;t been the focus in the lectures and articles I&#039;ve seen so far.</description>
		<content:encoded><![CDATA[<p>Despite what you are saying &#8211; and I believe you are correct about most of it &#8211; the realization I made before I wrote this article really made it clear to me how it all fits together: The principles, the pattern, TDD, refactoring, and agile design and coding in general.</p>
<p>You don&#8217;t write code without a test. You don&#8217;t refactor without a need. You don&#8217;t apply the patterns without a violation to a principle that you have discovered through some change you had to do to the code because of a test.</p>
<p>But since developers usually apply too few of the principles, I understand why this hasn&#8217;t been the focus in the lectures and articles I&#8217;ve seen so far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Nijhof</title>
		<link>http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50518</link>
		<dc:creator>Mark Nijhof</dc:creator>
		<pubDate>Sun, 03 May 2009 18:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.kjempekjekt.com/2009/05/03/nar-skal-man-bruke-solid-prinsippene/#comment-50518</guid>
		<description>Ok I&#039;ll bite.

I believe that most developers &#039;really&#039; don&#039;t need to worry about following to many principles, usually it is the other way around. Also there are so many more principles than just the 5 SOLID principles, so I am absolutely not saying you should always follow everything, that is not even possible (they often contradict each other). But applying the SOLID principles is something that I believe you should just do, especially OCP, DIP and SRP.

Of course there will be exceptions, &quot;the exception confirms the rule&quot; right? Also there are different gradations of applying the principles, especially with SRP. You can absolutely go crazy with defining a single responsibility, don&#039;t do that. But if a class is doing it&#039;s own data access, logging and order tracking then I think it does to much, three classes there for sure.

And you know what the beauty of this all is that it helps you on all fronts, there are many benefits from applying proper design principles: Testability, Re-usability, Clear intend and Easier Maintainable.

P.s thanks for the link, and sorry for the non Norwegian reply :)

-Mark</description>
		<content:encoded><![CDATA[<p>Ok I&#8217;ll bite.</p>
<p>I believe that most developers &#8216;really&#8217; don&#8217;t need to worry about following to many principles, usually it is the other way around. Also there are so many more principles than just the 5 SOLID principles, so I am absolutely not saying you should always follow everything, that is not even possible (they often contradict each other). But applying the SOLID principles is something that I believe you should just do, especially OCP, DIP and SRP.</p>
<p>Of course there will be exceptions, &#8220;the exception confirms the rule&#8221; right? Also there are different gradations of applying the principles, especially with SRP. You can absolutely go crazy with defining a single responsibility, don&#8217;t do that. But if a class is doing it&#8217;s own data access, logging and order tracking then I think it does to much, three classes there for sure.</p>
<p>And you know what the beauty of this all is that it helps you on all fronts, there are many benefits from applying proper design principles: Testability, Re-usability, Clear intend and Easier Maintainable.</p>
<p>P.s thanks for the link, and sorry for the non Norwegian reply :)</p>
<p>-Mark</p>
]]></content:encoded>
	</item>
</channel>
</rss>

