! How work in building software is done: ! e.g., waterfall process. ! e.g., object-oriented development. ! e.g., requirements inspection process

Size: px
Start display at page:

Download "! How work in building software is done: ! e.g., waterfall process. ! e.g., object-oriented development. ! e.g., requirements inspection process"

Transcription

1 Software Process Process CMPUT 401 Module 04! How work in building software is done:! e.g., waterfall process! e.g., object-oriented development! e.g., requirements inspection process Department of Computing Science University of Alberta Ken Wong, 008! institutes a set of rules Software life cycle Software Process Process group! Typical elements:! goal! phases! activities! tasks! roles! work products like products, processes are also designed (planned) for a particular project Process Activity uses Work Product Phase produces consumes Task Resource Participant! guidelines! measurement 3 Time Money 4

2 Software Process! Discussion:! When would we need more discipline in constructing software?! discipline, formality, maturity! how to assess? Software Process! Example factors influencing formality :! number of people involved! size/complexity of software! duration of the project! level of quality needed! regulations! 5 6 Process Maturity Capability Maturity Model! Maturity levels:! (1) initial! ad hoc or chaotic, depends on heroism, ~60%! () repeatable how is your company? Selected Key Process management Project planning Project monitoring and control Configuration management Measurement and analysis Area Engineering Project management Project management Support Support Maturity! basic project planning, reviews, ~5%! (3) defined! process is documented, and institutionalized, ~13% Process and product quality assurance Product integration Organizational process definition Organizational process focus Support Engineering Process management Process management 3 3 3! (4) managed! quality goals, measurement! (5) optimizing Integrated project management Risk management Organizational process performance Causal analysis and resolution Project management Project management Process management Support ! process itself improves over time 7 [SEI] 8

3 Capability Maturity Model! Issues:! overhead! process versus product focus! suited for large, regulated organizations! certifying organizational compliance Process! Issues:! configure a process for the needs of the project! no single specific process works right for every kind of product and level of quality! extreme programming? 9! configure a process based on the artifacts to be produced! what is produced for requirements, design, etc.! templates and tools 10 Process! Prime directive:! Only do those activities and produce those artifacts that directly lead to delivering value to your customers and stakeholders. G. Pollice et al.! if we don t do, will something bad happen?! e.g., architecture design, documentation Process Enactment! Issues:! following a process does not always guarantee a quality product! chosen process may be wrong for the project! how to understand and follow a process! process models, workflow engine? 11 1

4 Software Life Cycle Software Life Cycle! End-to-end:! what activities and tasks?! what dependencies between activities?! how to schedule activities? Analysis System Program Program Implementation What is the problem? What is the solution? What are the mechanisms that best implement the solution? How is the solution constructed? Problem Domain Implementation Domain ing Is the problem solved? Delivery Can the customer use the solution? 13 Maintenance Are enhancements needed? 14 Life Cycle Models Waterfall Model! Many variations: Specification! waterfall model! Royse (1970) Architectural! V model Detailed! Jensen & Tonies (1979)! sawtooth model! Rowen (1990)! spiral model!! Boehm (1987) 15 ingrained? Coding and Unit ing Integration and ing Delivery and Installation Maintenance and Support 16

5 System Analysis V Model Operation Sawtooth Model System Analysis Prototype Demonstration 1 Prototype Demonstration Client Client Acceptance Software Elicitation Client Acceptance Developer System Integration & Analysis System Integration & Analysis Component Integration & Preliminary Component Integration & Preliminary Detailed Unit Detailed Unit Implementation 17 Implementation 18 Spiral Model! Each iteration has phases:! define goals, alternatives, and constraints! evaluate alternatives, identify and resolve risks! develop and test prototype! plan next cycle Spiral Model! Iterations:! concepts! requirements! system design! detailed design! code! test! integration! acceptance! evolution 19 two forms of iteration 0

6 Unified Process! Life cycle model:! proposed by Jacobson, Booch, Rumbaugh! similar to the Boehm spiral model! series of cycles ending with a release! each cycle has four phases! each phase may involve one or more iterations! may be customized! e.g., Rational Unified Process Unified Process! Four phases:! inception! e.g., requirements, planning! elaboration! e.g., architecture, unit tests! construction! e.g., design, implementation, testing! transition! e.g., beta release, postmortem cycles and iterations, similar to spiral model 1 Unified Process Unified Process Deliverables Inception scope and make case to build product vision/context features list use cases domain model glossary Analysis/ candidate architecture Implementation prototype Management plan risks list ROI! Outcomes of each phase:! inception! stakeholders agree on scope Elaboration determine ability to build the product use cases domain model mockup UI architecture baseline subsystems classes code classes unit tests test plans integration tests system tests plan risks list defect tracking version control! candidate architecture handles key requirements! strong business case justifies continued development Construction build product that works successfully for customer Transition deliver functional product to customer use cases use cases architecture architecture code classes unit tests user documents integration tests system tests beta tests acceptance tests defect tracking version control defect tracking version control 3! elaboration! use cases are qualified, prioritized, and detailed! architecture serves as foundation for construction! project plan describes how construction will proceed 4

7 Unified Process! Outcomes of each phase:! construction! use cases are updated! architecture model is updated! running, functional, tested prototype! transition! fully working, deployed system! user documents (external deliverable)! use cases and architecture (internal deliverable) Unified Process! Model-driven:! domain model! use case model! realized by analysis model! specified by design model! distributed by deployment model! implemented by implementation model! verified by test model architecture 5 6 Unified Process UML Package DecisionSubsystem Model domain UML domain-level class diagram Criterion assesses Alternative use case use case diagram; use case package analysis stereotyped class diagram; analysis package design class, sequence, state, activity diagrams; design package Problem solvableby based-on deployment implementation deployment diagram; deployment package component diagram SubTask resolvedby Decision 7 ActionItem Task subtasks implementedby 8

8 UML Packages UML Deployment Diagram Compiler mymac:mac :UnixHost SyntacticAnalyzer SemanticAnalyzer Optimizer :Netscape :WebServer LexicalAnalyzer CodeGenerator Repository ParseTree SymbolTable apc:pc :IExplorer :UnixHost :Database SourceLevelDebugger SyntacticEditor 9 software components and hardware nodes 30 UML Component Agile Methods WebServer HttpRequest URL DBQuery GET POST Valued More individuals and interactions working software Valued Less processes and tools documentation File DBResult customer collaboration responding to change contract negotiation following a plan 31 3

9 Agile Methods! Principles:! individuals and interactions! trust motivated individuals! face-to-face conversation! best work emerges from self-organizing teams! team reflects on and adjusts their behavior! promote constant, sustainable pace! working software! working software as the main measure of progress Agile Methods! Principles:! customer collaboration! satisfy customer early! customers and developers work together! responding to change! welcome changing requirements, even late! technical excellence and good design! simplicity art of maximizing work not done! continuous, frequent delivery of value extreme Programming (XP) extreme Programming (XP)! Practices for programmer welfare:! 40-hour week! work no more than 40 hours a week; never work overtime a second week in a row your experiences? 35! Practices for feedback:! planning game! determine scope of next release by combining business priorities and technical estimates! testing! write automated unit tests (first); customers write tests to show that features are finished! pair programming! have all production code written with two programmers at one machine! on-site customer! include real, live user on the team, full-time to answer questions 36

10 extreme Programming (XP) extreme Programming (XP)! Practices for continuity:! small releases! put simple system into production quickly, then release new versions on a very short cycle! refactoring! restructure the system to improve its design, simplicity, or flexibility! continuous integration! integrate and build the system many times a day, every time a task is done 37! Practices for shared understanding:! metaphor! guide development with a shared story of how the system works! simple design! design the system as simply as possible; remove extra complexity when discovered! collective ownership! anyone can change any code anywhere in the system at any time! coding standards! write all code according to rules that enhance communication and understanding through code 38 extreme Programming (XP) extreme Programming! Process practices:! ~15 min standup meeting starts each day! move people around! write user stories! use burndown chart! Original XP project:! at Daimler Chrysler, it took 1 15 people years to write and deploy a system that a team of 30 had failed to deliver in the prior 4 years! Discussion:! what s the controversy? [extremeprogramming.org] 39 40

11 extreme Programming (XP) Unified versus Agile (XP)! Controversies:! Discussion:! all or nothing! What is common?! are subsets still effective?! scalability! What is different?! teams of more than 0 members?! reworking! both require discipline! no real upfront design?! pair programming! effective? personality conflicts? ergonomics?! customer on-site! possible? 41 4 Unified versus Agile (XP) Agile Methods Communication Unified Process UML / use cases top-down from models / architecture centric Extreme Programming face-to-face / user stories / code bottom-up from code / metaphor / trials! New product development game:! environment of tight competition! e.g., Japanese manufacturing (Fuji, Toyota) Nonaka and Takeuchi, 1986 Iteration cycles of phases / iterations in each phase series of releases / iterations in each release! assemble resources for cross-functional team Project/Team Size suited for large projects suited for small projects! best people in research, engineering, finance, support, sales, marketing, inventory, etc. 43! tell team to create the next great thing! must be a tangible product, not a proposal! counting on team to finish in a few months! not interrupted with reporting 44

12 Agile Methods! Scrum:! series of sprints, homing in on project goal! each sprint is time-boxed, to 4 weeks long! work within each sprint is fixed! each task in a sprint takes 1 to 16 hours! each sprint ends in running, shippable version! each is professionally done done! stopping early still produces a high-value product Agile Methods! Scrum:! product backlog! all work to be done (requirements, defect fixes)! reducing work in progress! focus and bring work to closure, rather than starting new work and maximizing parallelism! slowing down to go fast! make estimates from actual completed work Agile Methods Agile Methods! Scrum:! Scrum master role! leader facilitates creativity and team involvement! focuses on what to do, and planning, not how! make quality compromises explicit! between between upper managers and engineers! teaches customer how to drive the team 47! Lots of variations:! Dynamic System Development Method! Faulkner et al.! Adaptive Software Development! Highsmith! Crystal Clear! Cockburn! Lean Software Development! Poppendieck! Agile Unified Process! Ambler 48

13 Agile Benefits References! Shine survey (131 respondents):! productivity was better or much better! 93%! costs were reduced or much reduced! 49%! costs unchanged! 46%! quality was better or much better! 88%! bus. satisfaction was better or much better! 83% 49! Object-Oriented Software Engineering! B. Bruegge & A. Dutoit! Prentice-Hall, 000! Software Development for Small Teams! G. Pollice et al.! Addison-Wesley, References! The Unified Process Explained! K. Scott! Addison-Wesley, 00 References! Scaling Software Agility! D. Leffingwell! Addison-Wesley, 007! Extreme Programmming Explained! K. Beck! Addison-Wesley, 000! Pair Programming Illuminated! L. Williams and R. Kessler! Addison-Wesley,