15 February 2006

OOP: Contract (Definitions)

"A guarantee between a definer and a user. An example of a contract is the methods in an interface type. In adding the interface type to its definition, a type agrees to the contract specified by the interface type. Contracts vary from strictly enforceable, such as verifying that a function's signature conforms to a contract (syntax correctness), to assuming consistent behavior among classes implementing a common contract (semantic correctness). Semantic contracts are more difficult to specify and verify." (Damien Watkins et al, "Programming in the .NET Environment", 2002) 

[design by contract] "A paradigm stating that each software element (e.g., a method) specifies in a contract the pre-conditions it requires to run, the post-conditions it will ensure upon completion, and which invariants will remain." (Johannes Link & Peter Fröhlich, "Unit Testing in Java", 2003)

"Defines the responsibilities and postconditions that apply to the use of an operation or method. Also used to refer to the set of all conditions related to an interface." (Craig Larman, "Applying UML and Patterns", 2004)

"A service is usually described by an interface. The complete description of a service from a consumer’s point of view (signature and semantics) is called a 'well-defined interface' or contract." (Nicolai M Josuttis, "SOA in Practice", 2007)

"The complete description of a service interface between one consumer and one provider. It includes the technical interface (signature), the semantics, and nonfunctional aspects such as service-level agreements." (Nicolai M Josuttis, "SOA in Practice", 2007)

"A statement by the developer of a component about what the component does; users of the component rely on this statement to design systems using the component." (W Roy Schulte & K Chandy, "Event Processing: Designing IT Systems for Agile Companies", 2009)

"The protocol and requirements that exist between a module (e.g., class, trait, object, or even function or method) and clients of the module. More specifically, see Design by Contract." (Dean Wampler & Alex Payne, "Programming Scala", 2009)

[data contract:] "In WCF, a data contract is one that permits the definition of messages with multiple parameters." (Bruce Bukovics, "Pro WF: Windows Workflow in .NET 4", 2010)

[design by contract] "An approach to class and module design invented by Bertrand Meyer for the Eiffel language. For each entry point, valid inputs are specified in a programmatic way, so they can be validated during testing. These specifications are called preconditions. Similarly, assuming the preconditions are specified, specifications on the guaranteed results are called postconditions and are also specified in an executable way. Invariants can also be specified that should be true on entry and on exit." (Dean Wampler & Alex Payne, "Programming Scala", 2009)

No comments:

Related Posts Plugin for WordPress, Blogger...

About Me

My photo
IT Professional with more than 24 years experience in IT in the area of full life-cycle of Web/Desktop/Database Applications Development, Software Engineering, Consultancy, Data Management, Data Quality, Data Migrations, Reporting, ERP implementations & support, Team/Project/IT Management, etc.