In Chapter 2, "The Object-Oriented Way," we worked through an example of applying good object-oriented principles to designing an expression evaluation system (EES). We found that there were some difficulties: Features couldn't be properly encapsulated; adding new features was difficult; choosing between active features involved a lot of work. This chapter introduces the Theme approach to aspect-oriented analysis and design. We work through the same EES as a way to illustrate how themes can be used to encapsulate features, and how the approach is used to identify crosscutting concerns (aspects). |