1.4 Keeping Concerns Separate
Being able to keep concerns separate is extremely important in software development. It helps you break down a complex problem into smaller parts and solve them individually. When it comes to large systems, it is the only way for you to build them. If you cannot keep concerns separate, the complexity of the system increases exponentially as you add enhancement after enhancement. By keeping concerns separate, on the other hand, the system is much easier to understand, maintain, and extend.
Existing modularity such as classes and components do help you keep concerns separate, at least to a certain extent. Each class keeps the specifics of a kind of object or real-world phenomenon separate; each component encapsulates the computation and data related for some functionality; and so on. However, when it comes to crosscutting concerns—concerns that cut across classes and components—you need another approach to modularity.
Moving ahead, in Chapter 2, we demonstrate how to maintain the separation of crosscutting concerns during implementation (i.e., code) using aspect orientation. In Chapter 3, we show how use-cases help us capture and model concerns. In Chapter 4, we show how, with use-cases and aspects, we can achieve separation of concerns from requirements to code, and we explain the steps necessary to get there.