Sign in
Krzysztof Cwalina
Designing Reusable Frameworks
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
Design Guidelines
General API Design
General Programming
MEF
PLP
System.Collections
System.Diagnostics Tracing
Archive
Archives
September 2011
(1)
June 2011
(1)
June 2009
(1)
March 2009
(1)
January 2009
(1)
October 2008
(2)
September 2008
(1)
August 2008
(1)
July 2008
(3)
June 2008
(2)
April 2008
(4)
March 2008
(2)
January 2008
(2)
October 2007
(3)
July 2007
(3)
June 2007
(2)
May 2007
(1)
April 2007
(2)
March 2007
(1)
February 2007
(1)
January 2007
(2)
October 2006
(1)
August 2006
(2)
July 2006
(3)
June 2006
(1)
May 2006
(1)
March 2006
(3)
February 2006
(3)
December 2005
(3)
November 2005
(5)
October 2005
(1)
September 2005
(9)
August 2005
(2)
June 2005
(3)
May 2005
(4)
April 2005
(1)
March 2005
(2)
January 2005
(1)
November 2004
(4)
October 2004
(3)
September 2004
(2)
August 2004
(1)
June 2004
(2)
May 2004
(2)
April 2004
(1)
March 2004
(3)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Krzysztof Cwalina
Generic interfaces, IsReadOnly, IsFixedSize, and array
Posted
over 8 years ago
by
Krzysztof Cwalina
10
Comments
Peter Golde recently posted about the IsReadOnly and IsFixedSize change we made to the generic collection interfaces.There are also several other discussions around the net on this topic. I thought I write up something to explain the motivation and our...
Krzysztof Cwalina
API Usability Studies
Posted
over 8 years ago
by
Krzysztof Cwalina
0
Comments
I have received several comments asking what usability studies are and how to conduct them. Steven’s blog is one of the best sources of information on API usability studies. In particular the recent post on HOWTO: Run an API usability study .
Krzysztof Cwalina
Design Guidelines Book (The Principle of Scenario-Driven Design)
Posted
over 8 years ago
by
Krzysztof Cwalina
10
Comments
The Design Guidelines have been published on MSDN and as a part of the CLI ECMA specification ( Partition V , Annex D). This was long time ago and we have been receiving lots of requests for an update and also for something that can be read offline. ...
Krzysztof Cwalina
Design Guidelines Update: Dispose Pattern
Posted
over 8 years ago
by
Krzysztof Cwalina
0
Comments
Joe, just posted an update to the Design Guidelines describing issues relared to IDisposable, Finalization, and resource management....
Krzysztof Cwalina
Design Guidelines Update: Exception Throwing
Posted
over 8 years ago
by
Krzysztof Cwalina
54
Comments
Exception Throwing Exception throwing guidelines described in this section require a good definition of the meaning of execution failure. Execution failure occurs whenever a member cannot do what it was designed to do (what the member name implies). For...
Krzysztof Cwalina
The reason why Collection
, ReadOnlyCollection
, and KeyedCollection
were moved to System.Collections.ObjectModel namespace
Posted
over 8 years ago
by
Krzysztof Cwalina
32
Comments
Several people asked me why Collection<T>, ReadOnlyCollection<T>, and KeyedCollection<TKey,TValue> were moved to System.Collections.ObjectModel namespace. Here are the two main reasons: 1. Microsoft.VisualBasic namespace contains a non...
Krzysztof Cwalina
The reason why IEnumerator
extens IDisposable
Posted
over 8 years ago
by
Krzysztof Cwalina
7
Comments
Lot ’s of people asked me why IEnumerator<T> extends IDisposable. We did this to support some obscure, yet important scenarios where an enumerator enumerates database rows, or files in a directory, etc. In such cases, the enumerator usually opens...
Krzysztof Cwalina
Listing of Managed Processes
Posted
over 9 years ago
by
Krzysztof Cwalina
24
Comments
I just discovered a cool way of listing all processes that run managed code. using System.Diagnostics; using System; class Program { static void Test() { PerformanceCounterCategory clr = new PerformanceCounterCategory ( ".NET CLR Memory" ); foreach (...
Krzysztof Cwalina
Rationale for Generic Type Parameter Naming Guidelines
Posted
over 9 years ago
by
Krzysztof Cwalina
8
Comments
The recent type parameter naming guidelines update resulted in a very lively discussion. I thought I would provide some rational for the recent changes. But first, I would like to first thank all of you who got involved in the debate. We have had debates...
Krzysztof Cwalina
Power Collections on GotDotNet Featured Sites
Posted
over 9 years ago
by
Krzysztof Cwalina
1
Comments
I just noticed that the Power Collections project made it to the “Featured Sites” on GotDotNet. See http://www.gotdotnet.com/content/featuredsite/powercollections/default.aspx For those who don’t know, Power Collections is a community open source library...
Krzysztof Cwalina
Design Guidelines Update: Names of Generic Type Parameters
Posted
over 9 years ago
by
Krzysztof Cwalina
75
Comments
After receiving lots of feedback from internal and external community (see here for example), we decided to modify the generic type parameter naming guidelines. The previous guidelines allowed only single letter type parameter names. The new guidelines...
Krzysztof Cwalina
IComaprer
& IComparable
Refactoring Proposal
Posted
over 9 years ago
by
Krzysztof Cwalina
23
Comments
We are exploring the possiblility of changing the design of IComparer<T> and IComparable<T> interfaces that will ship with Whidbey. This post describes some more detail on the issues we are trying to address with the design change and we are...
Krzysztof Cwalina
API Design Myth: Interface as Contract
Posted
over 9 years ago
by
Krzysztof Cwalina
10
Comments
I often hear people saying that interfaces specify contracts. I believe this is a dangerous myth. Interfaces, by themselves, do not specify much beyond the syntax required to use an object. The interface-as-contract myth causes people to do the wrong...
Krzysztof Cwalina
Design Guidelines Update: Factories vs. Constructors
Posted
over 9 years ago
by
Krzysztof Cwalina
14
Comments
Joe has recently spent some time beefing up the Factory vs. Constructor guidelines. This subject has been the center of lots of intenral debates. Finally, we agreed on the fllowing: Factories The most common and consistent way to create an instance of...
Krzysztof Cwalina
Design Guidelines Digest
Posted
over 9 years ago
by
Krzysztof Cwalina
36
Comments
Lots of people have asked me to create a short version of the Design Guidelines. Here it is. You can also email me directly at kcwalina@microsoft.com if you would like to get an MS Word copy of the digest, hich has a bit better formatting. [UPDATE...
Krzysztof Cwalina
Design Guidelines Update: Evolving Managed APIs
Posted
over 9 years ago
by
Krzysztof Cwalina
0
Comments
Kit George (member of the BCL team) blogged an update that we just did to our Design Guidelines. The new guidelines talk issues related to evolving managed APIs. See http://weblogs.asp.net/bclteam/archive/2004/09/07/226489.aspx
Krzysztof Cwalina
System.Collections.Generic Dictionary
Capacity, Hashing, and Collisions.
Posted
over 9 years ago
by
Krzysztof Cwalina
7
Comments
Somebody asked me a question how to set the initial capacity of System.Collections.Generic.Dictionary<K,V> if one knows that the Dictionary will contain 1000 entries. The short answer Dictionary<int,string> numbers = new Dictionary<int...
Krzysztof Cwalina
Delegate-Based APIs
Posted
over 9 years ago
by
Krzysztof Cwalina
39
Comments
Generics and Anonymous Methods/Delegates make up a powerful pair that can be used to create elegant query APIs. Here are some that we just added to the .NET Framework’s Collection libraries. I used List<T> to illustrate the APIs but most of...
Krzysztof Cwalina
Design Guidelines Update: Optional Features Pattern
Posted
over 9 years ago
by
Krzysztof Cwalina
4
Comments
This is a relatively major update to the Design Guidelines. It describes and formalizes a very common .NET Framework Pattern/Idiom for exposing optional functionality/service of an API (for example canceling a stream operation, as not all streams support...
Krzysztof Cwalina
Design Guidelines Update: Enum Design
Posted
over 9 years ago
by
Krzysztof Cwalina
40
Comments
This is a recent update to the Design Guidelines. One of the most interesting additions is the section about adding values to enums (at the end of the section). This was one of the guidelines were getting an agreement across the whole company was quite...
Krzysztof Cwalina
Design Guidelines Update: Exposing XML Data
Posted
over 9 years ago
by
Krzysztof Cwalina
10
Comments
Small update to the Design Guidelines courtesy of the XML team. System.Xml Usage Exposing XML Data Do provide overloads that accept and System.Xml.XmlReader and System.String for properties of a class that represent an XML document or fragment...
Krzysztof Cwalina
Design Guidelines Update: Resources
Posted
over 9 years ago
by
Krzysztof Cwalina
14
Comments
We just added some new design guidelines related to naming and usage of resources. Enjoy. Resources Resources can be used in libraries to store error messages, labels, and icons. MSDN article Resources and Localization Using the .NET Framework...
Krzysztof Cwalina
Why Design Guidelines?
Posted
over 9 years ago
by
Krzysztof Cwalina
4
Comments
Many assume that the Design Guidelines document is intended to be a repository of the best solutions to common API design problems. Let me get it straight right away. This is not the intention at all. The main purpose of the Design Guidelines is to achieve...
Krzysztof Cwalina
Design Guidelines Update: Generics
Posted
over 9 years ago
by
Krzysztof Cwalina
66
Comments
Generics is a new feature added to the Whidbey CLR and languages. We are still learning the best way to take advantage of the feature in reusable library APIs. The guidelines below represent out current thinking in this area. 1.0 Generics A new...
Krzysztof Cwalina
Design Guidelines Category
Posted
over 9 years ago
by
Krzysztof Cwalina
2
Comments
The .NET Framework documentation on MSDN has a section describing the design guidelines for managed library developers . The section is based on an internal document that I help to create and maintain. The internal document is being constantly and frequently...
Page 4 of 4 (100 items)
1
2
3
4