<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>In Search of Lost Time &#187; Microsoft</title>
	<atom:link href="http://lativy.org/tag/microsoft/feed/" rel="self" type="application/rss+xml" />
	<link>http://lativy.org</link>
	<description>Thoughts on music, technology, life, et cetera</description>
	<lastBuildDate>Mon, 15 Aug 2011 14:26:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='lativy.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>In Search of Lost Time &#187; Microsoft</title>
		<link>http://lativy.org</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://lativy.org/osd.xml" title="In Search of Lost Time" />
	<atom:link rel='hub' href='http://lativy.org/?pushpress=hub'/>
		<item>
		<title>Framework Design Guidelines</title>
		<link>http://lativy.org/2009/02/20/framework-design-guidelines/</link>
		<comments>http://lativy.org/2009/02/20/framework-design-guidelines/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 09:19:41 +0000</pubDate>
		<dc:creator>Nicholas Lativy</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSharp]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Patterns]]></category>

		<guid isPermaLink="false">http://lativy.org/?p=16</guid>
		<description><![CDATA[A few months ago I finished reading the second edition of Brad Abrams and Krzysztof Cwalina&#8217;s excellent Framework Design Guidelines book. I just love how this book condenses the lessons learned in building the .Net Framework in areas such as &#8230; <a href="http://lativy.org/2009/02/20/framework-design-guidelines/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lativy.org&#038;blog=13379655&#038;post=16&#038;subd=nlativy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A few months ago I finished reading the second edition of Brad  Abrams and Krzysztof Cwalina&#8217;s excellent <em>Framework Design Guidelines</em> book. I just love how this book condenses the lessons learned in  building the .Net Framework in areas such as design patterns and API  usability into a set of easy to follow guidelines annotated by various  luminaries from Microsoft and beyond.</p>
<p>For me reading the book provided valuable insight into .Net,  reinforced my knowledge of design patterns and provided lots of useful  advice on software engineering in general. As an example one guideline  that I recall as I write this is &#8220;<a href="http://msdn.microsoft.com/en-us/library/ms229044.aspx">do prefer  protected accessibility over public accessibility for virtual members</a>&#8221;.  This leads to the suggestion of applying the <a href="http://en.wikipedia.org/wiki/Template_method_pattern">template  method pattern</a> as follows:</p>
<pre>public Control {
  public void SetBounds(...)
  {
    ...
    SetBoundsCore(...);
  }

  protected virtual void SetBoundsCore(...) { ... }
}</pre>
<p>The book also makes the valuable point that  this pattern allows the base class to enforce that overloads remain  semantically consistent by defining them in the base class in terms of  one core virtual method that can then be overridden.</p>
<p>On the usability front a comment from Krzysztof has stuck with me  since reading the book:</p>
<blockquote><p>The number of customers that will use your API is  inversely proportional    to the number of new statements in your simple scenarios.</p></blockquote>
<p>This reinforces the book&#8217;s suggestion of a scenario  driven design approach where we are encouraged to write code for common  scenarios before designing the API and run user studies early on with  other developers writing code exercising these main scenarios.</p>
<p>Finally <em>Framework Design Guidelines</em> introduced me to <a href="http://msdn.microsoft.com/en-us/library/bb429476%28VS.80%29.aspx">FxCop</a> which does the great job of encoding the guidelines in a static  analysis tool thus catching any accidental slips in our APIs early on.  This makes following a large number of the guidelines incredibly easy.</p>
<p>As Miguel de Icaza asserts in the foreword: this book will help you  become a better programmer.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nlativy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nlativy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nlativy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nlativy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nlativy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nlativy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nlativy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nlativy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nlativy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nlativy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nlativy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nlativy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nlativy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nlativy.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lativy.org&#038;blog=13379655&#038;post=16&#038;subd=nlativy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://lativy.org/2009/02/20/framework-design-guidelines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d3cff300e1922220e3b6949df2b48438?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">nlativy</media:title>
		</media:content>
	</item>
	</channel>
</rss>
