BTS 530 Major Project Planning and Design Iterative

BTS 530: Major Project Planning and Design Iterative Development References: n. Agile & Iterative Development, by Craig Larman, 2004, Addison Wesley. n. Applying UML and Patterns, 3 rd Edition, Chapter 21, Craig Larman n. Web sites as listed

Agenda Iterative development n Agile modeling n SCRUM n Extreme Programming n Refactoring n

Iterative Development Product development lifecycle is composed of several iterations in sequence, each delivering a “chunk” of functionality n Each iteration is a self-contained mini project: n Planning n Development (including testing) n Implementation n Review/Refactoring n

Iterative Development Initial Requirements, Vision + Feedback/Input from Iterations Iteration 1 Iteration 2 Iteration 3 Production System (grows with each iteration) … (Typically between 3 and 30 iterations in a system development project)

Iterative Development n Each Iteration n Plan n tasks, n time estimates, milestones Track/Control progress n adjust scope if required Develop n Implement n Review/Refactor n

Iterative Development n Planning Each Iteration n Risk driven n choose n Client driven n choose n riskiest, most difficult elements highest business value Ideally—a mixture of both

Iterative Development n Tracking/Controlling Timeframes for iterations are typically shorter than for traditionally run projects, necessitating more control n “Timeboxing” Approach is common in iterative development methodologies using agile methods n n Iterations typically 1 to 6 weeks n Scope adjusted if necessary; not time, not quality

Iterative Development n Benefits over “Big Bang” approaches “Depth” vs “breadth” – issues through to implementation uncovered and addressed more quickly n Early results reveal and enable required changes—end product is more suitable n Early results enable more accurate estimates for the rest of the system n Momentum sustained…constant visible progress n Other? n

Agile Methods Iterative methods typically (but not always) employ agile methods n Agile methods defined and supported by http: //www. agilealliance. org/ n Agile methods start with the “Manifesto for Agile Software Development” http: //www. agilemanifesto. org n

Agile Methods n Principles n http: //www. agilemanifesto. org/principles. html

Agile Methods n Iterative development methodologies employing agile methods include: Scrum n Extreme Programming (XP) n

SCRUM: Intro An agile method for software development. n Projects progress via a series of iterations called sprints. n Each sprint iteration is approx. 2 -4 weeks long. n Ideally suited to projects with rapidly changing or “sudden” requirements. n Mountain Goat Software http: //www. mountaingoatsoftware. com/scrum

SCRUM: the players Key Stakeholder or user Ensures team productivity by removing roadblocks and protecting the team from the “outside” Scrum Team --5 -9 people --no traditional roles --All working together Mountain Goat Software http: //www. mountaingoatsoftware. com/scrum

SCRUM Product Backlog: a prioritized list of features containing every desired feature or change to the product. Prioritized by the product owner. Mountain Goat Software http: //www. mountaingoatsoftware. com/scrum

SCRUM A Sprint Planning Meeting is held at the start of each sprint. The product owner reprioritizes the product backlog and the scrum team decides what it can complete in the coming Sprint. The result is the Sprint Backlog a list of tasks to complete all work in the current sprint. Mountain Goat Software http: //www. mountaingoatsoftware. com/scrum

SCRUM The Scrum: a daily meeting for entire Scrum team: Scrum Master asks “What did you do yesterday? ”; “What will you do today? ”; “Are there any roadblocks? ” Mountain Goat Software http: //www. mountaingoatsoftware. com/scrum

SCRUM At the end of a sprint the team has a Sprint Review Meeting to demonstrate the result of the sprint: a Product Increment. Scrum Product Backlog Sprint Backlog 2 -4 Week Sprint Product Increment (working, highquality software) Mountain Goat Software http: //www. mountaingoatsoftware. com/scrum

XP: Intro A form of agile software development. n Promotes simplicity and agility n Managers, customers, developers are equal partners in the development team n http: //www. extremeprogramming. org

XP: Specifications User Stories are at the heart of XP n They are written by the customers, are each about 2 -3 sentences long and are similar to scenarios. n User stories drive acceptance tests n User stories are the “specs” n http: //www. extremeprogramming. org

XP: Iterations A Release Planning Meeting creates a release plan which details which user stories will go into a release (80 + or – 20 is the “norm”) n An Iteration Planning Meeting is held at the start of each Iteration in the release to decide what will go into that iteration n Each “time boxed” iteration is usually a constant length; typically 1 -3 weeks. n http: //www. extremeprogramming. org

XP: Meetings Daily Standup Meeting is used to communicate problems, solutions, and promote team focus n Everyone stands up in a circle to avoid long discussions n http: //www. extremeprogramming. org

XP: Coding done in pairs: Pair Programming n The customer is ALWAYS available n Coding Standards must be followed n Test Driven Development: The Unit Test is written first n Code is integrated at frequent (hours) intervals n No overtime n Code is Refactored frequently n http: //www. extremeprogramming. org

Refactoring: Intro Part of each iteration – review and refactor what is “smelly” n Simplify! n

Refactoring Structured, disciplined n Rewrite/restructure existing code without changing its external behaviour n Apply small transformation steps combined with re-executing test steps n

Refactoring n Why? remove duplicate code n improve clarity n shorten long methods n remove “hard coded” constraints n “smelly code” –consider refactoring n “code stench” – MUST refactor n

Refactoring n Code Stench n n n n duplicated code BIG GIANT METHOD BIG GIANT CLASS (lots of code) Class with MANY instance variables strikingly similar subclasses little or no use of interfaces in the design high coupling between many objects and so on…

Sample Refactorings Refactoring Description Extract Method transform long method into shorter one by farming out a portion to a helper method Extract Constant replace literal constant with constant variable Introduce Explaining Variable put the result of the expression into a temporary variable with a name that explains the purpose Replace Constructor Call With Factory Method For example—in Java, replace using the new operator and constructor call with invoking a helper method that creates the object (hiding the details)

Refactoring Examples: pg 391 -393, chapter 21, Larman text n Resources n n www. refactoring. com
- Slides: 28