I have been playing around with implementing Design by Contract in ColdFusion using Coldspring's AOP functionality.
ColdContract is a Coldspring AOP Advice which allows Design by Contract assertions to be added to ColdFusion components and for those assertions to be executed during program execution.
Design by Contract assertions are a mechanism for defining the specification of software components, in such a way as to allow the implementation of the specification to be tested in-line with program execution. This provides a difference (and arguably quicker) method of implementing TDD to Unit Testing.
Assertions are added to components using meta data attributes as shown below:
<!---
/**
*
* Copyright (c) 2008 David Beale (http://www.BealeARTS.co.uk)
*
**/
--->
<cfcomponent displayname="Stack"
hint="A FILO Stack example showing the use of ColdContract assertions. Stack items cannot be objects (Components)."