MSDN Mag weighs in on the Framework Design Guidelines book


Scott Mitchell’s did a review of the Framework Design Guidelines in his MSDN- ToolBox Column… My favorite part of the review was again around the annotations… It is fun to see what folks pull out and find interesting:


What I liked best about this book was the style in which it was written. Rather than being a stodgy tome on framework design, it is very readable thanks to the many “discussions” interjected throughout the book by various Microsoft architects. These discussions, which appear in offset boxes after particular guidelines, give the book a very conversational feel, almost as if you’re sitting in on a meeting at the Microsoft campus.


For example, in the “Type Design Guidelines” chapter, after the guideline that reads, “Do favor defining classes over interfaces,” Krzystof Cwalina adds that in talking with developers on the team, many have regretted shipping some API as an interface, while no one has regretted shipping a class. Jeffrey Richter then interjects, recommending that framework developers use both an interface and then an abstract base class that implements the interface, as this gives the end-user developer the luxury of choosing whether to define their own type based on your interface (for convenience) or abstract base class (for flexibility).


 


Never fear, one day I will get back to adding real content to this blog.. thanks for your indulgence until then 😉


 

Comments (7)

  1. Jon Jagger says:

    Could you elaborate on why some developers have regretted shipping some API as an interface?

  2. Jeswin P says:

    Could you elaborate on why some developers have regretted shipping some API as an interface?

    Jon, Brad might want you to buy his book to find out. 😉

    My guess is that, interfaces are convinient for the Framework developers, but not for the framework users. For custom functionality, the only option you have is to re-implement the entire interface. Often, you might just be interested in changing a small part of it. This is easier through inheritance.

    Oh, I haven’t bought the book too. Maybe I should.

  3. Jon Jagger says:

    Jeswin said "Jon, Brad might want you to buy his book to find out. ;)"

    Then all Brad has to do is to reply saying that the recommendation is further explained in the book…

    My gut reaction is that a broad-brush piece of advice such as prefer classes over interfaces is so broad as to be a bit suspect….

  4. Kevin Westhead says:

    One of the reasons could be versioning, which Brad blogged about a while ago:

    http://blogs.msdn.com/brada/archive/2004/04/10/111042.aspx

Skip to main content