The phrase clean code encapsulates a philosophy of coding and specific principles that improve code quality and extensibility. These principles include the importance of code that clearly expresses its intent and the effective use of encapsulation and abstractions to isolate details appropriately. What about at the architecture level? Can systems be clean?
Effective separation of concerns keeps systems clean, nimble, extensible, and hence agile. These concerns include the domain logic implemented by the system, middleware services, performance, availability, and life-cycle concerns like startup vs. normal runtime processes. The techniques we will discuss include dependency injection, test-driven development (not just at the code level!), aspects, scripting, and domain-specific languages.
Achieving clean separation allows concerns to evolve independently. We will see how this empowers us to defer architectural decisions until the optimal moment, when we have the best possible knowledge of our requirements and options. We can even make major architectural changes when necessary. Hence, not just code, but our architectures can be agile, too.
Java-specific examples will be used, but the principles are universally applicable.
This tutorial will consist mostly of a lecture with many concrete examples and group discussions of the attendee’s own experiences.