background preloader

Design

Facebook Twitter

CAB

Book review multi Paradigm (Coplien) How to Design Programs: An Introduction to Computing and Programming. Test Driven Development and Design By Contract - friend or foe? In this post i’ll try to answer a legitimate question, relating to a comment due to my last statement that interfaces are poor contracts: why do we need contracts (in the sense of invariants, pre- and postconditions) when we’ve got unit tests right at hand, that could also test the stated conditions? In fact, it’s very tempting to see unit tests as an all-embracing instrument to check and show that a class will behave correctly, making contracts kind of unnecessary. i’ll try to show you that unit tests (as an instrument for test driven development) and contracts (as an instrument for Design By Contract) indeed share the same goals but aren’t competing techniques, rather than methods that could complement each other. it’s not about verification – it’s about specification that said, both methods share the same main incitement – the specification of a system that will drive its design. don’t bear away collaboration includes clients and supplier reliance on a proper context clear Design reuse.

Re: How to create fully encapsulated Domain Models. Google's Design Guidelines. Software Architecture Document Guidelines. Update, 27th October 2009: Please see Software architecture document guidelines for an updated version of the guidelines. Regardless of the development process that you use, a description of the software architecture can be essential for any project, big or small. If software architecture is about the structure of a system and is the vehicle for satisfying the requirements, then the software architecture document is a written description of this. My simplified view of the content included in a software architecture document is : An outline description of the software architecture, including major software components and their interactions.A common understanding of the architectural principles used during design and implementation.A description of the hardware and software platforms on which the system is built and deployed.Explicit justification of how the architecture meets the non-functional requirements.

Again Abstract class vs Interface... Again Abstract class vs Interface...While pairing with a fellow thoughtworker ( we ended up discussing Abstract class vs Interface and he found this explanation useful. A Class (abstract or not) defines a type while an interface does not. In my domain anything that can be drawn is a shape(including a point) and thus behaviour defines a type. abstract class Shape{ public abstract draw();} In another domain which includes a Robots, Humans and Pets,If I need to treat all objects that can walk similarly, I would like to have an abstract handle to of all the above and that ends up in a interface Walkable{ void walk();} ...Robot implements Walkable{...}...Human implements Walkable{...}...Pet implements Walkable{...} and merely something that can walk does not define a type here.