4 ms·
This contracts refer to the concept of "Design by Contract." http://en.wikipedia.org/wiki/Design_by_contract http://en.wikipedia.org/wiki/Design_by_contract T
by elviejo 16y ago
This contracts refer to the concept of "Design by Contract."
http://en.wikipedia.org/wiki/Design_by_contract http://en.wikipedia.org/wiki/Design_by_contract
The poster child of design by contract is the Eiffel Programming language.
http://www.eiffel.com/developers/design_by_contract.html http://www.eiffel.com/developers/design_by_contract.html
IMO Contracts help you te really reduce the number of unit test you need to write.
And the tests that you DO write are more intersting in the BDD kind of way.
I highly recommend to study design by contract. Is one of those things that will make you a better developer in any language you use.
A good book with examples in Java and Eiffel is this:
Design by Contract, by Example
http://www.amazon.com/Design-Contract-Example-Richard-Mitchell/dp/0201634600 http://www.amazon.com/Design-Contract-Example-Richard-Mitche...