Abstract
During your years as a software developer, you’ve likely come across the notion of interface-based programming. If you’re familiar with the seminal book, Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (known as the “Gang of Four”),1 then you know that many design patterns employ interface-style “contracts.” If you’re not familiar with that book and its concepts, I urge you to read it. In this chapter, it is my goal to show you how you can model well-defined, versioned contracts using interfaces. In this context, a contract is an agreement by a type to support a set of functionality.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (Boston, MA: Addison-Wesley Professional, 1995) is cited in the references at the end of this book.
Rights and permissions
Copyright information
© 2007 Weldon W. Nash, III
About this chapter
Cite this chapter
(2007). Interfaces and Contracts. In: Accelerated C# 2008. Apress. https://doi.org/10.1007/978-1-4302-0338-4_5
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0338-4_5
Publisher Name: Apress
Print ISBN: 978-1-59059-873-3
Online ISBN: 978-1-4302-0338-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)