Krzysztof Cwalina

Designing Reusable Frameworks

Browse by Tags

Tagged Content List
  • Blog Post: API Design Myth: Exceptions are for "Exceptional Errors"

    I was updating FDG section on exceptions. I added one anntation that I thought I would post here as well: KRZYSZTOF CWALINA One of the biggest misconceptions about exceptions is that they are for “exceptional conditions.” The reality is that they are for communicating error...
  • Blog Post: Nullable<T> Usage Guidelines

    These guidelines were just added as part of an update to the Framework Design Guidelines book ( upcomming 2nd edition ). Hope you find them useful. Nullable<T> is a simple type added to the .NET Framework 2.0. The type was designed to be able to represent Value Types with “null” values. ...
  • Blog Post: Framework Design Guidelines Digest v2

    Almost 4 years ago, I blogged about Framework Design Guidelines Digest . At that time, my blog engine did not support attaching files and I did not have a convenient online storage to put the document on, and so I asked people to email me if they want an offline copy. Believe it or not, I still receive...
  • Blog Post: Framework Design Studio Released

    When I was coming back from Mix 2007, I was bored on the plane and so started to write a dev tool. What a geeky thing to do on a plane. :-) The tool allows comparing two versions of an assembly to identify API differences: API additions and removals. Comparing versions of APIs comes very handy during...
  • Blog Post: Simulated Covariance for .NET Generics

    I just wrote this pattern, but I am not sure if I should add it officially to the Framework Design Guidelines. It seems like a bit of a corner case scenario, though I do get questions about it from time to time. Anyway, let me know what you think. Different constructed types don’t have a common...
  • Blog Post: Job Openings on the .NET Framework Core Team

    We have been incubating ideas about building a simple extensibility framework for some time. Now, as plans for the next version of the .NET Framework crystallize a bit more, we decided to productize the project. As a result, we have opened a job position (and most probably will be opening more) on the...
  • Blog Post: LINQ Design Guidelines

    Mircea, a program manager on my team, has worked on development of design guidelines for LINQ related features . The guidelines were reviewed internally and are now available on Mitch’s blog. We might still iterate on them a bit, but quite soon I plan to incorporate them into Framework Design Guidelines...
  • Blog Post: Video Recording of "Framework Engineering: Architecting, Designing, and Developing Reusable Libraries"

    I just received a video recording of a talk I did at the last TechEd. You can find the abstract below, and the WMV file can be downloaded from here . Hope you find it useful. [UPDATE: I attched the slides in xps format. The ppt file is 10x larger] Framework Engineering: Architecting, Designing...
  • Blog Post: Framework Design Guidelines 2nd Edition

    My blog was relatively silent for several weeks. First, I was traveling to Europe for the TechEd, then was busy at work, then the holiday break. It's time to go back to more regular posting. I will start with an announcement (or at least a more formal and broader announcement): after my TechEd presentation...
  • Blog Post: Duck Notation

    I have been working with the C# and VB teams on design guidelines for LINQ. We started to talk about the so called Query Pattern , which describes what you need to do if you want a custom type to support the new query operators (select, where, group by, etc.). The query operators use duck typing to...
  • Blog Post: Framework design lecture avaliable for download

    I have good news for all who asked about an off line version of the API design lecture I blogged about a few weeks ago . After literally a hundred emails and comments on the blog (thanks for pushing me to get this done), weeks of trying to get this setup, including the difficulty of finding a server...
  • Blog Post: Nullable<bool> usage guideline

    I am starting to work on some updates to the framework design guidelines related to new framework and language features added in .NET 2.0, 3.0, and 3.5. One of such additions are the nullable types (Nullable<T>). Coincidentally, somebody asked me today whether they should use Nullable<bool>...
  • Blog Post: Online lecture on API design

    I gave a lecture on framework design at the Redmond’s Microsoft Research Center. They recorder and posted it on the Research Channel . You can see it here . It’s more than 3 hours long, but I think you will find it worth the time. Let me know what you think.
  • Blog Post: How to Design Exception Hierarchies

    I still get a lot of questions on how to design exception hierarchies, despite several attempts to describe it in talks, the FDG book, and in posts on this blog. Maybe the guidance gets lots in the in the complexities of the full guidance surrounding exception handling or I am a bad communicator. Let...
  • Blog Post: System.TimeZone2 Naming ... and related design guidelines

    There is an interesting discussion on the BCL blog about a new BCL type called TimeZone2. Just take a look at the comments below the System.TimeZone2 Starter Guide post. The new type supersedes an existing type called TimeZone (which is obsolete now). Lots of people are not thrilled with the “2” suffix...
  • Blog Post: Clearing Enum Flags

    UPDATE: It looks like I am confusing a lot of people with this article. I wanted to write an article about something else than the title suggests (how flags enum are built) but I did not explain it well and what’s more important I forgot to mention the most important thing: how to simply clear a flag...
  • Blog Post: Choosing the Right Type of Exception to Throw

    My last post about the ApplicationException resulted in some questions along the lines of “so, if not ApplicationException, what should I throw instead?” The answer to this question is partially covered by my old post on Exception Throwing and partially by some additional guidelines for creating custom...
  • Blog Post: Framewok Design Guidelines Wins Productivity Award

    A couple of months ago, Brad blogged about the FDG book getting into the Jolt Award finals. The winners were just announced and we have won the Productivity Award! I am shocked … that Brad did not blogged this information first! :-) On that occasion, I looked up some of the past winners of the...
  • Blog Post: Channel 9 video showing a real usability study

    Channel 9 just posted a video in which our API usability engineers talk about one of the studies they conducted recently, but what’s even more interesting, in part two of the story, they show a clip from an actual study where a participant writes a workflow application. This is big! We have tried to...
  • Blog Post: Fix to TxRef

    The Framework Design Guidelines book comes with a tool called TxRef. The tool was built with Beta 2 version of the Framework 2.0 and will not compile on the RTM version. Kathy just posted a fix to the problem. See http://blogs.msdn.com/kathykam/archive/2005/11/16/493685.aspx .
  • Blog Post: FDG book readership beyond our wildest dreams

    The Framework Design Guidelines book is being read by readers we never thought would be interested in API design. Richard has captured a photo showing one of the readers being simply glued to the Type Design chapter.
  • Blog Post: SYS-CON TV Interview

    I did an interview for SYS-CON TV. I talked about the Framework Design Guidelines book and other API related things. The interview can be viewed at http://www.sys-con.tv/read/137736.htm .
  • Blog Post: Ship Party!

    Online publishers have started shipping the Framework Design Guidelines book. Before, it was pre-order-only. I think Brad and I deserve a ship party :-) BTW, “ship party” is the term we use at Microsoft for a party we organize for ourselves after releasing a product. I am not sure whether it’s Micro...
  • Blog Post: Free Chapter from the Framework Design Guidelines Book

    Addison Wesley, the publisher of the Framework Design Guidelines book has posted a freely downloadable chapter . The chapter talks about type design.
  • Blog Post: Why we don’t recommend using List<T> in public APIs

    We don’t recommend using List<T> in public APIs for two reasons. List<T> is not designed to be extended. i.e. you cannot override any members. This for example means that an object returning List<T> from a property won’t be able to get notified when the collection is modified...
Page 1 of 2 (45 items) 12