News


Design by Contract with Extensible C#

Peter Gunner details an alternative approach to software development if TDD still leaves you cold. He points out that he IS a fan of TDD and often uses TDD and DbC together.

 

From the Introduction:

Design by Contract (DbC) is a software development methodology invented by Bertrand Meyer. DbC has a lot in common with the aims of Test-Driven Development (TDD): writing executable assertions in your source code to specify, before you write the implementation, the design and behaviour of your classes. DbC and TDD both emphasize that quality should be built into your software right from the start. Meyer's Eiffel programming language has DbC capabilities built into it.

C# does not support DbC, but Extensible C# (XC#) retrofits DbC via "declarative assertions". (Design by Contract is a trademark of Eiffel Software. Maybe that's why XC# uses the phrase "declarative assertions".) XC# provides a good, if imperfect, approximation to DbC.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Wednesday, February 15, 2006 7:45 AM

Feedback

No comments posted yet.


Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: