<div dir="ltr">On Wed, Oct 1, 2008 at 6:22 PM, Ashley Moran <span dir="ltr">&lt;<a href="mailto:ashley.moran@patchspace.co.uk">ashley.moran@patchspace.co.uk</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
On Oct 01, 2008, at 8:17 pm, Mark Wilden wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sounds like future-proofing to me. In the case of libraries, that can be a good thing. For application code, it flies in the face of YAGNI.<br>
</blockquote>
<br></div>
Actually I don&#39;t think that&#39;s a YAGNI. &nbsp;You need *an* interface to your models, the question is whether to build one that litters trainwrecks through your code, or one that is internally refactorable.<br>
</blockquote><div><br>ActiveRecord already provides an interface to your models. If you add on to that because it might things easier in the future, that&#39;s where I call &quot;YAGNI.&quot; It reminds me of a book on Java by a well-known author which said that you should declare an interface for every class, because it will make things easier if you need to change the implementation. He&#39;s absolutely right, of course.<br>
<br>However, I say that there are too many things that need doing right now - right this second - to waste time on what may or may not happen in the future. Put another way, what are you willing to give up in order to add this layer?<br>
<br>&quot;Litters trainwrecks,&quot; BTW, I believe begs the question.<br>
<br>&nbsp; <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Embrace change&quot; - Kent Beck. The whole white book is predicated on what you just pointed out about Rails.<br>

</blockquote>

<br></div>
You meant to say Ruby there, right? ;o)</blockquote></div><br>I was responding to the &quot;convention over configuration&quot; remark. But yeah, Ruby certainly does make changing stuff easier than many other languages.<br>
<br>///ark<br></div>