Internet Software Internet Software DevelopmentDevelopment
Putting it all togetherPutting it all together
Paul J KrausePaul J Krause
Software LifecycleSoftware Lifecycle
Customer Requirements
Functional Requirements
Design
Implementation
Unit Test
System Test
Acceptance Test
Customer RequirementsCustomer Requirements
Customer Requirements
Functional Requirements
Design
Implementation
Unit Test
System Test
Acceptance Test
Why Requirements?Why Requirements?“The firms improving their development speed at the fastest rate actually spend more elapsed time and more effort in the customer requirements stage of the project …. These firms spend significantly less time in the testing and integration stage of development.…”
“The firms improving their development speed at the fastest rate actually spend more elapsed time and more effort in the customer requirements stage of the project …. These firms spend significantly less time in the testing and integration stage of development.…”
Blackburn, Scudder, et al, in Improving Speed and Productivity of Software Development: A Global Survey of Software Developers (1996)
0%
5%
10%
15%
20%
Schedule Effort
Faster FirmsSlower Firms
Resources spent on Customer Requirements:
Tom on ‘Requirement’Tom on ‘Requirement’ Requirement: Requirement: Concept *026 November 8, 2001 22:16Concept *026 November 8, 2001 22:16
A requirement is a stakeholder-desired Target or A requirement is a stakeholder-desired Target or Constraint.Constraint.
Notes: Notes: 1. The constraints can apply to an engineering process, a design or an 1. The constraints can apply to an engineering process, a design or an
operational system.operational system. 2. A requirement is an input to a defined level of design process. 2. A requirement is an input to a defined level of design process. 3. Requirements give information to the designer about the necessary nature 3. Requirements give information to the designer about the necessary nature
of their design. of their design. 4. Consequently the design, specification or implementation, can be judged 4. Consequently the design, specification or implementation, can be judged
{Spec QC, review, test or in operation} in terms of how well it satisfies those {Spec QC, review, test or in operation} in terms of how well it satisfies those requirements.requirements.
INTRO
Requirement Specification.Requirement Specification. Requirement Specification. Concept *508. November 8, 2001 1604Requirement Specification. Concept *508. November 8, 2001 1604
A requirement specification is the A requirement specification is the readable expression of a requirement readable expression of a requirement and any requirement background.and any requirement background.
Related Concepts: Related Concepts: requirement *026 the future state or constraintrequirement *026 the future state or constraint specification *137 the readable specification *137 the readable artifactartifact background *507 additional information about the requirementbackground *507 additional information about the requirement
Analysis of dangerous common Analysis of dangerous common requirements practices.requirements practices.
Mixing real requirements with ‘designs’Mixing real requirements with ‘designs’ Failing to quantify competitive qualitiesFailing to quantify competitive qualities Failing to derive implied requirements from designsFailing to derive implied requirements from designs Failing to set requirements at appropriate levelFailing to set requirements at appropriate level Failing to include source informationFailing to include source information Failing to include priority informationFailing to include priority information Failing to specify all critical stakeholders requirementsFailing to specify all critical stakeholders requirements Failing to distinguish between wishes and their profitFailing to distinguish between wishes and their profit Failing to consider all limited resources as requirementsFailing to consider all limited resources as requirements Failure to update requirements evolutionarilyFailure to update requirements evolutionarily Failure to consider time, location and conditions with requirementsFailure to consider time, location and conditions with requirements Failure to plan a time series of quality levelsFailure to plan a time series of quality levels
Stakeholders: requirements Stakeholders: requirements sourcessources
‘‘Stakeholders’ are:Stakeholders’ are: Any person, group or thing whichAny person, group or thing which
• Can determine our system’s degree of success or failureCan determine our system’s degree of success or failure• By having an “opinion” aboutBy having an “opinion” about
system performance characteristicssystem performance characteristics system lifecycle constraintssystem lifecycle constraints
Stakeholders determine requirements!Stakeholders determine requirements! Systems engineers determine which requirements the Systems engineers determine which requirements the
stakeholders needstakeholders need• Even if the stakeholders are not currently conscious of those Even if the stakeholders are not currently conscious of those
needs!needs!
Stakeholder: Concept *233 .Stakeholder: Concept *233 .
‘‘Stakeholders’ are: Stakeholders’ are:
Any person, group or thing Any person, group or thing
that can determine our systems degree of success or that can determine our systems degree of success or failure, failure,
by having an opinion aboutby having an opinion about
system performance characteristics and system performance characteristics and
system lifecycle constraints system lifecycle constraints
Functional RequirementsFunctional Requirements
Customer Requirements
Functional Requirements
Design
Implementation
Unit Test
System Test
Acceptance Test
What are Actors and Use What are Actors and Use Cases?Cases?
Actors - users of the systemActors - users of the system external entities (people or other systems) external entities (people or other systems)
who interact with the system to achieve a who interact with the system to achieve a desired goal.desired goal.
Use Cases - what happens when Actors Use Cases - what happens when Actors interact with the systeminteract with the system by recording all the ways the system is used by recording all the ways the system is used
(“cases of use”) we accumulate all the goals (“cases of use”) we accumulate all the goals or requirements of the system.or requirements of the system.
Therefore:Therefore:
The Use Case is a collection of sequences of The Use Case is a collection of sequences of actions or events relating to a particular goal.actions or events relating to a particular goal.
The Collection of Use Cases (the Requirements The Collection of Use Cases (the Requirements Specification) should define all system behaviour Specification) should define all system behaviour relevant to the actors to assure them that all relevant to the actors to assure them that all their goals are carried out properly.their goals are carried out properly.
Any system behaviour that is irrelevant to the Any system behaviour that is irrelevant to the actors should not be included in the Use Case.actors should not be included in the Use Case.
Identifying ActorsIdentifying Actors
Who uses the system?Who uses the system? Who installs the system?Who installs the system? Who starts up the system?Who starts up the system? Who maintains the system?Who maintains the system? Who shuts down the system?Who shuts down the system? What other systems use the system?What other systems use the system? Who gets information from this system?Who gets information from this system? Who provides information to the system?Who provides information to the system? Does anything automatically happen at preset times?Does anything automatically happen at preset times?
Examples of ActorsExamples of Actors
Customer
Clerk
ShippingCompany
Supplier
Use Case DiagramUse Case Diagram
Customer
Clerk ShippingCompany
Supplier
PlaceOrder
Get OrderStatus
CalculatePostage
SupplyProduct
DeliverPackage
Use Case: Place OrderUse Case: Place Order
Customer
PlaceOrder
Use Case: Place OrderUse Case: Place Order
Description:Description: This Use Case describes how a customer This Use Case describes how a customer selects an item to purchase and then places an order for selects an item to purchase and then places an order for that item.that item.
Level:Level: Primary task Primary task
Preconditions:Preconditions: The Customer is logged into the system The Customer is logged into the system
Postconditions:Postconditions: A product has been ordered A product has been ordered
Primary Actor:Primary Actor: Customer Customer
Secondary Actors:Secondary Actors: Credit Company Credit Company
Place Order: Flow of EventsPlace Order: Flow of Events
TriggerTrigger: The Customer selects a Product category: The Customer selects a Product category
1.1. The Customer browses the chosen Product category pageThe Customer browses the chosen Product category page
2.2. The Customer selects a specific Product to purchaseThe Customer selects a specific Product to purchase
3.3. The Customer adds the Product to their Shopping CartThe Customer adds the Product to their Shopping Cart
4.4. The Customer may repeat events 1, 2 and 3 to add additional The Customer may repeat events 1, 2 and 3 to add additional items to their Shopping Cartitems to their Shopping Cart
5.5. When ready, the Customer requests that the Order be commited When ready, the Customer requests that the Order be commited toto
6.6. The Credit Company is notified to authorise the Customer’s credit The Credit Company is notified to authorise the Customer’s credit ratingrating
7.7. If the credit rating is positive, the Order will be placedIf the credit rating is positive, the Order will be placed
Nouns as Candidate ClassesNouns as Candidate Classes
TriggerTrigger: The : The CustomerCustomer selects a selects a ProductProduct category category
1.1. The The CustomerCustomer browses the chosen browses the chosen ProductProduct category page category page
2.2. The The CustomerCustomer selects a specific selects a specific ProductProduct to purchase to purchase
3.3. The The CustomerCustomer adds the adds the ProductProduct to their to their Shopping CartShopping Cart
4.4. The The CustomerCustomer may repeat events 1, 2 and 3 to add additional may repeat events 1, 2 and 3 to add additional items to their items to their Shopping CartShopping Cart
5.5. When ready, the When ready, the CustomerCustomer requests that the requests that the OrderOrder be commited be commited toto
6.6. The The Credit CompanyCredit Company is notified to authorise the is notified to authorise the CustomerCustomer’s credit ’s credit ratingrating
7.7. If the credit rating is positive, the If the credit rating is positive, the OrderOrder will be placed will be placed
Place Order: Exceptional EventsPlace Order: Exceptional Events
The Customer may terminate the transaction at The Customer may terminate the transaction at any point before Step 7 and the Order will not be placedany point before Step 7 and the Order will not be placed
2a2a If the Product is out of stock, the customer will be If the Product is out of stock, the customer will be notified and asked to confirm of they wish to continue notified and asked to confirm of they wish to continue with the selectionwith the selection
6a6a If the Customer’s credit rating is not satisfactory, If the Customer’s credit rating is not satisfactory, the transaction will be politely terminated at this pointthe transaction will be politely terminated at this point
DesignDesign
Customer Requirements
Functional Requirements
Design
Implementation
Unit Test
System Test
Acceptance Test
Identifying classesIdentifying classes
Think about general properties of the Think about general properties of the domain in which you are workingdomain in which you are working
Identify the nounsIdentify the nouns These form candidate classesThese form candidate classes
A A PublisherPublisher produces and markets a produces and markets a BookBook
A A CustomerCustomer purchases a purchases a BookBook
An An AuthorAuthor writes a writes a BookBook
Publisher Book Customer
Author
Publisher
nameaddresswebSite
Book
bookNumbertitleunitPrice
Customer
nameemailshippingAddress
Author
nameaddresswebSite
AssociationsAssociations
Publisher
nameaddresswebSite
Book
bookNumbertitleunitPrice
R1
publisher publication
Publisher
nameaddresswebSite
Book
bookNumbertitleunitPrice
R1
is producedand
marketedby
producesand
markets
Association MeaningsAssociation Meanings
Name the association so that it can be Name the association so that it can be unambiguously identified (e.g. unambiguously identified (e.g. R1R1))
The “association ends” express meaningThe “association ends” express meaning An association end may be a An association end may be a rolerole or a or a
verb phraseverb phrase Each class in an association has a role Each class in an association has a role
(e.g. a (e.g. a BookBook has the role of a has the role of a publicationpublication)) But writing meaning in terms of a verb But writing meaning in terms of a verb
phrase is more descriptivephrase is more descriptive
Publisher
nameaddresswebSite
Book
bookNumbertitleunitPrice
Customer
nameemailshippingAdd
Author
nameaddresswebSite
R1 R3
R2
is producedand
marketedby
producesand
markets
purchases is sold to
wrote
was written by
MultiplicityMultiplicity
We can also characterise an association We can also characterise an association by the number of instances (objects) that by the number of instances (objects) that participate in each instance of the domain participate in each instance of the domain relationshiprelationship
UML allows specific numbers in a UML allows specific numbers in a multiplicity relationmultiplicity relation
Recommend you only use four kinds:Recommend you only use four kinds: unconditional;unconditional; 1, or 1..*1, or 1..* conditional;conditional; 0..1, or 0..*0..1, or 0..*
Publisher
nameaddresswebSite
Book
bookNumbertitleunitPrice
Customer
nameemailshippingAdd
Author
nameaddresswebSite
R1 R3
R2
is producedand
marketedby
producesand
markets
purchases is sold to
wrote
was written by
1 0..* 1..* 0..*
1..*
1..*
There are books not sold to any customer
To be a customer you must have purchased at least one book
But where do I put the number of books a customer purchased?
Publisher
nameaddresswebSite
BookProduct
bookNumbertitleunitPrice
Customer
nameemailshippingAdd
Author
nameaddresswebSite
R1 R3
R2
is producedand
marketedby
producesand
markets
is apurchase
of
is sold as
wrote
was written by
1 0..* 1..* 0..*
1..*
1..*
Order
quantitysalePricedate
makes 1..*
is made by 1
DesignDesign
Customer Requirements
Functional Requirements
Design
Implementation
Unit Test
System Test
Acceptance Test
Still to DoStill to Do
Formalising Use CasesFormalising Use Cases Strengthening the connection between Strengthening the connection between
requirements and designrequirements and design TestingTesting