Software Architecture and the UML

Grady Booch

Architecting a dog house

Can be built by one person Requires Minimal modeling Simple process Simple tools

Architecting a house

uilt most efficiently and timely by a team equires Modeling Well-defined process Power tools

Architecting a high rise .

Early architecture Progress .Limited knowledge of theory .

Advances in materials .3 times the height of Cheops .Modern architecture Progress Scale .5 times the span of the Pantheon .Advances in analysis .

Modeling a house .

Learning from failure .Imitation of previous efforts .Experimentation  Mannerism (Michelangelo.Integration of other forces . LeCorbusier) . Palladio)  Baroque  Engineering/Rational/National/Romantic  Art noveau  Modern movement (Wright.Movements in civil architecture  Bronze age/Egyptian (Imhotep)  Grecian/Roman (Vitruvius)  Byzantine/Romanesque  Gothic Progress .

office buildings. airports  Industry . hospitals.industrial buildings. flats and apartments. museums . theaters and cinemas. laboratories. education. banks. gardens. hotels.houses. restaurants.shops and religion Neufert Architect’s Data The Handbook of Building Types  Commerce .Kinds of civil architecture  Community . farm buildings  Leisure .

make ten times the effort.Equilibrium Avoiding failure Load Any time you depart from established practice.Dynamic loads .Redundancy .Safety factors .LeMessuier . . Especially on a very large project.Forces in civil architecture Load Compression Tension Kinds of loads .Live loads .Dead loads . ten times the investigation.

Brand. How Buildings Learn Shearing layers of change Space plan Services Stuff Structure Skin Site .

10-15 month duration .Mostly 4GL.“Products” Large-Scale Organization/Entity Simulation Small Scientific Simulation IS Application Distributed Objects (Order Entry) IS Application GUI/RDB (Order Entry) Business Spreadsheet Higher management complexity .Small scale . fault-tolerant . real-time.“Projects” Enterprise IS (Family of IS Applications) Defense MIS System Lower technical complexity . unprecedented.Single stakeholder .Embedded.5-10 people .High performance Telecom Switch Commercial Embedded Compiler Automotive Software CASE Tool Defense Weapon System National Air Traffic Control System Lower management complexity . or component-based .Contractual .Application reengineering .Large scale .Many stake holders .Custom.Interactive performance .Some unknowns & risks .3-5 external interfaces . distributed.Informal . architecture reengineering .Walker Royce Dimensions of software complexity Higher technical complexity An average software project: .

and it’s our goal to kill it. Raduchel. Jan Baan . Sun Microsystems Our enemy is complexity.Forces in Software Functionality Cost Capacity Availability Compatibility Fail safe Fault tolerance Performance Technology churn Throughput Resilience he challenge over the next 20 years will not be speed or cost or perform will be a question of complexity. Chief Strategy Officer.

Wojtek Kozaczynski The domain of architecting The “what” Architecture Qualities Architecture Architecture Representation Satisfies Constrain The “why” System Features S/W Requirements System Quality Attributes Technology Follows Process Skills Defines The “who” Produces The “how” Architect Defines role Organization Stakeholders .

Architecture and design are the same thing Architecture and infrastructure are the same thing <my favorite technology> is the architecture A good architecture is the work of a single architect Architecture is flat. one blueprint is enough Architecture is just structure System architecture precedes software architecture Architecture cannot be measured and validated Architecture is a Science Architecture is an Art .Philippe Kruchten We all know that ...

habitable ones 2 a: formation or construction as or as if as the result of conscious act <the ~ of the garden> b: a unifying or coherent form or structure <the novel lacks ~> .Architecture defined (again) Merriam Webster’s Collegiate Dictionary 10th edition Architecture n (1555) 1: the art of science of building. the art or practice of designing and building structures and esp. specifically.

selection of the structural elements and their interfaces by which a system is composed .architectural style that guides this organization . Rational  Software architecture encompasses the set of significant decisions about the organization of a software system . CMU Grady Booch. Rich Reitman Kurt Bittner.behavior as specified in collaborations among those elements .composition of these structural and behavioral elements into larger subsystem .Architecture defined (yet again) Mary Shaw. Philippe Kruchten.

Rational .Architecture defined (continued)  Software architecture also involves usage functionality performance resilience reuse comprehensibility economic and technology constraints and tradeoffs .aesthetic concerns Mary Shaw. CMU Grady Booch. Philippe Kruchten. Rich Reitman Kurt Bittner.

 An architectural style defines . CMU Architectural style  An architecture style defines a family of systems in terms of a pattern of structural organization.a set of constraints on how they can be combined .a vocabulary of components and connector types .Mary or more semantic models that specify how a system’s overall properties can be determined from the properties of its parts .

Architecture metamodel Software Architecture is part of System architecture is represented by Architecture Design Process Software Architecture Description is made of relates to A rchitecture Style guide has Architectural style Architectural view is m ade of has constrains is a produces Logical view Process view Implementation view Deploym ent view Use case view Software Architects are actors in has is a Architectural Pattern Form Connection depicts Com ponent satisfies constrains Requirem ents Constraints Architectural Blueprint .

Models  Models are the language of designer. blueprints  Scale  Models allow reasoning about some characteristic of the real system . in many disciplines  Models are representations of the system to-be-built or as-built  Models are vehicle for communications with various stakeholders  Visual models.

Many stakeholders. multiple blueprints . many views  Architecture is many things to many different interested parties end-user customer project manager system engineer developer architect maintainer other developers  Multidimensional reality  Multiple stakeholders multiple views.

covering particular concerns. and omitting entities that are not relevant to this perspective .Architectural view  An architectural view is a simplified description (an abstraction) of a system from a particular perspective or vantage point.

Architecturally significant elements  Not all design is architecture  Main “business” classes  Important mechanisms  Processors and processes  Layers and subsystems  Architectural views = slices through models .

Characteristics of a Good Architecture  Resilient  Simple  Approachable  Clear separation of concerns  Balanced distribution of responsibilities  Balances economic and technology constraints .

Representing System Architecture Logical View End-user Functionality Implementation View Programmers Software management Process View System integrators Performance Scalability Throughput Use Case View Deployment View System engineering System topology Delivery. installation Communication Conceptual Physical .

Relation Between Views Logical view Component view α Process view β Deployment view .

Single processor: drop deployment view .Very Small program: drop implementation view  Adding views: .How many views?  Simplified models to fit the context  Not all systems require all views: .Single process: drop process view .Data view. security view .

The Value of the UML  Is an open standard  Supports the entire software development lifecycle  Supports diverse applications areas  Is based on experience and needs of the user community  Supported by many tools .

9 Unified Method 0. Sep ‘97 public First submission to OMG.Creating the UML UML 1. Jan ´97 feedback UML partners Web . Nov 1997 Final submission to OMG.3 OMG Acceptance.8 Other methods Booch method OMT OOSE .1 UML 1.June ´96 OOPSLA ´95 UML 1.0 UML 0.

UML Partners  Rational Software Corporation  Hewlett-Packard  I-Logix  IBM  ICON Computing  Intellicorp  MCI Systemhouse  Microsoft  ObjecTime  Oracle  Platinum Technology  Taskon  Texas Instruments/Sterling Software  Unisys .

Mellor Object lifecycles Odell Classification . et al Frameworks and patterns.Contributions to the UML Meyer Before and after conditions Harel Statecharts Gamma. Booch Booch method HP Fusion Operation descriptions and message numbering Rumbaugh OMT Embley Singleton classes and high-level view Jacobson OOSE Wirfs-Brock Responsibilities Shlaer .

Overview of the UML  The UML is a language for visualizing specifying constructing documenting the artifacts of a software-intensive system .

Overview of the UML  Modeling elements  Relationships  Extensibility Mechanisms  Diagrams .

note .class.interaction. node  Behavioral elements . subsystem  Other elements . collaboration.package. state machine  Grouping elements . component. interface. use case. active class.Modeling Elements  Structural elements .

Relationships  Dependency  Association  Generalization  Realization .

Extensibility Mechanisms  Stereotype  Tagged value  Constraint .

Models. Views. and Diagrams State State Diagrams Class Diagrams Diagrams model is a complete escription of a system om a particular erspective Use Case Use Case Diagrams Sequence Diagrams Diagrams Use Case Use Case Diagrams Use Case Diagrams Diagrams State State Diagrams Object Diagrams Diagrams Scenario Scenario Diagrams Collaboration Diagrams Diagrams Models State State Diagrams Component Diagrams Diagrams Scenario Scenario Diagrams Statechart Diagrams Diagrams Component Component Diagrams Deployment Diagrams Activity Diagrams Diagrams .

statechart. activity . class.Is semantically consistent with other views  In the UML. component. there are nine standard diagrams .Diagrams  A diagram is a view into a model .Dynamic views: sequence. deployment . collaboration.Static views: use case.Provides a partial representation of the system .Presented from the aspect of a particular stakeholder . object.

Use Case Diagram  Captures system functionality as seen by users .

Use Case Diagram  Captures system functionality as seen by users  Built in early stages of development  Purpose Specify the context of a system Capture the requirements of a system Validate a system’s architecture Drive implementation and generate test cases  Developed by analysts and domain experts .

Class Diagram  Captures the vocabulary of a system .

designers. and implementers .Name and model concepts in the system .Specify collaborations .Class Diagram  Captures the vocabulary of a system  Built and refined throughout development  Purpose .Specify logical database schemas  Developed by analysts.

Object Diagram  Captures instances and links .

and implementers . designers.Illustrate data/object structures .Specify snapshots  Developed by analysts.Object Diagram  Shows instances and links  Built during analysis and design  Purpose .

Component Diagram  Captures the physical structure of the implementation .

Organize source code .Construct an executable release .Specify a physical database  Developed by architects and programmers .Component Diagram  Captures the physical structure of the implementation  Built as part of architectural specification  Purpose .

Deployment Diagram  Captures the topology of a system’s hardware .

Identify performance bottlenecks  Developed by architects. networking engineers.Deployment Diagram  Captures the topology of a system’s hardware  Built as part of architectural specification  Purpose .Specify the distribution of components . and system engineers .

Sequence Diagram
 Captures dynamic behavior (time-oriented)

Sequence Diagram
 Captures dynamic behavior (time-oriented)  Purpose
- Model flow of control - Illustrate typical scenarios

Collaboration Diagram
 Captures dynamic behavior (messageoriented)

Illustrate coordination of object structure and control .Collaboration Diagram  Captures dynamic behavior (messageoriented)  Purpose .Model flow of control .

Statechart Diagram
 Captures dynamic behavior (eventoriented)

Statechart Diagram
 Captures dynamic behavior (eventoriented)  Purpose
- Model object lifecycle - Model reactive objects (user interfaces, devices, etc.)

Activity Diagram
 Captures dynamic behavior (activity-oriented)

Activity Diagram  Captures dynamic behavior (activity-oriented)  Purpose .Model business workflows .Model operations .

collaborations Implementation View Components Use cases Process View Active classes Use Case View Deployment View Nodes Organization Dynamics Package. subsystem Interaction State machine .Architecture and the UML Design View Classes. interfaces.

Sequence of activities that lead to the production of architectural artifacts:  A software architecture description  An architectural prototype .  Architectural process . In software engineering the goal is to build a software product or to enhance an existing one.Software engineering process A set of partially ordered steps intended to reach a goal.

Rational Unified Process  Iterative  Architecture-centric  Use-case driven  Risk confronting .

Focus over time Discovery Invention Implementation Focus .

steps When does architecture happen? What does happen?  Artifacts .Activity. Iterations  Process Workflows . documents What is produced?  Worker: Architect Who does it? .Key concepts  Phase.reports.models .

and baseline the architecture Build the product Transition the product to its users . specify features.Lifecycle Phases Inception Elaboration Construction Transition time  Inception  Elaboration  Construction  Transition Define the scope of the project and develop business case Plan project.

Major Milestones Inception Elaboration Construction Transition time Vision Baseline Architecture Initial Capability Product Release .

Iteration Arch Iteration .. Release Release Release Release Release Release Release Release An iteration is a sequence of activities with an established plan and evaluation criteria. Dev Dev Iteration Iteration ......Phases and Iterations Inception Elaboration Construction Transition Prelim . resulting in an executable release . Trans Iteration ...

specifying. and documenting architecture  The Unified Process prescribes the successive refinement of an executable architecture Inception time Elaboration Construction Transition Architecture . constructing.Architecture-Centric  Models are vehicles for visualizing.

#m+1 Iterations . #m Iter. #n Iter.Unified Process structure Phases Process Workflows Business Modeling Requirements Analysis & Design Implementation Test Deployment Inception Elaboration Construction Transition Supporting Workflows Configuration Mgmt Management Environment Preliminary Iteration(s) Iter. Iter. #2 Iter. #n+1 #n+2 Iter. #1 Iter.

Architecture and Iterations Use case Model Design Model Implementati on Model Deployment Model Test Model Content .

and validate “architecturally significant” elements  Not everything is architecture Main “business” classes Important mechanisms Processors and processes Layers and subsystems Interfaces  Produce a Software Architecture Documen . select.Architectural design  Identify.

Architectural design workflow  Select scenarios: criticality and risk  Identify main classes and their responsibility  Distribute behavior on classes Use case view Logical view  Structure in subsystems. layers. Implementation view define interfaces Deployment view  Define distribution and concurrency Process view  Implement architectural prototype  Derive tests from use cases  Evaluate architecture Iterate .

Sources of architecture Method Theft Intuition Theft Method Intuition Classical system Unprecedented system .

Patterns  A pattern is a solution to a problem in a context  A pattern codifies specific knowledge collected from experience in a domain  All well-structured systems are full of patterns .Design patterns .Architectural patterns .Idioms .

belts. and chains Friction wheels Toothed wheels Flywheels Levers and connecting rods Click wheels and gears Ratchets • Brakes • Pipes • Valves • Springs • Cranks and rods • Cams • Pulleys • Engaging gears . axles.daVinci Mechanisms              Screws Keys Rivets Bearings Pins. shafts Couplings Ropes.

Abstract factory .Design patterns  Creational patterns .Prototype Design Patterns Gamma et al  Structural patterns .Chain of responsibility .Bridge .Proxy  Behavioral patterns .Mediator .Adapter .Visitor  Mechanisms are the soul of an architecture .

Modeling a design pattern .

) .Modeling a design pattern (cont.

Modeling a design pattern (cont.) .

Architectural patterns  Distributed  Event-driven  Frame-based  Batch  Pipes and filters  Repository-centric  Blackboard  Interpreter  Rule-based • • • • • Software Architecture Shaw and Garlan Buschmann et al A System of Patterns Buschman et al Booch Layered MVC IR-centric Subsumption Disposable .

item s ) O bs erver upd ate() M iddle lay er Cus to m er nam e : S tr ing A ddr es s : S tr ing s ave() get N am e() updateN am e() O rder L ine item s : P roduc t get Na me() updateNam e() P roduc t na me : S tr ing pr ic e : C ur ren c y ge tNam e() up dateN am e() C us tom er * O rder Line * P roduc t S Q L Databas e .Complex business system C us tom er nam e : S tring A ddres s : S tring s ave() O rder date : D ate S ales pro duc t : P rod uct Real-Life Object-oriented Systems Soren Lauesen G UI lay er S er vic eA gent purc has e(c us tom er. produc t.

Logical application architecture Graphical User Interface Relational Database Graphical User Interface Business Object Model Graphical User Interface Business Object Model Relational Database Relational Database .

Physical application architecture Thinner client. thicker server Client A Application Business Object Services Business Object Engine Client B Application DCOM CORBA Beans ADO/R Client C WWW Browser COM Business Object Server MTS Beans ETS Web HTML Server CGI ASP Java Business Object Services Business Object Engine Business Object Services Business Object Engine Relational Database Server(s) .

C++. CORBA. DCOM Fulfillment System Financial System Inventory System RDBMS Server Native languages . CGI Application Server Java. JavaBeans. Netscape Server Java. C. source code enhancements The Second Wave Paul Dreyfus. JavaScript. JavaScript. C++.Complex Internet system Client Dynamic HTML. C. Java plug-ins.

goal oriented  Leadership.Who are the architects?  Experience . authority  Architecture team .balance .domain  development .

Architect  Not just a top level designer  Need to ensure feasibility  Not the project manager  But “joined at the hip”  Not a technology expert  Purpose of the system.  Not a lone scientist  Communicator . “fit”.

Software architecture team charter  Defining the architecture of the software  Maintaining the architectural integrity of the software  Assessing technical risks related to the software design  Proposing the order and contents of the successive iterations  Consulting services  Assisting marketing for future product definition  Facilitating communications between project teams .

.Architecture is making decisions The life of a software architect is a long (and sometimes painful) succession of suboptimal decisions made partly in the dark.

IEEE Working Group on Architecture .Futures  ADL: Architecture Description Languages . LEAP.UML. Wright. LILEAnna. P++. UniCon.INCOSE Working Group on System Architecture  Systematic capture of architectural patterns . µRapid  Standardization of concepts .

http://www. Wiley and Sons. Richard Helm. Systems Architecting: Creating and Building Complex Systems. Pattern-Oriented Software Architecture . November 1995. and Michael Stahl. Applied Software Architecture. Peter Sommerlad.  Philippe Kruchten. Englewood Cliffs NJ.A System of Patterns. Régine Meunier. Robert Nord.References (Architecture)  Len Bass. 1991.  Frank  Eberhardt Rechtin. IEEE. Dilip Soni.  Christine Hofmeister.” IEEE Software. John Vlissides. Addison-Wesley. 1996.  Eric Gamma. Prentice-Hall. Addison-Wesley 1995. Addison-Wesley 1999. Hans Rohnert. 1998. Ralph Johnson. Design Patterns. Software Architecture in Practice. Paul Clements & Rick Kazman. 12 (6). “The 4+1 View Model of Architecture. .rational.

1995. Terry Baker. Witt. May 1998 http://www. Software Architecture and Design—Principles. NJ. F. and Methods. 1996. Recommended Practice for Architectural Description. 1997. and David Garlan. Draft 2. Van Nostrand Reinhold.wwisa.0 of IEEE P1471. Prentice-Hall.References (Architecture)   Eberhardt Rechtin & Mark Maier. Software Architecture— Perspectives on an Emerging Discipline. The World-wide Institute of Software Architects http://www. New York NY. CRC Press. Upper Saddle River.pithecanthropus.  Mary   . and Everett W. Bernard I. The Art of System Architecting. Merritt.

James Rumbaugh. The Unified Modeling Language User Guide.References (UML)  Grady Booch. . Addison-Wesley. Ivar Jacobson. 1999.

1998 Walker Royce. Grady Booch.0. Rational Unified Process 5. May 1998. . Addison-Wesley. Object Solutions. July 1996.An Introduction.” IEEE Software. Philippe     Philippe Kruchten. “A spiral model of software development and enhancement.” IEEE Computer.” CrossTalk. “A Rational Development Process. 1995. 1999. The Rational Unified Process . CA.rational. Barry Boehm. Addison-Wesley. Addison-Wesley. 1998 The Software Program Manager’s Network http://www. “Anchoring the software process.References (Process)     Barry Boehm. http://www. July 1996. Cupertino. Software Project Management: a Unified Framework.

.!8.943..039 9.943    # 0.943 :83088 -0.90.9:70 %3307.9 $07.55.07807...07 039 55...9 330 039 55.08 :83088 -0.38  .7.

.9. :83088 -0.9 330 :83088 -0.9 $07.08 :83088 -0.38 %$ 0% $07.07  $! .07 8  ..943.9 330 #0.08 :83088 -0.9 $07....80$07.07 %$ 0.-.9$07.# 039 74807 :83088   -0.

50 $07..759 .. 5: 38 84:7.   .  55..03947 $8902 #$ $07.% ..08  .38  #   :12039 $8902 3.$.0.   .3:.0...4250390730988902 039 3.07 ..07 .07 ...0..020398 %0$0..0 !..943 $07.43/.9...:701:8 098.$..4/003. $8902 3..  .70/0..9:7090.7.9.2 -..98  50703.0452039 /42.470390/  0.0 4.0 8419.3  !74 .4.:9479  7./0785 .7090.

3.0/08307 00/94038:7010.9905  49.8-9  49905740.03989 422:3.947  .34405079 !:75480419088902  19   49..07 :9 430/.90.90.9  49:89.4308.9450.92.7.

70.90.90/9490 8419.990.7.3/.90.2.70  88088390.088.9:7090.39.93.78870.9.9438  438:93807.0907.3.9438-09003 5740..70/083  !7454839047/07.7.70931471:9:70574/:.9 /013943  ..9:7041908419.43903984190 8:.90.3390..390794190 8419.7907  013390.422:3.70  ..28  .7...$419.9:7.08  888932. %01041.0884341 8:-4592.98.7.43 .31: 8:.7  .9:7082./05.79390 /.3/0.

:9:708  7.5.9:7. ! a#.90.90.9:70  $8902.3/.9..9:70  $47374:543$8902 7.7.94341..7/.9:7008.59:7041.43.75943.90.990738  .08 & &343 33.90.3:.5/ ! 79   $9.0598 47374:5437.

02-07   995.7/02 #.08 7.3 $419.543843 083 !.2.3/.33 #F300:307 . !.90.99073 70390/$419.0 //843 080   7.9:70  $419.9:70  $890241!./  .3/$438   7893041208907 #4-07947/ 5$43 550/$419.70   4.707.38#43079 !0907$42207.9:703 !7.90. 43'88/08 #.90.:020398 #.9:70  03.990738 //843 080  !5507:...22..9.0$9.990738 0.90.#010703.9:70 //843 080  7.2.707...88 !.903  %0 '04/0417.3:8.70 7.90.


42. 7.943. .




 -07.90.    .7/9#0.93.9370.0 .3/:/3 4250$89028 3044/118 !7039.93 $890287.

 995.08 7.75943 7.19 41 ! .90.9:7.07 %07941$8902 7.93 #!7088  #0.7.90..93 .7/9#0.#010703.01477.   -07.42203/0/!7.


.42.39745:8 . 590.


508 4/08 .07   !7039.9:70 !07850.7$..9:70.0843.530 &5507$.707.7.07 ./.3/094/8  047 '. .3/083 !73.  .  073.0 .3/.3/.90.70 7.07099 07799 $419.//0#.90.34897.707.320738.98 995.3 $419.90.7/ 99  %077.9.3/#034/  %047/ /03899:9041$419.


47    . 8.

: .208#:2-.3:.0&807:/0 //843 080   ./44..08 &  7.4-843 %0&310/ 4/03..7.#010703. .

 .70 : 7.3.473908419.70574.943.70/0.08 !74.088  7488%.77402  3. : 995.#010703.0452039.0.02039 425:907 .24/0418419.088     .  -0.77402  857.0452039!74./44.088  $419.903  #.3/ 03.9$4:9438 //843 080  !5507:.


 7. .42.943.




903 %0#.9.3.088 3 3974/:.70!740.70!747.&310/!74.&310/ 7.943.07#4.02039.088  #.2047 //843 080  %0$419.&310/!74.07 80947 995.2.943.0 $419.     !5507:.3.943.943 //843 080  #. :507934   .


42  . 8523 .