Lean Architecture for Agile Software Development

Book description

More and more Agile projects are seeking architectural roots as they struggle with complexity and scale - and they're seeking lightweight ways to do it

  • Still seeking? In this book the authors help you to find your own path

  • Taking cues from Lean development, they can help steer your project toward practices with longstanding track records

  • Up-front architecture? Sure. You can deliver an architecture as code that compiles and that concretely guides development without bogging it down in a mass of documents and guesses about the implementation

  • Documentation? Even a whiteboard diagram, or a CRC card, is documentation: the goal isn't to avoid documentation, but to document just the right things in just the right amount

  • Process? This all works within the frameworks of Scrum, XP, and other Agile approaches

Table of contents

  1. Copyright
  2. Publisher's Acknowledgments
  3. About the Authors
  4. Preface
  5. 1. Introduction
    1. 1.1. The Touchstones: Lean and Agile
    2. 1.2. Lean Architecture and Agile Feature Development
    3. 1.3. Agile Production
      1. 1.3.1. Agile Builds on Lean
      2. 1.3.2. The Scope of Agile Systems
      3. 1.3.3. Agile and DCI
    4. 1.4. The Book in a Very Small Nutshell
    5. 1.5. Lean and Agile: Contrasting and Complementary
      1. 1.5.1. The Lean Secret
    6. 1.6. Lost Practices
      1. 1.6.1. Architecture
      2. 1.6.2. Handling Dependencies between Requirements
      3. 1.6.3. Foundations for Usability
      4. 1.6.4. Documentation
        1. 1.6.4.1. Code Does Not Stand Alone
        2. 1.6.4.2. Capturing the "Why"
      5. 1.6.5. Common Sense, Thinking, and Caring
    7. 1.7. What this Book is Not About
    8. 1.8. Agile, Lean — Oh, Yeah, and Scrum and Methodologies and Such
    9. 1.9. History and Such
  6. 2. Agile Production in a Nutshell
    1. 2.1. Engage the Stakeholders
    2. 2.2. Define the Problem
    3. 2.3. Focusing on What the System Is: The Foundations of Form
    4. 2.4. Focusing on What the System Does: The System Lifeblood
    5. 2.5. Design and Code
    6. 2.6. Countdown: 3, 2, 1 . . .
  7. 3. Stakeholder Engagement
    1. 3.1. The Value Stream
      1. 3.1.1. End Users and Other Stakeholders as Value Stream Anchors
      2. 3.1.2. Architecture in the Value Stream
      3. 3.1.3. The Lean Secret
    2. 3.2. The Key Stakeholders
      1. 3.2.1. End Users
        1. 3.2.1.1. Psyching Out the End Users
        2. 3.2.1.2. Don't Forget Behavior
        3. 3.2.1.3. The End User Landscape
      2. 3.2.2. The Business
        1. 3.2.2.1. A Special Note for Managers
      3. 3.2.3. Customers
        1. 3.2.3.1. ...As Contrasted with End Users
        2. 3.2.3.2. "Customers" in the Value Stream
      4. 3.2.4. Domain Experts
        1. 3.2.4.1. No Ivory Tower Architects
        2. 3.2.4.2. Experts in Both Problem and Solution Domains
      5. 3.2.5. Developers and Testers
    3. 3.3. Process Elements of Stakeholder Engagement
      1. 3.3.1. Getting Started
      2. 3.3.2. Customer Engagement
    4. 3.4. The Network of Stakeholders: Trimming Wasted Time
      1. 3.4.1. Stovepipe Versus Swarm
      2. 3.4.2. The First Thing You Build
      3. 3.4.3. Keep the Team Together
    5. 3.5. No Quick Fixes, but Some Hope
  8. 4. Problem Definition
    1. 4.1. What's Agile about Problem Definitions?
    2. 4.2. What's Lean about Problem Definitions?
    3. 4.3. Good and Bad Problem Definitions
    4. 4.4. Problems and Solutions
    5. 4.5. The Process Around Problem Definitions
      1. 4.5.1. Value the Hunt Over the Prize
      2. 4.5.2. Problem Ownership
      3. 4.5.3. Creeping Featurism
    6. 4.6. Problem Definitions, Goals, Charters, Visions, and Objectives
    7. 4.7. Documentation?
  9. 5. What the System Is, Part 1: Lean Architecture
    1. 5.1. Some Surprises about Architecture
      1. 5.1.1. What's Lean about This?
        1. 5.1.1.1. Deliberation and "Pull"
        2. 5.1.1.2. Failure-Proof Constraints or Poka-Yoke
        3. 5.1.1.3. The Lean Mantras of Conservation, Consistency, and Focus
      2. 5.1.2. What's Agile about Architecture?
        1. 5.1.2.1. It's All About Individuals and Interactions
        2. 5.1.2.2. Past Excesses
        3. 5.1.2.3. Dispelling a Couple of Agile Myths
    2. 5.2. The First Design Step: Partitioning
      1. 5.2.1. The First Partition: Domain Form Versus Behavioral Form
      2. 5.2.2. The Second Partitioning: Conway's Law
      3. 5.2.3. The Real Complexity of Partitioning
      4. 5.2.4. Dimensions of Complexity
      5. 5.2.5. Domains: A Particularly Interesting Partitioning
      6. 5.2.6. Back to Dimensions of Complexity
      7. 5.2.7. Architecture and Culture
      8. 5.2.8. Wrap-Up on Conway's Law
    3. 5.3. The Second Design Step: Selecting a Design Style
      1. 5.3.1. Contrasting Structuring with Partitioning
      2. 5.3.2. The Fundamentals of Style: Commonality and Variation
      3. 5.3.3. Starting with Tacit Commonality and Variation
      4. 5.3.4. Commonality, Variation, and Scope
      5. 5.3.5. Making Commonalities and Variations Explicit
        1. 5.3.5.1. Commonality Categories
        2. 5.3.5.2. Next Steps
      6. 5.3.6. The Most Common Style: Object Orientation
        1. 5.3.6.1. Just What is Object Orientation?
      7. 5.3.7. Other Styles within the Von Neumann World
      8. 5.3.8. Domain-Specific Languages and Application Generators
        1. 5.3.8.1. The State of the Art in DSLs
        2. 5.3.8.2. DSLs' Place in Architecture
      9. 5.3.9. Codified Forms: Pattern Languages
      10. 5.3.10. Third-Party Software and Other Paradigms
    4. 5.4. Documentation?
      1. 5.4.1. The Domain Dictionary
      2. 5.4.2. Architecture Carryover
    5. 5.5. History and Such
  10. 6. What the System Is, Part 2: Coding It Up
    1. 6.1. The Third Step: The Rough Framing of the Code
      1. 6.1.1. Abstract Base Classes
      2. 6.1.2. Pre-Conditions, Post-Conditions, and Assertions
        1. 6.1.2.1. Static Cling
      3. 6.1.3. Algorithmic Scaling: The Other Side of Static Assertions
      4. 6.1.4. Form Versus Accessible Services
      5. 6.1.5. Scaffolding
      6. 6.1.6. Testing the Architecture
        1. 6.1.6.1. Usability Testing
        2. 6.1.6.2. Architecture Testing
    2. 6.2. Relationships in Architecture
      1. 6.2.1. Kinds of Relationship
      2. 6.2.2. Testing the Relationships
    3. 6.3. Not Your Old Professor's OO
    4. 6.4. How much Architecture?
      1. 6.4.1. Balancing BUFD and YAGNI
      2. 6.4.2. One Size Does Not Fit All
      3. 6.4.3. When Are You Done?
    5. 6.5. Documentation?
    6. 6.6. History and Such
  11. 7. What the System Does: System Functionality
    1. 7.1. What the System Does
      1. 7.1.1. User Stories: A Beginning
      2. 7.1.2. Enabling Specifications and Use Cases
      3. 7.1.3. Helping Developers, Too
      4. 7.1.4. Your Mileage may Vary
    2. 7.2. Who is Going to Use Our Software?
      1. 7.2.1. User Profiles
      2. 7.2.2. Personas
      3. 7.2.3. User Profiles or Personas?
      4. 7.2.4. User Roles and Terminology
    3. 7.3. What do the Users Want to Use Our Software for?
      1. 7.3.1. Feature Lists
      2. 7.3.2. Dataflow Diagrams
      3. 7.3.3. Personas and Scenarios
      4. 7.3.4. Narratives
      5. 7.3.5. Behavior-Driven Development
      6. 7.3.6. Now that We're Warmed Up ...
        1. 7.3.6.1. Prototypes
        2. 7.3.6.2. Towards Foundations for Decisions
        3. 7.3.6.3. Known and Unknown Unknowns
        4. 7.3.6.4. Use Cases as a Decision Framework
    4. 7.4. Why Does the User Want to Use Our Software?
    5. 7.5. Consolidation of What the System Does
      1. 7.5.1. The Helicopter View
        1. 7.5.1.1. Habits: The Developer View and the User View
        2. 7.5.1.2. Trimming the Scope
      2. 7.5.2. Setting the Stage
      3. 7.5.3. Play the Sunny Day Scenario
        1. 7.5.3.1. Business Rules
      4. 7.5.4. Add the Interesting Stuff
      5. 7.5.5. Use Cases to Roles
        1. 7.5.5.1. Roles from the Use Case
        2. 7.5.5.2. Bridging the Gap between the Business and the Programmer
    6. 7.6. Recap
      1. 7.6.1. Support the User's Workflow
      2. 7.6.2. Support Testing Close to Development
      3. 7.6.3. Support Efficient Decision-Making about Functionality
      4. 7.6.4. Support Emerging Requirements
      5. 7.6.5. Support Release Planning
      6. 7.6.6. Support Sufficient Input to the Architecture
      7. 7.6.7. Support the Team's Understanding of What to Develop
    7. 7.7. "It Depends": When Use Cases are a Bad Fit
      1. 7.7.1. Classic OO: Atomic Event Architectures
    8. 7.8. Usability Testing
    9. 7.9. Documentation?
    10. 7.10. History and Such
  12. 8. Coding It Up: Basic Assembly
    1. 8.1. The Big Picture: Model-View-Controller-User
      1. 8.1.1. What is a Program?
      2. 8.1.2. What is an Agile Program?
      3. 8.1.3. MVC in More Detail
      4. 8.1.4. MVC-U: Not the End of the Story
        1. 8.1.4.1. A Short History of Computer Science
        2. 8.1.4.2. Atomic Event Architectures
        3. 8.1.4.3. DCI Architectures
    2. 8.2. The Form and Architecture of Atomic Event Systems
      1. 8.2.1. Domain Objects
      2. 8.2.2. Object Roles, Interfaces, and the Model
        1. 8.2.2.1. Example
      3. 8.2.3. Reflection: Use Cases, Atomic Event Architectures, and Algorithms
      4. 8.2.4. A Special Case: One-to-Many Mapping of Object Roles to Objects
    3. 8.3. Updating the Domain Logic: Method Elaboration, Factoring, and Re-factoring
      1. 8.3.1. Creating New Classes and Filling in Existing Function Placeholders
        1. 8.3.1.1. Example
      2. 8.3.2. Back to the Future: This is Just Good Old-Fashioned OO
      3. 8.3.3. Analysis and Design Tools
      4. 8.3.4. Factoring
      5. 8.3.5. A Caution about Re-Factoring
    4. 8.4. Documentation?
    5. 8.5. Why All These Artifacts?
    6. 8.6. History and Such
  13. 9. Coding it Up: The DCI Architecture
    1. 9.1. Sometimes, Smart Objects Just Aren't Enough
    2. 9.2. DCI in a Nutshell
    3. 9.3. Overview of DCI
      1. 9.3.1. Parts of the User Mental Model We've Forgotten
      2. 9.3.2. Enter Methodful Object Roles
      3. 9.3.3. Tricks with Traits
      4. 9.3.4. Context Classes: One Per Use Case
    4. 9.4. DCI by Example
      1. 9.4.1. The Inputs to the Design
      2. 9.4.2. Use Cases to Algorithms
      3. 9.4.3. Methodless Object Roles: The Framework for Identifiers
      4. 9.4.4. Partitioning the Algorithms Across Methodful Object Roles
        1. 9.4.4.1. Traits as a Building Block
        2. 9.4.4.2. In Smalltalk
        3. 9.4.4.3. In C++
        4. 9.4.4.4. In Ruby
        5. 9.4.4.5. Coding it Up: C++
        6. 9.4.4.6. Coding Up DCI in Ruby
      5. 9.4.5. The Context Framework
        1. 9.4.5.1. The Ruby Code
        2. 9.4.5.2. The C++ Code
        3. 9.4.5.3. Making Contexts Work
        4. 9.4.5.4. Habits: Nested Contexts in Methodful Object Roles
      6. 9.4.6. Variants and Tricks in DCI
        1. 9.4.6.1. Context Layering
        2. 9.4.6.2. Information Hiding
        3. 9.4.6.3. Selective Object Role Injection
    5. 9.5. Updating the Domain Logic
      1. 9.5.1. Contrasting DCI with the Atomic Event Style
      2. 9.5.2. Special Considerations for Domain Logic in DCI
    6. 9.6. Context Objects in the User Mental Model: Solution to an Age-Old Problem
    7. 9.7. Why All These Artifacts?
      1. 9.7.1. Why not Use Classes Instead of "Methodful Object Roles"?
      2. 9.7.2. Why not Put the Entire Algorithm Inside of the Class with which it is Most Closely Coupled?
      3. 9.7.3. Then Why not Localize the Algorithm to a Class and Tie it to Domain Objects as Needed?
      4. 9.7.4. Why not Put the Algorithm into a Procedure, and Combine the Procedural Paradigm with the Object Paradigm in a Single Program?
      5. 9.7.5. If I Collect Together the Algorithm Code for a Use Case in One Class, Including the Code for All of its Deviations, Doesn't the Context Become Very Large?'
      6. 9.7.6. So, What do DCI and Lean Architecture Give Me?
      7. 9.7.7. And Remember...
    8. 9.8. Beyond C++: DCI in Other Languages
      1. 9.8.1. Scala
      2. 9.8.2. Python
      3. 9.8.3. C#
      4. 9.8.4. ...and Even Java
      5. 9.8.5. The Account Example in Smalltalk
    9. 9.9. Documentation?
    10. 9.10. History and Such
      1. 9.10.1. DCI and Aspect-Oriented Programming
      2. 9.10.2. Other Approaches
  14. 10. Epilog
  15. A. Scala Implementation of the DCI Account Example
  16. B. Account Example in Python
  17. C. Account Example in C#
  18. D. Account Example in Ruby
  19. E. Qi4j
  20. F. Account Example in Squeak
    1. F.1. Testing Perspective
    2. F.2. Data Perspective
      1. F.2.1. BB5Bank
      2. F.2.2. BB5SavingsAccount
      3. F.2.3. BB5CheckingAccount
    3. F.3. Context Perspective
      1. F.3.1. BB5MoneyTransferContext
    4. F.4. Interaction (RoleTrait) Perspective
      1. F.4.1. BB5MoneyTransferContextTransferMoneySource
      2. F.4.2. BB5MoneyTransferContextMyContext
      3. F.4.3. BB5MoneyTransferContextTransferMoneySink
    5. F.5. Support Perspective (Infrastructure Classes)
      1. F.5.1. BB1Context (Common Superclass for all Contexts)
      2. F.5.2. BB1RoleTrait (All RoleTraits are Instances of this Class)
  21. Bibliography

Product information

  • Title: Lean Architecture for Agile Software Development
  • Author(s): James Coplien, Gertrud Bjørnvig
  • Release date: August 2010
  • Publisher(s): Wiley
  • ISBN: 9780470684207