Blogs

View all Blogs >>

Framework Design Guidelines: Testable Frameworks

Posted by: Brad Abrams on 11/10/2008

I thought I do a weekly blog post series that highlights a few of the new additions image[5]_thumb[2]_thumb[2]_thumbto the Framework Design Guidelines 2nd edition.. The first is around writing testable frameworks it is found in Chapter 1: Introduction. Phil brings his real world experience building ASP.NET MVC to the table with this annotation.

PHIL HAACK

I would add one more point to this list, which is that “Well-Designed Frameworks Are Testable.” And by “testable” I don’t just mean that the framework itself can be unit tested, though that is important as well.

One hard lesson we learned from our customers as we released early previews of the ASP.NET MVC framework is that unit test coverage of a framework is not sufficient to calling it “testable.”

While we could easily test our framework, we needed to go further and strive to make sure that applications built using our framework are themselves testable.

This usually falls out naturally by following solid design principles such as Separation of Concerns, Orthogonality, Composition, and DRY (Don’t Repeat Yourself). Most importantly, we put ourselves in our customers’ shoes and built apps using our framework in a test-driven manner. This app building effort improved the design of the Framework immensely.


be the first to rate this blog


About Brad Abrams

Brad Abrams was a founding member of both the Common Language Runtime, and .NET Framework teams at Microsoft Corporation where he is currently the Group Program Manager for the UI Framework and Services team which is responsible for delivering the developer platform that spans both clients and web based applications as well as the common services that are available to all applications. Specific technologies owned by this team include ASP.NET, Atlas, and Windows Forms.

Brad has been designing parts of the .NET Framework since 1998 when he started his framework design career building the BCL (Base Class Library) that ship as a core part of the .NET Framework. Brad was also the lead editor on the Common Language Specification (CLS), the .NET Framework Design Guidelines and the libraries in the ECMA\ISO CLI Standard. Brad has been deeply involved with the WinFX and Windows Vista efforts from their beginning

Brad co-authored Programming in the .NET Environment, and was editor on .NET Framework Standard Library Annotated Reference Vol1 and Vol2 and the Framework Design Guidelines