Top ASP.NET Items

Sponsors

Archives

Browse by Tags

All Tags » Framework Design Guidelines (RSS)
Video Posted for Belgium Visual Studio User’s Group: 10 Years of Framework Design Guidelines
As a nice follow up from my Belgium Visual Studio User’s Group: 10 Years of Framework Design Guidelines talk, I saw that they just posted the video (slides+audio).   Enjoy!   Oh, and i must include the shameless plug…  Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries (2nd Edition) Read More...
Belgium Visual Studio User’s Group: 10 Years of Framework Design Guidelines
I had a great time at the the Belgium Visual Studio User’s Group meeting.  The turn out was excellent.  Thanks especially to Gill Cleeren   and Pieter Gheysens for hosting it.  Gill asked me to talk about Framework Design Guidelines – I subject near and dear to my heart.   I decided to do a bit of a look back over the last 10 years of framework design (we started  what would later become the CLR about 10 years ago)..    It is really fun to look at what has changed and what has not.      Thanks to the great folks at Addison-Wesley i was able to give away a few copies of the book as well.     Afterwards, we got to talking about how this stuff is actually the easy part...
Framework Design Guidelines Book: Extra Content from the DVD Posted
A few weeks ago a reader wrote in to tell me that they bought the Kindle version of the Framework Design Guidelines and was disappointed to not receive the DVD.  Well, I was of course immediately jealous because I don’t have a kindle , but when I got over that, I ask the our excellent publishers and Addison-Wesley what we could do for our Kindle readers.  To my (very pleasant) surprise, they suggested that we could just make all the DVD contents available for free on their website.  So now, everyone on the internet gets this small dividend from the kindle!  Enjoy…     Download the entire DVD in one zip file. NOTE: The file is 2.34 GB in size.  This includes a number of very helpful videos of presentations that...
Framework Design Guidelines: the System.* namespace
Today we have a guest post from Kit George who is the keeper of much of our internal Framework Design Guidelines.  This is the stuff that Krys and I based a the book on.  I asked Kit to post this internal information so you can get a feeling for what our guidelines are and why…. and so you can call us on it if we mess it up ;-) As always, feedback and comments are welcome!   It is clear that there’s a bit of confusion over the namespace guidelines . Here is our attempt at make this clear.  We know this will remain a contentious issue, but the goal of these guidelines is to clarify: The .NET platform is not limited to any one single redistributable. Types in the System.* namespace define the .NET platform. We of course carry...
Framework Design Guidelines: LINQ Support
Continuing in our weekly blog post series that highlights a few of the new additions to the Framework Design Guidelines 2 nd edition .. This content is found in the LINQ section of Chapter 9: Common Design Patterns. Supporting LINQ through IEnumerable<T> DO implement IEnumerable<T> to enable basic LINQ support. Such basic support should be sufficient for most in-memory data sets. The basic LINQ support will use the extension methods on IEnumerable<T> provided in the .NET Framework. For example, simply defineing as follows: public class RangeOfInt32s : IEnumerable<int> {    public IEnumerator<int> GetEnumerator() {…}    IEnumerator IEnumerable.GetEnumerator() {…} } Doing so Allows...
Framework Design Guidelines: Dependency Properties
Continuing in our weekly blog post series that highlights a few of the new additions to the Framework Design Guidelines 2 nd edition .. This content is found in the Dependency Properties section of Chapter 9: Common Design Patterns. Phil offers some great additions to the base pattern. The following guidelines describe details of Dependency Property dependency property design. DO inherit from DependencyObject, or one of its subtypes, when implementing Dependency Properties. The type provides a very efficient implementation of a property store and automatically supports WPF data binding. DO provide a regular CLR property and public static read-only field storing an instance of System.Windows.DependencyProperty for each Dependency Propertydependency...
Framework Design Guidelines: Factored Types
Continuing in our weekly blog post series that highlights a few of the new additions to the Framework Design Guidelines 2 nd edition .. This content is found in the Factored Types section of Chapter 9: Common Design Patterns. Phil offers some great additions to the base pattern. PHIL HAACK Since Factored Types have an explicit lifetime, it probably makes good sense to implement the IDisposable interface so that developers can make use of the using statement. The code sample here could then be refactored to: using(SerialPort port = new SerialPort("COM1")) {    port.Open();    GZipStream compressed;    compressed = new GZipStream(port.BaseStream,       CompressionMode.Compress);...
Framework Design Guidelines: Serialization Technology
Continuing in our weekly blog post series that highlights a few of the new additions to the Framework Design Guidelines 2 nd edition .. This content is found in the Serialization section of Chapter 8: Usage Guidelines. While it is great to have base framework with so many tools, knowing when to use which is super important. 8.10. 1 Choosing the Right Serialization Technology to Support Any given type can support none, one, or more of the serialization technologies. CONSIDER supporting Data Contract Serialization, if instances of your type might need to be persisted or used in Web services. See section 8.10.2 for details on supporting Data Contract Serialization. CONSIDER supporting the XML Serialization, instead or in addition to Data Contract...
Framework Design Guidelines: System.DBNull
Continuing in our weekly blog post series that highlights a few of the new additions to the Framework Design Guidelines 2 nd edition .. This content is found in the Nullable<T> section of Chapter 8: Usage Guidelines. Pablo helps us out with some subtle details that might really come in handy. AVOID using System.DBNull. Prefer Nullable<T> instead. PABLO CASTRO Nullable<T> is in general a better representation of optional database values. One thing to consider though is that while Nullable<T> gives you the ability to represent null values, you don’t get database null operational semantics. Specifically, you don’t get null propagation through operators and functions. If you deeply care about the propagation semantics...
Framework Design Guidelines: Overriding Object.ToString()
Continuing in our weekly blog post series that highlights a few of the new additions to the Framework Design Guidelines 2 nd edition .. This content is found in the Object.ToString section of Chapter 8: Usage Guidelines. Christophe provides some great implementation tips for these guidelines. DO try to keep the string returned from ToString short. The debugger uses ToString to get a textual representation of an object to be shown to the developer. If the string is longer than the debugger can display (typically less than one screen length), the debugging experience is hindered. CHRISTOPHE NASARRE In term of debugging experience, you should decorate your type with DebuggerDisplayAttribute in addition to overriding ToString for that particular...
More Posts Next page »