SpringContracts 0.3 is available with the following new features:
- Contract Validation for Constructors and ad hoc instantiations due to Load Time Weaving
- Beanshell / Java as specification language
- Spring 2.0 NamespaceHandler for concise external contract notation
- Simultaneous usage of Annotations and external contract notation for contract definition
- New Handler for publishing contract violations as lightweight Spring Application events
- Reference guide documentation (draft version... read more
The draft version of SpringContracts reference guide is online and available via the project's homepage under http://springcontracts.sourceforge.net
You will find a new link 'Reference' under section 'Documentation' or you can refer directly to http://springcontracts.sourceforge.net/reference.pdf
The guide offers detailed desciption about usage and customization, including some examples.
SpringContracts 0.2 is released.
It now supports specification of external contracts without touching the sources by expressing contracts within Spring's ApplicationContext.
Beside Expression Language (EL) as specification language, SpringContracts provides now full out of the box support for OGNL and Groovy. Switching the language is a matter of configuration in Springs Application Context (changing effectively two lines)
The project web page now provides a quick start document that shows how to setup SpringContracts.
The main part than explains how to work with SpringContracts in that it introduces the core features and it's usage.
The document can be downloaded at http://springcontracts.sourceforge.net/pg002.html
SpringContracts now provides a Website (also hosted by SourgeForge) with some Information due to the Project.
You will find the site under http://springcontracts.sourceforge.net.
Enjoy!
After nearly one year of development, SpringContracts is out and now Open Source.
SpringContracts is a configurable Java solution for Design by Contract, which fits seamlessly into the Spring framework.
For example, SpringContracts allows to configure which parts of a Contract (Pre-, Postcondition, Invariant) should be recognized at runtime and how to react, when Violations occurs (exceptions, logging, ...).
Another pluggable Module is the language, used to describe the single constraints of Pre-, Postconditions and Invariants. While providing a default implementation based on the Expression Language (Commons-EL), there will be the choice to use other Languages like MVEL, OGNL or another Scripting Language (for example Groovy or JRuby) in the next future.
Some minor features include full support (recognition of Contract elements) for deep inheritance and multi-inheritance on interfaces, definition of messages in case of contract violations with reference to it's context (calling method, args, return value) and usage of named constraints (global available common constraints, which can be referenced in any contract by a symbolic name).