﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Anders Nor&amp;amp;#229;s' Blog commented on The Production Value of Seams </title><description>There is an interesting discussion going on between Eli Lopian , Roy Osherove and Oren Eini on whether
</description><link>http://ayende.com/2155/the-production-value-of-seams#comment9</link><guid>http://ayende.com/2155/the-production-value-of-seams#comment9</guid><pubDate>Mon, 05 Mar 2007 13:09:18 GMT</pubDate></item><item><title>Thomas Eyde commented on The Production Value of Seams </title><description>In response to Ayende:
  
  
" Would you think to do it at first if it was something that wasn't driven by the need for testability?"
  
  
I can't answer that. I am so used to TDD so testability could be a subconscious desicion. Or it could be that TDD also taught me how to code better.
  
  
A BatchFileWriter would of course be testable, but my main reason, I think, is to encapsulate the behavior.
</description><link>http://ayende.com/2155/the-production-value-of-seams#comment8</link><guid>http://ayende.com/2155/the-production-value-of-seams#comment8</guid><pubDate>Mon, 05 Mar 2007 08:31:20 GMT</pubDate></item><item><title>Ayende @ Rahien commented on The Production Value of Seams </title><description>[new post]
</description><link>http://ayende.com/2155/the-production-value-of-seams#comment7</link><guid>http://ayende.com/2155/the-production-value-of-seams#comment7</guid><pubDate>Sun, 04 Mar 2007 21:57:26 GMT</pubDate></item><item><title>Ayende Rahien commented on The Production Value of Seams </title><description>Nope, the ability to supply an alternate implementation is a side benefit to the testability benefits.
  
I would agree with YAGNI, except that this is something that I do need, in order to decrease coupling and enable better testing.
  
Intersting post, I'm going to reply in a new post.
</description><link>http://ayende.com/2155/the-production-value-of-seams#comment6</link><guid>http://ayende.com/2155/the-production-value-of-seams#comment6</guid><pubDate>Sun, 04 Mar 2007 20:55:25 GMT</pubDate></item><item><title>Eli Lopian commented on The Production Value of Seams </title><description>Oren, 
  
"I MAY want to supply alternate implementation"
  
Sounds Like  "You Aint Gonna Need It"
  
See here: http://www.elilopian.com/2007/03/04/design-and-testability-yagni/
</description><link>http://ayende.com/2155/the-production-value-of-seams#comment5</link><guid>http://ayende.com/2155/the-production-value-of-seams#comment5</guid><pubDate>Sun, 04 Mar 2007 20:39:14 GMT</pubDate></item><item><title>Ayende Rahien commented on The Production Value of Seams </title><description>Would you think to do it at first if it was something that wasn't driven by the need for testability?
  
</description><link>http://ayende.com/2155/the-production-value-of-seams#comment4</link><guid>http://ayende.com/2155/the-production-value-of-seams#comment4</guid><pubDate>Sun, 04 Mar 2007 20:33:33 GMT</pubDate></item><item><title>Thomas Eyde commented on The Production Value of Seams </title><description>My naive approach would be to introduce a BatchFileWriter and put all calls to File.WriteAllText in there.
</description><link>http://ayende.com/2155/the-production-value-of-seams#comment3</link><guid>http://ayende.com/2155/the-production-value-of-seams#comment3</guid><pubDate>Sun, 04 Mar 2007 19:26:48 GMT</pubDate></item><item><title>Ayende Rahien commented on The Production Value of Seams </title><description>I understand your point, but Helpers.CreateFile() is still not really testable, is it?
  
And you are talking to someone who is using 4 layers of abstractions just to get a value from a text box. :-)
</description><link>http://ayende.com/2155/the-production-value-of-seams#comment2</link><guid>http://ayende.com/2155/the-production-value-of-seams#comment2</guid><pubDate>Sun, 04 Mar 2007 14:17:06 GMT</pubDate></item><item><title>Tomer Gabel commented on The Production Value of Seams </title><description>It's all a question of compromise between code conciseness and the ability to inject different code or behavior. Coming from a more performance-oriented, systems-programming background, I prefer the former approach. I think that for anyone not well into TDD, the code sample above (with the IoC container) is very difficult to understand or follow. A more traditional (and not necessarily a less powerful one) would be to simply provide a factory method in a utility class; I think
  
using(TextWriter writer = Helpers.CreateFile(filename)) is much easier to follow than using(TextWriter writer = IoC.Resolve&lt;IFileWriterFactory&gt;().Create(filename))).
  
</description><link>http://ayende.com/2155/the-production-value-of-seams#comment1</link><guid>http://ayende.com/2155/the-production-value-of-seams#comment1</guid><pubDate>Sun, 04 Mar 2007 14:09:37 GMT</pubDate></item></channel></rss>