Chapter 8. Coding It Up: Basic Assembly

Your architecture is ready, and a new feature request has made it to the top of your work queue or your Sprint backlog. Or maybe a user is banging on your door or burning your ear on the phone begging for new functionality. It's time for the rubber to meet the road. If you're a coder, this is the fun stuff. Let's sling some code.

But wait—as we sling code, we don't want to bury our heads inside of our screens and ascend to nerd heaven. It's important to honor the original goals of object orientation and be ever attentive to the end users' world models. That's why we've taken you through the preceding chapters. The Agile nerds will tell you that the code is the design. The Agile businesspeople will tell you that the design should be outwardly focused. We'll show you that they both can be right.

Before we jump right into the code, we'll spend a little bit of time introducing MVC and a set of concepts that are broadly associated with it. Most Agile architectures arise from an MVC framework, so we will discuss MVC as a foundation for the details that ensue. We'll then describe two architectural approaches: one that supports short, snappy event-driven computation, and the other that supports goal-oriented task sequences that the user wants to complete. In this chapter, we will discuss classical object-oriented architecture, where we distribute use case responsibilities directly into domain classes. We'll leave the incorporation of full use case requirements ...

Get Lean Architecture for Agile Software Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.