﻿<?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>Krzysztof Koźmic commented on On API Design</title><description>@Gian.
  
  
That was also my main goal. Not necessarily to expand it's capabilities, but what can be done to simplify access to those features that are already out there. How to make it easier for newcomers to start using it, and how to make it more likely for them to succeed.
</description><link>http://ayende.com/3284/on-api-design#comment7</link><guid>http://ayende.com/3284/on-api-design#comment7</guid><pubDate>Mon, 28 Apr 2008 06:02:44 GMT</pubDate></item><item><title>Gian Maria Ricci commented on On API Design</title><description>I like the idea of the Facade, it is a good way not to break compatibility, but could give access only to the core functionality, to not "distract" new user with all the capability of the library.
  
  
alk.
</description><link>http://ayende.com/3284/on-api-design#comment6</link><guid>http://ayende.com/3284/on-api-design#comment6</guid><pubDate>Sat, 26 Apr 2008 06:39:46 GMT</pubDate></item><item><title>Joseph Gutierrez commented on On API Design</title><description>Facade would be nice. 
  
  
With the 'in your face API'.
</description><link>http://ayende.com/3284/on-api-design#comment5</link><guid>http://ayende.com/3284/on-api-design#comment5</guid><pubDate>Tue, 22 Apr 2008 14:33:02 GMT</pubDate></item><item><title>Mike Minutillo commented on On API Design</title><description>Out of interest I would look at the opportunity make the API more explicit (i.e. the "In your face" option specified) but add in a set of Compatability Extension Methods. These could be included (or not) at the users discretion to provide "simple" options via overloads. This makes the distinction clear between what is Core functionality and what is syntactic sugar. This way all that is required for backward compatability is to include a new namespace or two. Of course, this only really works for VS2008 customers.
</description><link>http://ayende.com/3284/on-api-design#comment4</link><guid>http://ayende.com/3284/on-api-design#comment4</guid><pubDate>Tue, 22 Apr 2008 03:39:45 GMT</pubDate></item><item><title>Benny Thomas commented on On API Design</title><description>I dont see any problem in breaking the api. But I understand the documentationpart.
  
  
Who doent hate to write documentation. 
</description><link>http://ayende.com/3284/on-api-design#comment3</link><guid>http://ayende.com/3284/on-api-design#comment3</guid><pubDate>Mon, 21 Apr 2008 22:08:55 GMT</pubDate></item><item><title>Nikola Malovic commented on On API Design</title><description>I like the facade idea. Sounds easier to explain to people rhino basics which is very scary for some people starting to use mocks.
</description><link>http://ayende.com/3284/on-api-design#comment2</link><guid>http://ayende.com/3284/on-api-design#comment2</guid><pubDate>Mon, 21 Apr 2008 20:36:50 GMT</pubDate></item><item><title>Krzysztof Koźmic commented on On API Design</title><description>Notice that I suggested not changing current MockRepository (at least for few releases), but creating a Facade for it. This way you don't break anything.
  
I'm not sure I understand what you mean by "In your face design".
  
Having methods that explicitly state kind of mock/stub you create is as explicit as using enum to denote it.
  
I agree, People will use DynamicMock 95% of the time (probably with no constructor parameters or multimocks). 
  
With syntax I suggested its simply:
  
var foo = repo.Mock&lt;IFoo&gt;();
  
  
I don't see forcing anyone to deal with all options explicitly here. It's even less explicit than
  
var foo = repo.DynamicMock&lt;IFoo&gt;();
  
  
Also by using enum with FlagsAttribute you hide options like mocks with remoting that 99% users will never use.
  
  
And as with everything - each choice has pros and cons.
  
I'm not saying mine is the only one right, I'm far from that. I wanted to start a debate and I'm glad I succeeded with that.
  
PS. I also updated my example, to make it even a bit simpler.
</description><link>http://ayende.com/3284/on-api-design#comment1</link><guid>http://ayende.com/3284/on-api-design#comment1</guid><pubDate>Mon, 21 Apr 2008 20:03:19 GMT</pubDate></item></channel></rss>