SlideShare a Scribd company logo
ITS 66404
Principles of Software
Engineering
Nur Haifa
Chapter 4- Agile
Software
Development
Agenda
Plan Driven & Agile
Agile Methods & Principles
Agile Developmental Techniques
Extreme Programming (XP)
Class diagram
Chapter 1 – Intro to Software Engineering 2
Rapid software development
+ Rapid development and delivery is now often the
most important requirement for software systems
Businesses operate in a fast –changing requirement and it is
practically impossible to produce a set of stable software
requirements
Software has to evolve quickly to reflect changing business needs.
+ Plan-driven development is essential for some types
of system but does not meet these business needs.
+ Agile development methods emerged in the late
1990s whose aim was to radically reduce the delivery
time for working software systems
Chapter 4 Agile Software Development 3
Agile development
+ Program specification, design and implementation are inter-leaved
+ The system is developed as a series of versions or increments with
stakeholders involved in version specification and evaluation
+ Frequent delivery of new versions for evaluation
+ Extensive tool support (e.g. automated testing tools) used to support
development.
+ Minimal documentation – focus on working code
Chapter 4 Agile Software Development 4
Plan-driven and agile development
Chapter 4 Agile Software Development 5
Plan-driven and agile development
+ Plan-driven development
A plan-driven approach to software engineering is based around separate development
stages with the outputs to be produced at each of these stages planned in advance.
Not necessarily waterfall model – plan-driven, incremental development is possible
Iteration occurs within activities.
+ Agile development
Specification, design, implementation and testing are inter-leaved and the outputs from
the development process are decided through a process of negotiation during the
software development process.
Chapter 4 Agile Software Development 6
Agile methods
Chapter 4 Agile Software Development 7
Agile methods
+ Dissatisfaction with the overheads involved in software design methods of
the 1980s and 1990s led to the creation of agile methods. These methods:
Focus on the code rather than the design
Are based on an iterative approach to software development
Are intended to deliver working software quickly and evolve this quickly to meet changing
requirements.
+ The aim of agile methods is to reduce overheads in the software process
(e.g. by limiting documentation) and to be able to respond quickly to
changing requirements without excessive rework.
Chapter 4 Agile Software Development 8
Agile manifesto
+ We are uncovering better ways of developing software by
doing it and helping others do it. Through this work we have
come to value:
Individuals and interactions over processes and tools
Working software over comprehensive documentation
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.
Chapter 4 Agile Software Development 9
The principles of agile methods
Chapter 4 Agile Software Development 10
Principle Description
Customer involvement Customers should be closely involved throughout the
development process. Their role is provide and prioritize new
system requirements and to evaluate the iterations of the
system.
Incremental delivery The software is developed in increments with the customer
specifying the requirements to be included in each increment.
People not process The skills of the development team should be recognized and
exploited. Team members should be left to develop their own
ways of working without prescriptive processes.
Embrace change Expect the system requirements to change and so design the
system to accommodate these changes.
Maintain simplicity Focus on simplicity in both the software being developed and
in the development process. Wherever possible, actively work
to eliminate complexity from the system.
Agile method applicability
+ Product development where a software company is developing
a small or medium-sized product for sale.
Virtually all software products and apps are now developed using an agile
approach
+ Custom system development within an organization, where
there is a clear commitment from the customer to become
involved in the development process and where there are few
external rules and regulations that affect the software.
Chapter 4 Agile Software Development 11
Agile development techniques
Chapter 4 Agile Software Development 12
Extreme programming
+ A very influential agile method, developed in the late
1990s, that introduced a range of agile development
techniques.
+ Extreme Programming (XP) takes an ‘extreme’ approach
to iterative development.
New versions may be built several times per day;
Increments are delivered to customers every 2 weeks;
All tests must be run for every build and the build is only accepted if tests run
successfully.
Chapter 4 Agile Software Development 13
The extreme programming release
cycle
Chapter 4 Agile Software Development 14
Extreme programming practices (a)
Chapter 4 Agile Software Development 15
Principle or practice Description
Incremental planning Requirements are recorded on story cards and the stories to be
included in a release are determined by the time available and
their relative priority. The developers break these stories into
development ‘Tasks’.
Small releases The minimal useful set of functionality that provides business
value is developed first. Releases of the system are frequent
and incrementally add functionality to the first release.
Simple design Enough design is carried out to meet the current requirements
and no more.
Test-first development An automated unit test framework is used to write tests for a
new piece of functionality before that functionality itself is
implemented.
Refactoring All developers are expected to refactor the code continuously as
soon as possible code improvements are found. This keeps the
code simple and maintainable.
Extreme programming practices (b)
Chapter 4 Agile Software Development 16
Pair programming Developers work in pairs, checking each other’s work and
providing the support to always do a good job.
Collective ownership The pairs of developers work on all areas of the system, so that
no islands of expertise develop and all the developers take
responsibility for all of the code. Anyone can change anything.
Continuous integration As soon as the work on a task is complete, it is integrated into
the whole system. After any such integration, all the unit tests in
the system must pass.
Sustainable pace Large amounts of overtime are not considered acceptable as
the net effect is often to reduce code quality and medium term
productivity
On-site customer A representative of the end-user of the system (the customer)
should be available full time for the use of the XP team. In an
extreme programming process, the customer is a member of
the development team and is responsible for bringing system
requirements to the team for implementation.
XP and agile principles
+ Incremental development is supported through small, frequent
system releases.
+ Customer involvement means full-time customer engagement with
the team.
+ People not process through pair programming, collective ownership
and a process that avoids long working hours.
+ Change supported through regular system releases.
+ Maintaining simplicity through constant refactoring of code.
Chapter 4 Agile Software Development 17
Influential XP practices
+ Extreme programming has a technical focus and is not easy to
integrate with management practice in most organizations.
+ Consequently, while agile development uses practices from XP,
the method as originally defined is not widely used.
+ Key practices
User stories for specification
Test-first development
Pair programming
Chapter 4 Agile Software Development 18
User stories for requirements
+ In XP, a customer or user is part of the XP team and is
responsible for making decisions on requirements.
+ User requirements are expressed as user stories or scenarios.
+ These are written on cards and the development team break
them down into implementation tasks. These tasks are the
basis of schedule and cost estimates.
+ The customer chooses the stories for inclusion in the next
release based on their priorities and the schedule estimates.
Chapter 4 Agile Software Development 19
A ‘prescribing medication’ story
Chapter 4 Agile Software Development 20
Examples of task cards for prescribing
medication
Chapter 4 Agile Software Development 21
Test-first development
+ Testing is central to XP and XP has developed an approach where
the program is tested after every change has been made.
+ XP testing features:
Test-first development.
Incremental test development from scenarios.
User involvement in test development and validation.
Automated test harnesses are used to run all component tests each time that a new
release is built.
Chapter 4 Agile Software Development 22
Test-driven development
+ Writing tests before code clarifies the requirements to be
implemented.
+ Tests are written as programs rather than data so that they can
be executed automatically. The test includes a check that it has
executed correctly.
Usually relies on a testing framework such as Junit.
+ All previous and new tests are run automatically when new
functionality is added, thus checking that the new functionality
has not introduced errors.
Chapter 4 Agile Software Development 23
Customer involvement
+ The role of the customer in the testing process is to help develop
acceptance tests for the stories that are to be implemented in the next
release of the system.
+ The customer who is part of the team writes tests as development proceeds.
All new code is therefore validated to ensure that it is what the customer
needs.
+ However, people adopting the customer role have limited time available and
so cannot work full-time with the development team. They may feel that
providing the requirements was enough of a contribution and so may be
reluctant to get involved in the testing process.
Chapter 4 Agile Software Development 24
Test case description for dose checking
Chapter 4 Agile Software Development 25
Test automation
+ Test automation means that tests are written as executable
components before the task is implemented
These testing components should be stand-alone, should simulate the submission of input to be
tested and should check that the result meets the output specification. An automated test
framework (e.g. JUnit) is a system that makes it easy to write executable tests and submit a set
of tests for execution.
https://www.simplilearn.com/tutorials/java-tutorial/what-is-
junit#:~:text=JUnit%20is%20a%20unit%20testing,in%20the%20code%20is%20broken.
+ As testing is automated, there is always a set of tests that can
be quickly and easily executed
Whenever any functionality is added to the system, the tests can be run and problems that the
new code has introduced can be caught immediately.
Chapter 4 Agile Software Development 26
Pair programming
+ Pair programming involves programmers working in pairs,
developing code together.
+ This helps develop common ownership of code and spreads
knowledge across the team.
+ It serves as an informal review process as each line of code is
looked at by more than 1 person.
Chapter 4 Agile Software Development 27
Pair programming
+ In pair programming, programmers sit together at the same computer to
develop the software.
+ Pairs are created dynamically so that all team members work with each
other during the development process.
+ The sharing of knowledge that happens during pair programming is very
important as it reduces the overall risks to a project when team members
leave.
+ Pair programming is not necessarily inefficient and there is some evidence
that suggests that a pair working together is more efficient than 2
programmers working separately.
Chapter 4 Agile Software Development 28
Agile maintenance
+ Key problems are:
Lack of product documentation
Keeping customers involved in the development process
Maintaining the continuity of the development team
+ Agile development relies on the development team
knowing and understanding what has to be done.
+ For long-lifetime systems, this is a real problem as the
original developers will not always work on the system.
Chapter 4 Agile Software Development 29
Class Diagram
Chapter 4 Agile Software Development 30
Illustrate a system’s structure in a detailed way.
CLASS
DIAGRAMS
Sample footer text 3/1/20XX
31
What is a Class?
+ A general template that we use to create
specific instances or objects in the
application domain
+ Represents a kind of person, place, or
thing about which the system will need to
capture and store information
+ Abstractions that specify the attributes and
behaviors of a set of objects
Class
Chapter 4 Agile Software Development 33
A description of a group of objects all
with similar roles in the system, which
consists of: attributes and operations
REMEMBER THIS ABOUT CLASS
Chapter 4 Agile Software Development 34
PERSON
PLACE
THING
student
Form
system admin
lecturer
Admin office
University
Computer
Timetable
coordinator
Lecture clsss
Types of Classes
+ Ones found during analysis:
people, places, events, and things about
which the system will capture information
ones found in application domain
+ Ones found during design
specific objects like windows and forms that
are used to build the system
Attributes in a Class
+ Properties of the class about which
we want to capture information
+ Represents a piece of information that
is relevant to the description of the
class within the application domain
Attributes in a Class
+ Only add attributes that are primitive or
atomic types
+ Derived attribute
attributes that are calculated or derived
from other attributes
denoted by placing slash (/) before name
Operations in a Class
+ Represents the actions or functions that a
class can perform
+ Describes the actions to which the
instances of the class will be capable of
responding
+ Can be classified as a constructor, query,
or update operation
UML Representation of Class
Class Name
(ie person, place or thing)
Attributes of Class
Operations/methods of Class
Example of a Class Diagram
Video Rental System
methods
class name
Video
+rentMovie()
Customer
-CID: int
-name: String
+authenticateCustomer ()
relationship
rents
1..*
1..*
multiplicity
visibility
attributes
-cassetteID : int
-cassetteVolumeNo: int
What Is a Class Diagram?
CloseRegistrationForm
+ open()
+ close registration()
Student
+ get tuition()
+ add schedule()
+ get schedule()
+ delete schedule()
+ has pre-requisites()
Schedule
- semester
+ commit()
+ select alternate()
+ remove offering()
+ level()
+ cancel()
+ get cost()
+ delete()
+ submit()
+ save()
+ any conflicts?()
+ create with offerings()
+ update with new selections()
Professor
- name
- employeeID : UniqueId
- hireDate
- status
- discipline
- maxLoad
+ submitFinalGrade()
+ acceptCourseOffering()
+ setMaxLoad()
+ takeSabbatical()
+ teachClass()
CloseRegistrationController
+ is registration open?()
+ close registration()
Class Diagram Usage
+ When modeling the static view of a system, class
diagrams are typically used in one of three ways, to model:
The vocabulary of a system
Collaborations
A logical database schema
Example: Class Diagram
+ Is there a better way to organize class diagrams?
CloseRegistrationForm
LoginForm
Professor
BillingSystem
CloseRegistrationController
RegisterForCoursesForm
Course
CourseCatalogSystem
Student
RegistrationController
CourseOffering
Schedule
What Is an Association?
+ The semantic relationship (logic relationship)
between two or more classifiers that specifies
connections among their instances.
+ A structural relationship specifying that objects
of one thing are connected to objects of
another thing.
Course
Student Schedule
Example: What Associations Can You
Find?
: CourseOffering
: RegistrationController
: Schedule
: Student
: PrimaryScheduleOfferingInfo
8: any conflicts?( )
: RegisterForCoursesForm
2: submit schedule( )
4: submit( )
3: save( )
7: still open?( )
9: add student(Schedule)
5: is selected?( )
10: mark as enrolled in( )
6: has pre-requisites(CourseOffering)
1: submit schedule( )
: Student
What Is Multiplicity?
+ Multiplicity is the number of instances one class relates to ONE
instance of another class.
+ For each association, there are two multiplicity decisions to make,
one for each end of the association.
For each instance of Professor, many Course Offerings may be
taught.
For each instance of Course Offering, there may be either one or
zero Professor as the instructor.
Professor CourseOffering
0..1 0..*
0..1 0..*
instructor
Multiplicity Indicators
1
2..4
0..1
1..*
0..*
1
*
2, 4..6
Unspecified
Exactly One
Zero or More
Zero or One (optional value)
One or More
Specified Range
Multiple, Disjoint Ranges
Example: Multiplicity
RegisterForCoursesForm
CourseOffering
Schedule
0..4
0..*
Student
0..*
1
RegistrationController
1
1
1
1
0..1
0..1
0..1
49
Class diagrams - Multiplicity
+ When you examine an object diagram (or the underlying problem you are modeling) you can determine how many
objects are involved in each type of associations.
+ We include this information which is known as Cardinality or Multiplicity on a class diagram.
+ These document the constraints on the associations that we expect a program to enforce.
+ Cardinality is:
* - 0 .. infinity
2..4 - a restricted range
1, 3..4, 6..* - comma separated lists
<empty> - implies 1, i.e. a mandatory connection, but it’s better
to explicitly specify a 1. For all assessment, all
multiplicities must be explicitly specified
and not left as empty.
50
Class diagrams - Multiplicity
+ Consider the following order form that may be collected
during requirements.
+ It shows an order system for a business/customers
each order consists of several lines e.g.
51
Class diagrams - Multiplicity
+ The multiplicity constraints state that…
every OrderLine object must be associated with an Order
every Order must be associated with at least one, but potentially infinite
OrderLines.
52
Class diagrams - Multiplicity
+ To identify the multiplicity, you can examine an object
diagram.
53
Class diagrams - Self association
+ Self associations is when a class has an association with
itself
Associations with other objects of the same class
+ A Parent/Child self association on class Person
Associations between one object and itself.
+ A Doctor/Patient association, where a doctor treats herself.
54
Class diagrams - Self association
+ An object diagram shows the difficulty of trying to enforce mandatory self
associations.
+ The Parent cardinality should be 0..2 to reflect that fact that a person’s parents
may not be known.
55
Generalisation/Specialisation/Inheritance
+ Represents a particular ordering/taxonomy
How do you classify trees?
+ Softwood/Hardwood?
+ Deciduous/Evergreen?
Neither classification is correct or incorrect. How you
classify depends on the problem being solved.
We use generalisation to highlight common features in two
or more classes.
Common features could be
+ Attributes
+ Behaviour (more common reason for generalisation)
56
Generalisation/Specialisation/Inheritance
+ The parent class contains features common to all
subclasses
These include attributes, methods, associations
Class Attributes Methods
A a, b X, Y
B a, b, d X, Y, W
C a, b, e, f X, Y, Z
57
Class diagrams - Self association
+ A class can have an association with itself…
Self associations have subtle semantics.
The example above requires that we always record two parents for every
person in our system.
At some point we will not know someone’s parent.
58
Generalisation
+ Inheritance also extends to associations.
+ If a parent class can take part in an association, then child
classes can also take part in the same associations.
+ The object diagrams (below right) are valid.
59
Conventions for class diagrams
+ Class-Name: Each class is unique within a system.
+ Attributes: A data value held by objects in a class. Each attribute has
a value for each object instance.
+ Operations and Methods: An operation is a function or transformation
that may be applied to or by objects in the class. All objects in the
class share the same operations. A method is the implementation of
an operation for the class.
THE END
Question?
Components of Software Engineering
61
A framework for
the tasks required
to build high-
quality software.
An agreed, common
language used to
communicate all
aspects of the system,
from requirements to
final design.
Tools to make
working through the
process less difficult
for all involved
The actual software
product or system
built and put into
operation
Tools
Visual
Paradigm
Eclipse
Poseidon
Process
RUP
XP
Notation
UML
Product
eCommerc
e System
Mobile
App

More Related Content

PPTX
Agile-Software-Development in SAP ERP.pptx
PDF
Lecture 3 se
PPTX
Agile - Software - Development Powerpoint
PPT
Agiel sw development
PDF
ch2-Agile-Software-Development-engineerning.pdf
PPTX
Upstate CSCI 540 Agile Development
PPT
Chapter 3 - Agile Software Development.ppt
PPTX
Agile is a flexible and iterative approach to software development that empha...
Agile-Software-Development in SAP ERP.pptx
Lecture 3 se
Agile - Software - Development Powerpoint
Agiel sw development
ch2-Agile-Software-Development-engineerning.pdf
Upstate CSCI 540 Agile Development
Chapter 3 - Agile Software Development.ppt
Agile is a flexible and iterative approach to software development that empha...

Similar to SE-Lecture 4 - Agile Software Development.pptx (20)

PPTX
Agile is a flexible and iterative approach to software development that empha...
PPTX
Agile Software development 2SE2013_04.pptx
PPTX
Ch3-Software Engineering 9
PPTX
Agile software process
PPT
Introduction to Software engineeringSE chp_04.ppt
PPT
Introduction to principles of software engineering chp_04.ppt
PPT
Process importance with full detail about
PPTX
03 - Agile Software Development.pptx
PPT
Agile Software Development in Bachelor of Computer Applications.ppt
PPTX
Lecture - 20-23.pptx
PPTX
Ch3 - Agile SW Dev
PPTX
LU 3 Agile SW Dev.pptx
PDF
ch3-150102101842-conversion-gate02.pdf
PPTX
Ch3. agile sw dev
PPTX
03. Agile Development
PDF
Chapter 3 - Agile Software Development.pdf
PPT
331103344.ppt
PPTX
Agile Method - Lec 1-2-3
PPTX
Xp(Xtreme Programming) presentation
Agile is a flexible and iterative approach to software development that empha...
Agile Software development 2SE2013_04.pptx
Ch3-Software Engineering 9
Agile software process
Introduction to Software engineeringSE chp_04.ppt
Introduction to principles of software engineering chp_04.ppt
Process importance with full detail about
03 - Agile Software Development.pptx
Agile Software Development in Bachelor of Computer Applications.ppt
Lecture - 20-23.pptx
Ch3 - Agile SW Dev
LU 3 Agile SW Dev.pptx
ch3-150102101842-conversion-gate02.pdf
Ch3. agile sw dev
03. Agile Development
Chapter 3 - Agile Software Development.pdf
331103344.ppt
Agile Method - Lec 1-2-3
Xp(Xtreme Programming) presentation
Ad

More from TangZhiSiang (12)

PPTX
SE - Lecture 13 - Software Evolution and Tech Trends.pptx
PPTX
SE - Lecture 12 - Software Project Management (1).pptx
PPTX
SE - Lecture 11 - Software Project Estimation.pptx
PPTX
SE - Lecture 9 n 10 Intro Robotic Process Automation.pptx
PPTX
SE - Lecture 8 - Software Testing State Diagram.pptx
PPTX
SE - Lecture 7 - Software Quality Reliability Mgmt - in lecture.pptx
PPTX
SE - Lecture 6 - Software Design n Construction.pptx
PPTX
SE - Lecture 5 - Requirements Engineering.pptx
PPTX
SE - Lecture 3 - Software Tools n Environment.pptx
PPTX
SE-Lecture 2A-Requirements.pptx
PPTX
SE - Lecture 2 - SW Devl Process.pptx
PPTX
SE - Lecture 1 - Introduction to S Engineering.pptx
SE - Lecture 13 - Software Evolution and Tech Trends.pptx
SE - Lecture 12 - Software Project Management (1).pptx
SE - Lecture 11 - Software Project Estimation.pptx
SE - Lecture 9 n 10 Intro Robotic Process Automation.pptx
SE - Lecture 8 - Software Testing State Diagram.pptx
SE - Lecture 7 - Software Quality Reliability Mgmt - in lecture.pptx
SE - Lecture 6 - Software Design n Construction.pptx
SE - Lecture 5 - Requirements Engineering.pptx
SE - Lecture 3 - Software Tools n Environment.pptx
SE-Lecture 2A-Requirements.pptx
SE - Lecture 2 - SW Devl Process.pptx
SE - Lecture 1 - Introduction to S Engineering.pptx
Ad

Recently uploaded (20)

PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Institutional Correction lecture only . . .
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Classroom Observation Tools for Teachers
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Pharma ospi slides which help in ospi learning
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
TR - Agricultural Crops Production NC III.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
O7-L3 Supply Chain Operations - ICLT Program
Week 4 Term 3 Study Techniques revisited.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPH.pptx obstetrics and gynecology in nursing
VCE English Exam - Section C Student Revision Booklet
O5-L3 Freight Transport Ops (International) V1.pdf
01-Introduction-to-Information-Management.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Institutional Correction lecture only . . .
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Classroom Observation Tools for Teachers
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student

SE-Lecture 4 - Agile Software Development.pptx

  • 1. ITS 66404 Principles of Software Engineering Nur Haifa Chapter 4- Agile Software Development
  • 2. Agenda Plan Driven & Agile Agile Methods & Principles Agile Developmental Techniques Extreme Programming (XP) Class diagram Chapter 1 – Intro to Software Engineering 2
  • 3. Rapid software development + Rapid development and delivery is now often the most important requirement for software systems Businesses operate in a fast –changing requirement and it is practically impossible to produce a set of stable software requirements Software has to evolve quickly to reflect changing business needs. + Plan-driven development is essential for some types of system but does not meet these business needs. + Agile development methods emerged in the late 1990s whose aim was to radically reduce the delivery time for working software systems Chapter 4 Agile Software Development 3
  • 4. Agile development + Program specification, design and implementation are inter-leaved + The system is developed as a series of versions or increments with stakeholders involved in version specification and evaluation + Frequent delivery of new versions for evaluation + Extensive tool support (e.g. automated testing tools) used to support development. + Minimal documentation – focus on working code Chapter 4 Agile Software Development 4
  • 5. Plan-driven and agile development Chapter 4 Agile Software Development 5
  • 6. Plan-driven and agile development + Plan-driven development A plan-driven approach to software engineering is based around separate development stages with the outputs to be produced at each of these stages planned in advance. Not necessarily waterfall model – plan-driven, incremental development is possible Iteration occurs within activities. + Agile development Specification, design, implementation and testing are inter-leaved and the outputs from the development process are decided through a process of negotiation during the software development process. Chapter 4 Agile Software Development 6
  • 7. Agile methods Chapter 4 Agile Software Development 7
  • 8. Agile methods + Dissatisfaction with the overheads involved in software design methods of the 1980s and 1990s led to the creation of agile methods. These methods: Focus on the code rather than the design Are based on an iterative approach to software development Are intended to deliver working software quickly and evolve this quickly to meet changing requirements. + The aim of agile methods is to reduce overheads in the software process (e.g. by limiting documentation) and to be able to respond quickly to changing requirements without excessive rework. Chapter 4 Agile Software Development 8
  • 9. Agile manifesto + We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation 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. Chapter 4 Agile Software Development 9
  • 10. The principles of agile methods Chapter 4 Agile Software Development 10 Principle Description Customer involvement Customers should be closely involved throughout the development process. Their role is provide and prioritize new system requirements and to evaluate the iterations of the system. Incremental delivery The software is developed in increments with the customer specifying the requirements to be included in each increment. People not process The skills of the development team should be recognized and exploited. Team members should be left to develop their own ways of working without prescriptive processes. Embrace change Expect the system requirements to change and so design the system to accommodate these changes. Maintain simplicity Focus on simplicity in both the software being developed and in the development process. Wherever possible, actively work to eliminate complexity from the system.
  • 11. Agile method applicability + Product development where a software company is developing a small or medium-sized product for sale. Virtually all software products and apps are now developed using an agile approach + Custom system development within an organization, where there is a clear commitment from the customer to become involved in the development process and where there are few external rules and regulations that affect the software. Chapter 4 Agile Software Development 11
  • 12. Agile development techniques Chapter 4 Agile Software Development 12
  • 13. Extreme programming + A very influential agile method, developed in the late 1990s, that introduced a range of agile development techniques. + Extreme Programming (XP) takes an ‘extreme’ approach to iterative development. New versions may be built several times per day; Increments are delivered to customers every 2 weeks; All tests must be run for every build and the build is only accepted if tests run successfully. Chapter 4 Agile Software Development 13
  • 14. The extreme programming release cycle Chapter 4 Agile Software Development 14
  • 15. Extreme programming practices (a) Chapter 4 Agile Software Development 15 Principle or practice Description Incremental planning Requirements are recorded on story cards and the stories to be included in a release are determined by the time available and their relative priority. The developers break these stories into development ‘Tasks’. Small releases The minimal useful set of functionality that provides business value is developed first. Releases of the system are frequent and incrementally add functionality to the first release. Simple design Enough design is carried out to meet the current requirements and no more. Test-first development An automated unit test framework is used to write tests for a new piece of functionality before that functionality itself is implemented. Refactoring All developers are expected to refactor the code continuously as soon as possible code improvements are found. This keeps the code simple and maintainable.
  • 16. Extreme programming practices (b) Chapter 4 Agile Software Development 16 Pair programming Developers work in pairs, checking each other’s work and providing the support to always do a good job. Collective ownership The pairs of developers work on all areas of the system, so that no islands of expertise develop and all the developers take responsibility for all of the code. Anyone can change anything. Continuous integration As soon as the work on a task is complete, it is integrated into the whole system. After any such integration, all the unit tests in the system must pass. Sustainable pace Large amounts of overtime are not considered acceptable as the net effect is often to reduce code quality and medium term productivity On-site customer A representative of the end-user of the system (the customer) should be available full time for the use of the XP team. In an extreme programming process, the customer is a member of the development team and is responsible for bringing system requirements to the team for implementation.
  • 17. XP and agile principles + Incremental development is supported through small, frequent system releases. + Customer involvement means full-time customer engagement with the team. + People not process through pair programming, collective ownership and a process that avoids long working hours. + Change supported through regular system releases. + Maintaining simplicity through constant refactoring of code. Chapter 4 Agile Software Development 17
  • 18. Influential XP practices + Extreme programming has a technical focus and is not easy to integrate with management practice in most organizations. + Consequently, while agile development uses practices from XP, the method as originally defined is not widely used. + Key practices User stories for specification Test-first development Pair programming Chapter 4 Agile Software Development 18
  • 19. User stories for requirements + In XP, a customer or user is part of the XP team and is responsible for making decisions on requirements. + User requirements are expressed as user stories or scenarios. + These are written on cards and the development team break them down into implementation tasks. These tasks are the basis of schedule and cost estimates. + The customer chooses the stories for inclusion in the next release based on their priorities and the schedule estimates. Chapter 4 Agile Software Development 19
  • 20. A ‘prescribing medication’ story Chapter 4 Agile Software Development 20
  • 21. Examples of task cards for prescribing medication Chapter 4 Agile Software Development 21
  • 22. Test-first development + Testing is central to XP and XP has developed an approach where the program is tested after every change has been made. + XP testing features: Test-first development. Incremental test development from scenarios. User involvement in test development and validation. Automated test harnesses are used to run all component tests each time that a new release is built. Chapter 4 Agile Software Development 22
  • 23. Test-driven development + Writing tests before code clarifies the requirements to be implemented. + Tests are written as programs rather than data so that they can be executed automatically. The test includes a check that it has executed correctly. Usually relies on a testing framework such as Junit. + All previous and new tests are run automatically when new functionality is added, thus checking that the new functionality has not introduced errors. Chapter 4 Agile Software Development 23
  • 24. Customer involvement + The role of the customer in the testing process is to help develop acceptance tests for the stories that are to be implemented in the next release of the system. + The customer who is part of the team writes tests as development proceeds. All new code is therefore validated to ensure that it is what the customer needs. + However, people adopting the customer role have limited time available and so cannot work full-time with the development team. They may feel that providing the requirements was enough of a contribution and so may be reluctant to get involved in the testing process. Chapter 4 Agile Software Development 24
  • 25. Test case description for dose checking Chapter 4 Agile Software Development 25
  • 26. Test automation + Test automation means that tests are written as executable components before the task is implemented These testing components should be stand-alone, should simulate the submission of input to be tested and should check that the result meets the output specification. An automated test framework (e.g. JUnit) is a system that makes it easy to write executable tests and submit a set of tests for execution. https://www.simplilearn.com/tutorials/java-tutorial/what-is- junit#:~:text=JUnit%20is%20a%20unit%20testing,in%20the%20code%20is%20broken. + As testing is automated, there is always a set of tests that can be quickly and easily executed Whenever any functionality is added to the system, the tests can be run and problems that the new code has introduced can be caught immediately. Chapter 4 Agile Software Development 26
  • 27. Pair programming + Pair programming involves programmers working in pairs, developing code together. + This helps develop common ownership of code and spreads knowledge across the team. + It serves as an informal review process as each line of code is looked at by more than 1 person. Chapter 4 Agile Software Development 27
  • 28. Pair programming + In pair programming, programmers sit together at the same computer to develop the software. + Pairs are created dynamically so that all team members work with each other during the development process. + The sharing of knowledge that happens during pair programming is very important as it reduces the overall risks to a project when team members leave. + Pair programming is not necessarily inefficient and there is some evidence that suggests that a pair working together is more efficient than 2 programmers working separately. Chapter 4 Agile Software Development 28
  • 29. Agile maintenance + Key problems are: Lack of product documentation Keeping customers involved in the development process Maintaining the continuity of the development team + Agile development relies on the development team knowing and understanding what has to be done. + For long-lifetime systems, this is a real problem as the original developers will not always work on the system. Chapter 4 Agile Software Development 29
  • 30. Class Diagram Chapter 4 Agile Software Development 30 Illustrate a system’s structure in a detailed way.
  • 32. What is a Class? + A general template that we use to create specific instances or objects in the application domain + Represents a kind of person, place, or thing about which the system will need to capture and store information + Abstractions that specify the attributes and behaviors of a set of objects
  • 33. Class Chapter 4 Agile Software Development 33 A description of a group of objects all with similar roles in the system, which consists of: attributes and operations
  • 34. REMEMBER THIS ABOUT CLASS Chapter 4 Agile Software Development 34 PERSON PLACE THING student Form system admin lecturer Admin office University Computer Timetable coordinator Lecture clsss
  • 35. Types of Classes + Ones found during analysis: people, places, events, and things about which the system will capture information ones found in application domain + Ones found during design specific objects like windows and forms that are used to build the system
  • 36. Attributes in a Class + Properties of the class about which we want to capture information + Represents a piece of information that is relevant to the description of the class within the application domain
  • 37. Attributes in a Class + Only add attributes that are primitive or atomic types + Derived attribute attributes that are calculated or derived from other attributes denoted by placing slash (/) before name
  • 38. Operations in a Class + Represents the actions or functions that a class can perform + Describes the actions to which the instances of the class will be capable of responding + Can be classified as a constructor, query, or update operation
  • 39. UML Representation of Class Class Name (ie person, place or thing) Attributes of Class Operations/methods of Class
  • 40. Example of a Class Diagram Video Rental System methods class name Video +rentMovie() Customer -CID: int -name: String +authenticateCustomer () relationship rents 1..* 1..* multiplicity visibility attributes -cassetteID : int -cassetteVolumeNo: int
  • 41. What Is a Class Diagram? CloseRegistrationForm + open() + close registration() Student + get tuition() + add schedule() + get schedule() + delete schedule() + has pre-requisites() Schedule - semester + commit() + select alternate() + remove offering() + level() + cancel() + get cost() + delete() + submit() + save() + any conflicts?() + create with offerings() + update with new selections() Professor - name - employeeID : UniqueId - hireDate - status - discipline - maxLoad + submitFinalGrade() + acceptCourseOffering() + setMaxLoad() + takeSabbatical() + teachClass() CloseRegistrationController + is registration open?() + close registration()
  • 42. Class Diagram Usage + When modeling the static view of a system, class diagrams are typically used in one of three ways, to model: The vocabulary of a system Collaborations A logical database schema
  • 43. Example: Class Diagram + Is there a better way to organize class diagrams? CloseRegistrationForm LoginForm Professor BillingSystem CloseRegistrationController RegisterForCoursesForm Course CourseCatalogSystem Student RegistrationController CourseOffering Schedule
  • 44. What Is an Association? + The semantic relationship (logic relationship) between two or more classifiers that specifies connections among their instances. + A structural relationship specifying that objects of one thing are connected to objects of another thing. Course Student Schedule
  • 45. Example: What Associations Can You Find? : CourseOffering : RegistrationController : Schedule : Student : PrimaryScheduleOfferingInfo 8: any conflicts?( ) : RegisterForCoursesForm 2: submit schedule( ) 4: submit( ) 3: save( ) 7: still open?( ) 9: add student(Schedule) 5: is selected?( ) 10: mark as enrolled in( ) 6: has pre-requisites(CourseOffering) 1: submit schedule( ) : Student
  • 46. What Is Multiplicity? + Multiplicity is the number of instances one class relates to ONE instance of another class. + For each association, there are two multiplicity decisions to make, one for each end of the association. For each instance of Professor, many Course Offerings may be taught. For each instance of Course Offering, there may be either one or zero Professor as the instructor. Professor CourseOffering 0..1 0..* 0..1 0..* instructor
  • 47. Multiplicity Indicators 1 2..4 0..1 1..* 0..* 1 * 2, 4..6 Unspecified Exactly One Zero or More Zero or One (optional value) One or More Specified Range Multiple, Disjoint Ranges
  • 49. 49 Class diagrams - Multiplicity + When you examine an object diagram (or the underlying problem you are modeling) you can determine how many objects are involved in each type of associations. + We include this information which is known as Cardinality or Multiplicity on a class diagram. + These document the constraints on the associations that we expect a program to enforce. + Cardinality is: * - 0 .. infinity 2..4 - a restricted range 1, 3..4, 6..* - comma separated lists <empty> - implies 1, i.e. a mandatory connection, but it’s better to explicitly specify a 1. For all assessment, all multiplicities must be explicitly specified and not left as empty.
  • 50. 50 Class diagrams - Multiplicity + Consider the following order form that may be collected during requirements. + It shows an order system for a business/customers each order consists of several lines e.g.
  • 51. 51 Class diagrams - Multiplicity + The multiplicity constraints state that… every OrderLine object must be associated with an Order every Order must be associated with at least one, but potentially infinite OrderLines.
  • 52. 52 Class diagrams - Multiplicity + To identify the multiplicity, you can examine an object diagram.
  • 53. 53 Class diagrams - Self association + Self associations is when a class has an association with itself Associations with other objects of the same class + A Parent/Child self association on class Person Associations between one object and itself. + A Doctor/Patient association, where a doctor treats herself.
  • 54. 54 Class diagrams - Self association + An object diagram shows the difficulty of trying to enforce mandatory self associations. + The Parent cardinality should be 0..2 to reflect that fact that a person’s parents may not be known.
  • 55. 55 Generalisation/Specialisation/Inheritance + Represents a particular ordering/taxonomy How do you classify trees? + Softwood/Hardwood? + Deciduous/Evergreen? Neither classification is correct or incorrect. How you classify depends on the problem being solved. We use generalisation to highlight common features in two or more classes. Common features could be + Attributes + Behaviour (more common reason for generalisation)
  • 56. 56 Generalisation/Specialisation/Inheritance + The parent class contains features common to all subclasses These include attributes, methods, associations Class Attributes Methods A a, b X, Y B a, b, d X, Y, W C a, b, e, f X, Y, Z
  • 57. 57 Class diagrams - Self association + A class can have an association with itself… Self associations have subtle semantics. The example above requires that we always record two parents for every person in our system. At some point we will not know someone’s parent.
  • 58. 58 Generalisation + Inheritance also extends to associations. + If a parent class can take part in an association, then child classes can also take part in the same associations. + The object diagrams (below right) are valid.
  • 59. 59 Conventions for class diagrams + Class-Name: Each class is unique within a system. + Attributes: A data value held by objects in a class. Each attribute has a value for each object instance. + Operations and Methods: An operation is a function or transformation that may be applied to or by objects in the class. All objects in the class share the same operations. A method is the implementation of an operation for the class.
  • 61. Components of Software Engineering 61 A framework for the tasks required to build high- quality software. An agreed, common language used to communicate all aspects of the system, from requirements to final design. Tools to make working through the process less difficult for all involved The actual software product or system built and put into operation Tools Visual Paradigm Eclipse Poseidon Process RUP XP Notation UML Product eCommerc e System Mobile App