Software Architecture and Agile Software Development —An Oxymoron?
Total Page:16
File Type:pdf, Size:1020Kb
Architecture and Agility June 8, 2009 @ USC T H E U N I V E R S I T Y O F B R I T I S H C O L U M B I A Software Architecture and Agile Software Development —An Oxymoron? Philippe Kruchten USC, June 8th 2009 Copyright © 2004-2009 by Philippe Kruchten 1 Philippe Kruchten, Ph.D., P.Eng., CSDP Professor of Software Engineering Department of Electrical and Computer Engineering University of British Columbia [email protected] +1 604 827-5654 Founder and president Kruchten Engineering Services Ltd [email protected] +1 604 418-2006 Cofounder and secretary of IFIP WG2.10 on Software architecture Cofounder of Agile Vancouver Associate Editor of IEEE Software for architecture and design Kruchten - 2009 Philippe Kruchten 1 Architecture and Agility June 8, 2009 @ USC Agile & Architecture? Oil & Water? Paradox Oxymoron Conflict Incompatibility Kruchten - 2009 Agility A definition • Agility is the ability to both create and respond to chhidtfititbltbiange in order to profit in a turbulent business environment. Jim Highsmith (2002) Characteristics • Iterative and incremental • SlllSmall release • Collocation • Release plan/ feature backlog • Iteration plan/task backlog Sanjiv Augustine (2004) Kruchten - 2009 Philippe Kruchten 2 Architecture and Agility June 8, 2009 @ USC Agile Values: the Agile Manifesto We have come to value: Individuals and interactions over process and tools, Working software over comprehensive documents, Customer collaboration over contract negotiation, Responding to change over following a plan. That is, while there is value in the items on the right, we value the items on the left more Source: http://www.agilemanifesto.org/ Kruchten - 2009 Software Architecture: A Definition Software architecture encompasses the significant decisions about the organization of a software system, the selection of the structural elements and their interfaces by which the system is composed together with their behavior as specified in the collaboration among those elements, the composition of these elements into progressively larger subsystems, Grady Booch, Philippe Kruchten, Rich Reitman, Kurt Bittner; Rational, circa 1995 (derived from Mary Shaw) Kruchten - 2009 Philippe Kruchten 3 Architecture and Agility June 8, 2009 @ USC Software Architecture (cont.) the architectural style that guides this organization, these elements and their interfaces, their collaborations, and their composition. Software architecture is not only concerned with structure and behavior, but also with usage, functionality, performance, resilience, reuse, comprehensibility, economic and technological constraints and tradeoffs, and aesthetics. Kruchten - 2009 Perceived Tensions Agility- Architecture Architecture = Big Up-Front Design Architecture = massive documentation Role of architect(s) Low perceived or visible value of architecture Adaptation versus Anticipation Kruchten - 2009 Philippe Kruchten 4 Architecture and Agility June 8, 2009 @ USC Story of a failure Large re-engineering of a complex distributed world-wide syy;stem; 2 millions LOC in C, C++, Cobol and VB Multiple sites, dozens of data repositories, hundreds of users, 24 hours operation, mission- critical ($billions) xP+Scrum, 1-week iterations, 30 then up to 50 dldevelopers Rapid progress, early success, features are demo-able Direct access to “customer”, etc. A poster project for scalable agile development Kruchten - 2009 Hitting the wall After 4 ½ months, difficulties to keep with the 1-week iterations Refactoring takes longer than one iteration Scrap and rework ratio increases dramatically No externally visible progress anymore Iterations stretched to 3 weeks Staff turn-over increases; Project comes to a halt Lots of code, no clear architecture, no obvious way forward Kruchten - 2009 Philippe Kruchten 5 Architecture and Agility June 8, 2009 @ USC Issues 1. Semantics 2. Scope 3. Lifecycle 4. Role 5. Description 6. Methods 7. Value & cost Kruchten - 2009 Issues 1. Semantics 2. Scope 3. Lifecycle 4. Role 5. Description 6. Methods 7. Value & cost Kruchten - 2009 Philippe Kruchten 6 Architecture and Agility June 8, 2009 @ USC Semantics What do we mean by “architecture”? Kruchten - 2009 Software Architecture: A Definition Software architecture encompasses the significant decisions about the organization of a software system, the selection of the structural elements and their interfaces by which the system is composed together with their behavior as specified in the collaboration among those elements, the composition of these elements into progressively larger subsystems, Grady Booch, Philippe Kruchten, Rich Reitman, Kurt Bittner; Rational, circa 1995 (derived from Mary Shaw) Kruchten - 2009 Philippe Kruchten 7 Architecture and Agility June 8, 2009 @ USC Software Architecture (cont.) the architectural style that guides this organization, these elements and their interfaces, their collaborations, and their composition. Software architecture is not only concerned with structure and behavior, but also with usage, functionality, performance, resilience, reuse, comprehensibility, economic and technological constraints and tradeoffs, and aesthetics. Kruchten - 2009 Architecture = design decisions Software Software Architecture design Decisions “Design” decisions Architectural decisions “Requirements constraints” Req me n u ts ire Code etc. A choice that is binding in the final product Kruchten - 2009 Philippe Kruchten 8 Architecture and Agility June 8, 2009 @ USC Architecture = Design? Not “Do not dilute the meaning of the term architecture by applying it to everything in sight.” Mary Shaw Kruchten - 2009 Issues 1. Semantics 2. Scope 3. Lifecycle 4. Role 5. Description 6. Methods 7. Value & cost Kruchten - 2009 Philippe Kruchten 9 Architecture and Agility June 8, 2009 @ USC Scope How much architecture stuff do you really need? It depends… It depypends on your context Kruchten - 2009 Environment Context Practice Environment Conditions (organization) Drive/constrain Context Attributes (software project) Drive Practices (actual process) Kruchten - 2009 Philippe Kruchten 10 Architecture and Agility June 8, 2009 @ USC Context attributes affecting practices 1. Size Size Age of Criticality 2. Criticality System 3. Age of system 4. Rate of change Rate of Business Context 5. Business model change model 6. Stable architecture Stable 7. Team distribution Governance Architecture 8. Governance Team Distribution Kruchten - 2009 Issues 1. Semantics 2. Scope 3. Lifecycle 4. Role 5. Description 6. Methods 7. Value & cost Kruchten - 2009 Philippe Kruchten 11 Architecture and Agility June 8, 2009 @ USC Lifecycle When does architectural activities take place? The evil of “BUFD” = Big Up-Front Design “Defer decisions to the last responsible moment” Refactor! Kruchten - 2009 Architectural Effort During the Lifecycle Inception Elaboration Construction Transition time Majority of architectural design activities Kruchten - 2009 Philippe Kruchten 12 Architecture and Agility June 8, 2009 @ USC Little dedicated architectural effort Inception Construction Transition time Minimal pure Ideal realm of agile Architectural practices Activities Kruchten - 2009 Iterations and Phases Inception Elaboration Construction Transition PliiPreliminary AhittArchitect. AhittArchitect. DlDevel. DlDevel. DlDevel. TitiTransition TitiTransition Iteration Iteration Iteration Iteration Iteration Iteration Iteration Iteration Internal Releases with Releases with main fhittfocus on architecture fftfocus on features An architectural iteration focuses in putting in place major architectural elements, resulting in a baseline architectural prototype at the end of elaboration. Kruchten - 2009 Philippe Kruchten 13 Architecture and Agility June 8, 2009 @ USC Team Structure over Time (Very Large) Inception Elaboration Construction and Transition Management team Management team Architecture team Architecture Feature team 1 team Initial team Feature team 2 Prototyping team Infrastructure Feature team 3 team A Infrastructure team B Kruchten - 2009 integration team Teams using agile development practices Inception Elaboration Construction and Transition Management team Management team Architecture team Architecture Feature team 1 team Initial team Feature team 2 Prototyping team Infrastructure Feature team 3 team A Infrastructure team B Kruchten - 2009 integration team Philippe Kruchten 14 Architecture and Agility June 8, 2009 @ USC Issues 1. Semantics 2. Scope 3. Lifecycle 4. Role 5. Description 6. Methods 7. Value & cost Kruchten - 2009 Inflation? Kruchten - 2009 Philippe Kruchten 15 Architecture and Agility June 8, 2009 @ USC Role – Agile Architect A. Johnston defines the agile architect, but it does not seems to be any different from a software archit ec t be fore ag ile me tho ds came in. Combination of • Visionary - Shaper • Designer – making choices • Communicator – between multiple parties • Troubleshooter • Herald – window of the project • Janitor – cleaning up behind the PM and the developers Kruchten - 2009 Two styles of software/system architects Maker and Keeper of Big Mentor, Troubleshooter, decisions and Prototyper • Bring in technological • Implements and try changes architecture • External collaboration • Intense internal • More requirements-facing collaboration • Gatekeeper • More code-facing • Fowler: Architectus • Fowler: Architectus aryzus reloadus Only big new projects need both or separate people Kruchten - 2009 Philippe Kruchten 16 Architecture and Agility June 8, 2009 @ USC Team Structure over