ABSTRACT

Structuring software systems using a compositional approach has many benefits and here I will demonstrate how it elegantly supports reuse. The learning objective of this chapter is in particular to analyze how the polymorphic and compositional proposals cope when faced with a requirement that combines existing solutions. A major outcome is to demonstrate how the compositional proposal leads to the STATE pattern. Finally, you will see the problems of doing test-driven development when the production code uses resources that are not under direct testing control.