Ilovepdf Merged
Ilovepdf Merged
Ilovepdf Merged
SOICT
School of Information and Communication Technology
1
9/6/21
IT3180 – Introduction to
Software Engineering
1 – Introduction to Software Engineering
FYI
• Teacher: Dr. Bui Thi Mai Anh
• Research domains:
• Software Engineering
• Applied AI in Software Engineering:
Software Defect Prediction,
Fault/Bug Localization
• Search-based Software Engineering:
evolutionary computing,
reinforcement learning, deep
learning
• Lab: Intelligent Software Engineering –
BK AI Center
2
9/6/21
3
9/6/21
Historical Perspective
4
9/6/21
• 2020s: AI everywhere
9
10
10
5
9/6/21
11
11
12
12
6
9/6/21
13
13
14
7
9/6/21
15
15
16
16
8
9/6/21
SOICT
School of Information and Communication Technology
1
9/6/21
IT3180 – Introduction to
Software Engineering
3 – Software Development in Practice
• The client provides resources such as money and expect some product in
return
• The client’s job success may depend on the success of the software
project
2
9/6/21
• Customer is the person who buys the software or selects it for use by
an organization
Risk
• Problems
• Does not work as expected (FUNCTION)
• Over budget (COST)
• Late delivery (TIME)
• Competing goals
• Every software project has a trade-off between function/cost/time
• Extra functions add extra costs for development, testing, maintainance etc.
3
9/6/21
Risk (cont.)
The software development team will often add technical insights and
suggestions, but...
8
4
9/6/21
• Acceptance (how the client tests that the software meets the
requirements) and user testing
• Handover (ensuring that the client receives a package that can be
operated and supported over a long time period)
10
10
5
9/6/21
• Visibility : The people who take the responsibility must know what is
happening
• The problem (as seen by a manager) must rely on others for reports
of progress or difficulties
11
12
12
6
9/6/21
13
13
14
14
7
9/6/21
Teams
15
15
16
16
8
9/6/21
Fundamental assumptions:
• Good processes lead to good software
17
17
18
18
9
9/6/21
Feasibility Study
Requirements
User Interface Design
These steps may be
repeated many times
System Design
during the development
Program Development (detail design
cycle
and coding)
Acceptance and release
Operation and Maintenance
19
Feasibility
20
20
10
9/6/21
Requirements
21
21
Requirements
22
22
11
9/6/21
23
23
System Design
24
12
9/6/21
Program Development
Program development:
• Takes the system design and user interface design and builds
programs that meet the requirements
25
25
Acceptance testing
• The system is tested against the requirements by the client, often with
selected customers and users
Delivery and release
• After successful acceptance testing, the system is delivered to the
client and released into production or marketed to customers
26
26
13
9/6/21
Operation
• The system is put into practical use
Maintenance
• Errors and problems are identified and fixed
Evolution
• The system evolves overtime as requirements change, to add new
functions or adapt to a changing technical environment
Phase out
• The system is withdrawn from service
This is sometimes called the Software Life Cycle
27
27
28
28
14
9/6/21
Categories of Testing
The term testing is used in several different contexts which are easily
confused:
User Testing
• Versions of the user interface are tested by users
• Their experience may lead to changes in the requirements or the
design
Program Testing
• The development team tests components individually (unit testing) or
in combination (system testing) against the design to find bugs
Acceptance Testing
• The client tests the final version of the system or parts of the system
against the requirements
29
29
30
30
15
9/8/21
SOICT
School of Information and Communication Technology
1
9/8/21
IT3180 – Introduction to
Software Engineering
4 – Introduction to Software Projects 20211
Major Objectives
• During this course, the project team will work together through a full
development cycle
2
9/8/21
Project Teams
Note: After week 1, as soon as possible, you have to form your group
and choose project
Choosing Project
3
9/8/21
Milestones
4
9/8/21
Sprint
Sprint
• In agile terminology, a sprint is a fixed period of time during which a
team completes part of a software project
• Every sprint ends with code that is ready to put into production
• A typical sprint might have a team of 4 to 9 people working for 2 to 4
weeks
• It should be fully tested, with documentation for maintenance
Time box
Time box
• A time box is a set of period of time during which a development team
completets part of a software project
Our course:
• Time: one semester of 16 weeks (including the pausing mid-semester
week)
• Resources: The team size is fixed (6-8 students)
• Scope: The scope of the project should be determined during feasibility
study period to match with the time and resources
10
10
5
9/8/21
Team Organization
11
11
12
12
6
9/8/21
13
13
14
14
7
10/4/21
SOICT
School of Information and Communication Technology
1
10/4/21
Sequence of Processes
Every software project will include these basic steps, in some shape or
form, but:
• The steps may be formal or informal
• The steps may be carried out in various sequences
4
2
10/4/21
3
10/4/21
• Heavyweight Process
• Fully complete each step and have minimal changes and revisions later
• Lightweight Process
4
10/4/21
Heavyweight Lightweight
Slower process Speedy process
Release at the final stage Released as increments
Client negotiation Client collaboration
Following a plan Responding to change
History
10
5
10/4/21
11
11
12
12
6
10/4/21
13
13
14
7
10/4/21
15
15
The Modified Waterfall Model works best when the requirements are
well understood and the design is straightforward
For example:
• Converting a manual data processing systems where the requirements
were well understood
16
8
10/4/21
Discussion
17
17
Iterative Refinement
Concept:
• Requirements are hard to understand until there is an operational
system, particularly with user interfaces.
• System and program design may benefit from prototypes
Process:
• Create a prototype system early in the development process
• Review the prototype with clients and test it with users, to
• improve the understanding of the requirements
• clarify the design
• Refine the prototype in a series of iterations.
18
18
9
10/4/21
19
19
20
20
10
10/4/21
21
21
22
22
11
10/4/21
23
23
Throw-away
Prototyping
24
24
12
10/4/21
Evolutionary
Prototyping
25
25
Get something working as quickly as possible, for client and user evaluation
26
26
13
10/4/21
Incremental Development
27
27
Ecommerce website
• Search, Product Information, Shopping Basket, Checkout, Favourites,
Customer Review
1 increment = 1 release
28
28
14
10/4/21
3 incrementals:
• 1st:
1st release
29
29
3 incrementals:
• 2nd:
2nd release
30
30
15
10/4/21
3 incrementals:
• 3rd:
3rd release
31
31
32
32
16
10/4/21
Incremental
vs. Iterative
33
Spiral Development
34
34
17
10/4/21
35
35
36
36
18
10/4/21
Risk: any situation that might affect the successful completion of the
project
• For example: What is the risk involved in accessing data from a remote
database system?
• What if the data access might be too slow?
• Risk solution: Building a prototype of the data access subsystem
37
37
• At the end of each spiral, the result will typically be incorporated with
the large base system
38
38
19
10/4/21
Agile Methodology
39
39
12 principals
40
40
20
10/4/21
41
41
42
21
10/4/21
43
43
Scrum – The most widely used agile method for software development
44
44
22
10/4/21
Scrum roles
Scrum Master
• Understand the theory, practices, rules and values of Scrum
• Help others improve interactions to maximize the value by the Scrum
team
Product Owner
• The bridge between the business part and the technical part of the
project
• Responsible for writing user stories and for keeping the Product
backlog up to date
Development Team
• Transform the expressed needs into usable functionalities
• Developers, software architects, functional analyist, graphic designers
45
45
Product Backlog
46
46
23
10/4/21
Product Backlog
47
47
Sprint Backlog
48
48
24
10/4/21
Epic
• A functionality of the product to be developed
• A multiple sets of userstories grouped by categories or themes
User Story
• Not a task, neither a specification
• A statement of a user expectation
Task
• Technical activities that helps respond to user stories
• Tasks should be same sized but may be of different nature: design,
development, test, etc.
49
49
50
50
25
10/4/21
Scrum Meetings
51
51
52
52
26
10/4/21
53
53
54
54
27
10/4/21
Mixed Processes
In practice, many large projects use processes that mix aspects of the
four types of software process
Example:
• A project with well-understood requirements might use a modified
waterfall approach to specify the requirements and system design,
followed by a series of agile sprints
• A project with vague requirements might use iterative refinement to
clarify the requirements, followed by a modified waterfall model to
build the final version
• With spiral development, new components may be developed as a
series of sprints
55
55
56
56
28
10/4/21
57
57
58
58
29
10/4/21
59
59
60
60
30
10/4/21
SOICT
School of Information and Communication Technology
1
10/4/21
Overview
2
10/4/21
Feasibility Study
A feasibility study is a study made before committing to a project
• Due to increasing fuel rates and air pollution, young students perform technical,
resource and economic feasibility tests in order to launch an electric vehicle
3
10/4/21
Uncertainty
• Clients may be unsure of the scope of the project
• Benefits are usually very hard to quantify
• Approach is usually unclear or vague è Estimates of resources and
timetable are very rough
• Organization changes may be needed
4
10/4/21
Technical Risks
• There must be an outline plan with a rough timetable and staff
allocation
• The plan must have a large margin for contingencies
External Risks
• Every system interacts with others. Are the others committed to the
necessary efforts?
• Where are the external pressures and obstacles?
10
10
5
10/4/21
Outline Description
11
11
Context:
• A team at University B developed a prototype system to demonstrate
technology for Agency X
• Funds were approved
• An external feasibility study was commissioned to report on the
technical approach to be followed (technical feasibility).
Problems:
• The decision to go ahead was made and the budget was approved
before the feasibility study was begun
• The feasibility study looked at only the technical aspects
12
12
6
10/4/21
13
14
14
7
10/4/21
15
15
In Reality
…
But I assumed I can’t use the
that you were system
going to do without ABC.
XYZ!
16
16
8
10/4/21
17
18
18
9
10/4/21
These rough numbers are part of the provisional plan that is used to
estimate the staffing, timetable, equipment needs, etc.
19
20
20
10
10/4/21
21
21
The highest priority is to ensure that the client and development team have
the same understanding of the goals of the system
22
22
11
10/4/21
23
23
Outline budget:
• n people for m months at $x per month
• equipment, buildings, etc.
• contingency (at least 50% is needed)
Phases/milestones:
• specify deliverables and approximate dates
• planned releases
24
24
12
10/4/21
25
25
26
26
13
10/4/21
• Team: How many hours per week? What skills do people have?
• Time: Must be completed by end of semester, including operational
system, documentation, presentation
• Equipment and software: What special needs are there?
• Client: Will the client be sufficiently available and able to help?
• Start-up time: Creating a team, scheduling meetings, acquiring
software, learning new systems, ...
• Business considerations: Licenses, trade-secrets, ...
• Too ambitious: Nothing to show at the end of the semester...
• What else?
27
27
28
28
14
10/4/21
29
29
6 – Feasibility Study
(end of lecture)
30
30
15
10/11/21
SOICT
School of Information and Communication Technology
1
10/11/21
To complete a project:
• On time
• On budget
• With required functionality
• To the satisfaction of the client
• Without exhausting the team
2
10/11/21
3
10/11/21
• Estimate time and effort is full of errors, even when the system is well
understood.
• Planning
• Full schedule for each part of a project (e.g., each process step, iteration, or
sprint)
• Contingency planning
4
10/11/21
• Progress tracking
• Final analysis
Terminology (1)
• Deliverable
• Milestone
• Completion of a specified set of activities (e.g., delivery of a deliverable,
completion of a process step, end of a sprint)
10
10
5
10/11/21
Terminology (2)
• Activity
• Part of a project that takes place over time (also known as a task)
• Release of a system or subsystem to customers and users
• Event
• The end of a group of activities, e.g., agreement by all parties on the budget and
plan
• Dependency
• An activity that cannot begin until some event is reached
• Resource
• Staff time, equipment, or other limited resource required by an activity
11
11
12
12
6
10/11/21
• Planning is divided into high level release forecasting and low level
detailed planning.
• Release planning is a best guess, high level view of what can be
achieved in a sequence of time-boxes.
• Release plans are continually modified, perhaps daily.
• Clients and developers take joint control of the release plans and
choice of sprints.
• For each time-box, the team plans what it can achieve.
The team may use Gantt charts or other conventional planning tools.
13
13
14
14
7
10/11/21
15
15
16
8
10/11/21
Activity Graph
17
17
Suggest projects
Plan
projects
Dra( 1 Slides 1 Approve
projects
Dra( test
18
18
9
10/11/21
PERT
• Program Evaluation and Review Technique introduced by the U.S.
Navy in 1957 to support the development of its Polaris submarine
missile program.
PERT/Time
• Activity graph with three time estimates (shortest, most probable,
longest) on each activity to compute schedules.
• Because of the difficulty of obtaining good time estimates, usually only
one esDmate is made. This is called the Critical Path Method.
PERT/Cost
• Added scheduling of resources (e.g., facilities, skilled people, etc.)
19
19
20
20
10
10/11/21
Project activities:
• install landscaping
• pour foundations
• frame walls
• install plumbing systems
• get permits
• install electrical systems
• move in
21
21
22
11
10/11/21
23
24
12
10/11/21
25
A
D E
C
start
G finish
B
26
26
13
10/11/21
A
2
D E
4 6
C
start
5
G
finish
B 3
6
F
9
27
27
• Uses an Activity Graph with single time estimate for each activity
• On big projects, activity graphs with more than 10,000 activities are
common
28
28
14
10/11/21
• Earliest start date (ES): the earliest date that it is possible to start an
activity, given that its precedent activities must be completed first
• Earliest finish date (EF): the date that all the activities ending at that
node will be completed, assuming that every activity begins at its
earliest start date
• Equal to the earliest start time for the activity plus the time required to
complete the activity
• Latest finish time (LF): the latest time at which the activity can be
completed without delaying the project
• Latest start time (LS): equal to the latest finish time minus the time
required to complete the activity
29
29
• Slack time (float time): how much extra time you have available for a
particular activity?
30
30
15
10/11/21
A A-D-E-G = 15
2
D E B-C-D-E-G = 24
4 6
B-F-G = 18
C
start 5
G
finish
B 3
6
F
9
31
31
A A-D-E-G = 15
2
D E B-C-D-E-G = 24
4 6
B-F-G = 18
C
start 5
G
finish
B 3
6
F
9
32
32
16
10/11/21
For each activity, calculate ES, EF, LS, LF and slack time
ES Duration EF
Activity
LS Slack LF
33
33
• The float for non-critical activities is the critical path duration minus
the duration of the activity’s path
34
34
17
10/11/21
F
9
35
35
F
9
36
36
18
10/11/21
D 6
2
0 E
A
0
9
start 5 3
C G finish
0 0
9
6 F
B 6
37
37
38
38
19
10/11/21
12 4 15
D 16 6 21
1 2 2
0 E
A
0
9
start 7 5 11 22 3 24
C G finish
0 0
7 9 15
1 6 6 F
B 6
39
39
40
40
20
10/11/21
• Start with the longest path and work your way from the end node to
the start node
• Do the same thing for the next longest path, and so on
• Don’t recalculate the LS or LF for an activity that’s already been calculated on
a prior backward pass.
41
41
• The LS and LF of the last activity in the critical path will be the same as
its ES and EF
• The LF of non-critical activities with the end node as their successor will
be the LF of the last critical path activity
42
42
21
10/11/21
12 4 15
D 16 6 21
1 2 2
12 0 15 E
A
16 0 21
10 9 11
start 7 5 11 22 3 24
C G finish
7 0 11 22 0 24
7 9 15
1 6 6 F
B 13 6 21
1 0 6
43
43
Discussion
44
22
10/11/21
7. Project Management
(end of lecture)
45
45
23
10/11/21
SOICT
School of Information and Communication Technology
1
10/11/21
Requirements
• The development team and the client need to work together closely to
define the requirements.
2
10/11/21
3
10/11/21
Requirement Steps
Requirement Dilemma
4
10/11/21
Challenges
For clients:
• When they see the system, they ask for new features
• These changes may force you to rework large parts of the system
10
10
5
10/11/21
Difficulties:
• Specification is time consuming and difficult to create
• Specification is hard to maintain
• Checking a detailed specification is tedious
• Clients rarely understand the implications
11
11
12
12
6
10/11/21
13
13
14
14
7
10/11/21
Difficulties:
• Some requirements are system-wide and cannot be defined within a
single sprint
• e.g., data bases, security architectures, overall user interface design
15
15
16
16
8
10/11/21
Difficulties:
• Each iteration may require major rework of previous work
• Developers often patch new requirements onto previous iterations
17
17
Discussion
• For a large system, you have to be flexible
• Both heavyweight processes and lightweight process have problems
BUT...
Both types of process work well, if used sensibly
• When using a heavyweight process, such as the modified waterfall
model, specify the requirements in moderate detail, but be prepared
for revisions. Some details can be left until later in the process
18
18
9
10/11/21
Requirement Goals
19
19
20
20
10
10/11/21
21
21
Clients often have an old system that is so familiar that they do not
realize that it has functions that are not needed in a new system:
• A replacement system is when a system is built to replace an existing
system
• A legacy system is an existing system that is not being replaced, but is
being extended or must interface to a new system
22
11
10/11/21
23
23
Stakeholder Analysis
24
24
12
10/11/21
Viewpoint Analysis
Viewpoint Analysis
• Analyze the requirements as seen by each group of stakeholders
• Example: University Admissions System
• Applicants
• University administration
• Admission office
• Financial aid office
• Special offices
• Academic departments
• Computing staff
• Operations and maintenance
25
25
26
26
13
10/11/21
27
28
14
10/11/21
29
29
Functional requirements
30
30
15
10/11/21
Non-Functional requirements
Requirements that are not directly related to the functions that the
system must perform
Product requirements
• performance, reliability, portability, etc...
Organizational requirements
• delivery, training, standards, etc...
External requirements
• legal, interoperability, etc...
Marketing and public relations
31
31
32
32
16
10/11/21
33
33
Technical decisions
• Requirements analysis should make minimal assumptions about the
system design
• But the requirements definition must be consistent with computing
technology and the resources available
34
34
17
10/11/21
8 – Requirement Analysis
(end of lecture)
35
35
18
10/18/21
SOICT
School of Information and Communication Technology
1
10/18/21
Requirement Steps
2
10/18/21
Requirement as a Scenario
Scenarios
Definition:
3
10/18/21
Scenario - Terminology
In some document:
• Scenario refers to a user’s total interaction with the system
• Example: An admin of the store can manage all the products of his
store
• Including: add new product, delete/update existing products
Describe a Scenario
4
10/18/21
Requirement’s goal:
The requirements are being developed for a system that will enable
university students to take exams online from their own rooms using a
web browser
Create a scenario for how a typical student interacts with the system
In the next few slides, the questions in blue are typical of the questions to ask
the client while developing the scenario
Example (2)
Purpose
• Scenario describes the use of an online Exam system by a
representative student
User
• [Who is a typical student?] Student A, senior at HUST, major in
computer science
• [Where can the student be located?] At his/her own room
Equipment
• Any computer with a supported browser
• [Is there a list of supported browsers? Are there any network restrictions?]
10
10
5
10/18/21
Example (3)
Scenario
1. Student A authenticates. [How does a HUST student authenticate?]
2. Student A starts browser and types URL of Exam system. [How does
the student know the URL?]
3. Exam system displays list of options. [Is the list tailored to the
individual user?]
4. Student A selects IT3180 Exam 1.
5. A list of questions is displayed, each marked to indicate whether
completed or not. [Can the questions be answered in any order?]
6. Student A selects a question and chooses whether to submit a new
answer or edit a previous answer [Is it always possible to edit a
previous answer? Are there other options?]
11
11
Example (3)
Scenario
7. [What types of questions are there: text, multiple choice, etc.?] The first
question requires a written answer. Student A is submitting a new
answer. The student has a choice whether to type the solution into
the browser or to attach a separate file. Student A decides to attach
a file. [What types of file are accepted?]
8. For the second question, the student chooses to edit a previous
answer. Student A chooses to delete a solution previously typed into
the browser and to replace it with an attached file. [Can the student
edit a previous answer, or must it always be replaced with a new
answer?]
9. As an alternative to completing the entire exam in a single session,
Student A decides to saves the completed questions to continue
later. [Is this always permitted?] 12
12
6
10/18/21
Example (4)
Scenario
10. Student A logs off.
11. Later Student A logs in, finishes the exam, submits the answers, and
logs out. [Is this process any different from the initial work on this exam?]
12. The student A has now completed the exam. The student selects an
option that submits the exam to the grading system. [What if the student
has not attempted every question? Is the grader notified?]
13
13
• The scenario will often clarify the requirements for the user interface,
but the design of the user interface should not be part of the scenario
14
14
7
10/18/21
Create a scenario for everything that can go wrong and how the system
is expected to handle it
15
15
16
16
8
10/18/21
17
17
18
18
9
10/18/21
• When naming actors, choose names that describe the role, not generic
names, such as “user” or “client”
19
19
20
20
10
10/18/21
21
21
Metadata
• The name of the use case
• Goal of the use case
• The actor or actors
• Trigger
• Entry conditions at beginning
• Post conditions at end
Flow of events
• The basic flow of events
• Alternative flows of events
• Exceptions
22
22
11
10/18/21
23
23
24
12
10/18/21
In the following list, each flow is linked to a step of the basic flow.
Alternative flows are alternative paths to successful completion of the
use case
3. ExamTaker has previously entered part of the exam, but not
submitted it.
4. Solution file not accepted by system
6. Incomplete submission
Exceptions lead to failure of the use case
2. Authentication failure
25
25
26
26
13
10/18/21
Association (2)
27
27
Association (3)
28
28
14
10/18/21
Association (4)
29
29
Association (5)
30
30
15
10/18/21
31
31
32
32
16
10/18/21
33
33
Extension Point
• A feature of a use case that identifies a point where the behavior of
this use case can be augmented with elements of another (extending)
use case.
• If an alternative flow or an exception needs extra detail, it can be
modeled as a separate use case using the <<extend>> relationship
34
34
17
10/18/21
35
35
36
36
18
10/18/21
Use case B is extracted from larger use case A into a separate use case
Use cases B and C are extracted from larger use case A into separate use cases
37
37
Example
38
38
19
10/18/21
Use case C is extracted from use case A and B to be reused by both use cases A, B
There is no “inclusion points” to specify location or condition of
inclusion for the <<include>> relationship
39
39
Example
40
40
20
10/18/21
41
41
The Generalization relationship between two Use Cases has the same
meaning as in the case of Actors
• The behavior of the ancestor is inherited by the descendant
• This is used when there is common behavior between two use cases
and also specialized behavior specific to each use case
42
42
21
10/18/21
Example
43
43
Example (2)
44
44
22
10/18/21
Example (3)
45
45
Scenarios and Use cases are both intuitive – easy to discuss with clients
Scenarios are a tool for requirement analysis
• They are useful to validate use cases and in checking the design of a
system
• They can be used as test cases for acceptance testing
46
23
10/18/21
• A use case diagram shows the relationships between actors and their
interactions with a system
47
47
System Boundary
48
48
24
10/18/21
49
49
50
50
25
10/18/21
Exercise 1
51
51
Exercise 2
52
52
26
10/18/21
54
54
27
IT3180 - Introduction to Software Engineering
Exercises: Use Case Diagram Quiz
1 School
of Information and Communication Technology
Ha Noi University of Science and Technology
18 octobre 2021
SOICT
School of Information and Communication Technology
1
11/1/21
2
11/1/21
Models
Example: Model
Approach: as a Blueprint
Floorplan
2. Design
1. Requirements
piece of land.
• Each room shall
have a door.
• Furniture shall fit
into living room.
• Bathroom shall
have a window.
• Cost shall be in http://wikimedia.org
budget. (CC nc-sa 3.0,
Bobthebuilder82)
– 1 – 2013-10-21 – Smodel –
Floorplan as an Abstraction
Floorplan
γ
all houses
F
F •
•
• •
H
α
α
7
Floorplan F
•• Floorplan F denotes
denotes a set γ(F ) of houses (concretisations of F ),
7
Smodel ––
which differ,
which differ, e.g.
e.g. in
in colour
colour of bricks, or making of windows.
2013-10-21 –– Smodel
Floorplan F
•• Floorplan F represents
represents house H according to abstraction α.
–– 11 –– 2013-10-21
By adding
•• By adding information
information to F (such as making of windows),
Principles we
of can
we Modeling
can narrow down
narrow down γ(F ).
7/40
4
11/1/21
• Goal
• Represent the flow of information through the system and the activities that
process this information
10
10
5
11/1/21
DFD notations
• Processes
• The activities carried out by the system which use and transform information
• Process is denoted as a rounded rectangle
• Data-flows
• The data inputs to and outputs from to these activities (processes)
• Data flows are notated as named arrows
• External entities
• The sources from which information flows into the system and the recipients of
information leaving the system
• External entities are notated as ovals
• Data stores
• Where information is stored within the system
• Notated as rectangles
11
11
DFD symbols
12
12
6
11/1/21
13
13
14
14
7
11/1/21
15
15
16
16
8
11/1/21
Flowchart Models
17
17
18
18
9
11/1/21
Transition Diagrams
19
19
52
giveInfo/ Booking
startPayTimer Made payMoney
Entry point
State 20
20
10
11/1/21
54
payMoney
giveInfo/ Booking
startPayTimer Made checkIn
Paid
cancel
cancel/refund
time Ticketed
Expires Cancelled/
Customer
Cancelled
/Unpaid fly
Used
21
21
22
22
11
11/1/21
23
23
IT 3180
Student
24
24
12
11/1/21
25
25
Prototyping Requirements
26
26
13
11/1/21
Discussion
• Class and object models are used as a tool for program design, not for
modeling requirements
27
27
28
28
14
11/1/21
SOICT
School of Information and Communication Technology
1
11/1/21
2
11/1/21
Terminology
3
11/1/21
Prototypes
Paper Prototype
4
11/1/21
Wireframe
Mock-up
• A mock-up shows
suggested layout and
graphical design elements,
such as icons, colors, fonts,
etc.
• This mock-up was drawn
with Photoshop
10
10
5
11/1/21
11
11
• The mental model is the user’s model of what the system provides
• The computer model may be quite different from the user’s mental
model
Example: A board game, e.g., chess
• Mental model: pieces on a board
• Computer model: data and logic that describe the game
12
6
11/1/21
13
13
14
7
11/1/21
15
15
• The term Model View Control (MVC) is used with a wide variety of
slightly different meanings
• In this lecture, we use MVC as a computer model for designing the user
experience
16
16
8
11/1/21
17
17
18
18
9
11/1/21
19
19
Navigation
20
10
11/1/21
The user interface is the appearance on the screen and the manipulation
by the user
For user interface design, a team needs somebody who has skills in
graphic design
21
21
User interface design is partly an art, but there are general principles
• Consistency – in appearance, controls, and function
• Feedback – what is the computer system doing? Why does the user
see certain results?
• Users should be able to interrupt or reverse actions
• Error handling should be simple and easy to comprehend
22
22
11
11/1/21
Navigation: Menus
Advantages
• Easy for users to learn and use
• Certain categories of error are avoided
23
23
Simple is good
24
24
12
11/1/21
25
25
• Text
• Precise, unambiguous
• Fast to compute and transmit
• Graphics
• Simple to comprehend / learn
• Uses of color
• Variations show different cases
26
26
13
11/1/21
27
27
28
28
14
SOICT
School of Information and Communication Technology
IT3180 – Introduction to Software
Engineering
12 – System Architecture
3
Design Phase
Creativity
• System and program design are a particular part of creativity in the
software development, as user interfaces
5
System architecture
System architecture is the overall design of a system:
• Computers and networks (e.g., LAN, Internet, cloud services)
• Interfaces and protocols (e.g., HTTP, IMAP, ODBC)
• Databases (e.g., relational, distributed)
• Security
• Operations (e.g., backup, archiving, audit trails)
6
Models for System Architecture
8
Example: Low cohesion (blue), High coupling (red)
9
Example: High cohesion (blue), Low coupling (red)
BETTER!
10
Component
11
Components as Replaceable Elements
12
Components and Classes
13
Kinds of Components
14
Package
15
Node
16
Example: Simple Web System
17
Deployment Diagram
• One of the two kinds of diagrams used in modeling the physical aspects
of an object-oriented system
• Show the configuration of run time processing nodes and the
components that live on them
• We use deployment diagrams to model the static deployment view of a
system
• A deployment diagram commonly contains
• Nodes
• Dependency and association relationships
18
Deployment Diagram (2)
19
Deployment Diagram (3) – Common Uses
20
Model embedded system
21
Model client/server system
• Identify the nodes that represent your system’s client and server
processors
• Highlight those devices that are relevant to the behavior of the system
• Model the topology of these nodes in a deployment diagram
22
Model a fully distributed system
23
Component Diagram
• Component diagrams are one
of the two kinds of diagrams
for modeling the physical
aspects of object-oriented
software system
• Show the organization and
dependencies among a set of
components
• We use component diagrams
to model the static
implementation view of a
software system
24
Component diagram - content
Component diagram commonly contains:
• Components
• Interfaces
• Dependency, generalization, association and realization relationships
25
Component Diagram: Interfaces
An interface is a collection of
operations that are used to
specify a service of a class or a
component
• Relationship between a
component and its interface
can be in two ways
• Iconic form of realization
• Expanded form (reveal
operations) of realization
• The component that accesses
the services of the other
component through the
interfaces using dependency
26
Application Programming Interface (API)
27
Component diagaram to Model an API
28
Component Diagram to Model Source Code
29
Component Diagram to Model an executable release
30
Component Diagram to Model Tables, Files, Documents
31
Component Diagram to Model a physical database
32
Architectural Styles
33
Architecture Style: Pipe
34
Architectural Style: Client/Server
35
Architectural Style: Repository
36
Architectural Style: Repository with Storage Access Layer
37
Exercise (Old Exam Question)
38
Solution for Phase 1
39
Solution for Phase 1
40
Solution for Phase 2
41
Solution for Phase 2
42
12. System Architecture
(end of lecture)
43
11/25/21
SOICT
School of Information and Communication Technology
1
11/25/21
2
11/25/21
The basic client/server web site returns only fixed HTML pages
• Attach the server to a data store, so that it can respond to requests
from the client and return suitable content
3
11/25/21
4
11/25/21
The Presentation Tier has become more complex. Since it still supports
the same interface it is still a replaceable binary component.
10
10
5
11/25/21
11
11
12
12
6
11/25/21
Updating
13
13
14
7
11/25/21
• Because the input and validation process is able to read the master file,
it can check that the transaction is compatible with the master file
• Example: whether or not the file has a record for the customer
15
15
Advantages:
• Backup and recovery has fixed checkpoints
• Better management control of operations
• Efficient use of staff and hardware
• Error detection and correction is simplified
Disadvantages:
• Information in master file is not updated immediately
• No good way to answer customer inquiries
16
16
8
11/25/21
Online Inquiry
17
18
18
9
11/25/21
19
19
View
The view presents the state of the interface to the user. It subscribes to
the model, which notifies it of events that change the state
• Renders data from the model for the user interface
• Provides editors for properties, such as text fields, etc.
• Receives updates from the model
• Sends user input to the controller
• A given model may support a choice of alternative views
20
20
10
11/25/21
Model
The model records the state of the application and notifies subscribers. It
does not depend on the controller or the view
• Stores the state of the application in suitable data structures or
databases
• Responds to instructions to change the state information
• Notifies subscribers of events that change the state
• May be responsible for validation of information
21
21
Controller
The controller is the part of the system that manages user input and
navigation within the application
• Defines the application behavior
• Maps user actions to changes in the state of the model
• Interacts with external services via APIs
• May be responsible for validation of information
• Different frameworks handle controllers in different ways. In
particular, there are several ways to divide responsibilities between
the model and the controller, e.g., data validation, external APIs
22
22
11
11/25/21
• For mobile apps, the MVC is a single component. The model, view,
controller are classes
• The programs often use cloud-based external services, each with an
API (e.g., location, validation). These are usually managed by the
controller
23
23
24
12
11/25/21
25
25
26
26
13
11/25/21
SOICT
School of Information and Communication Technology
1
11/25/21
Presentations
2
11/25/21
Objectives
• What is the purpose of the presentation? What do you want to
achieve?
• Who will be there?
• How much time will you have? How will you use the time?
IT 3180 Presentations:
• Lecturer, Teaching Assistant, may be clients (if available)
• Plan 15 minutes for the presentation and 5 minutes for questions
• Expect interruptions
3
11/25/21
4
11/25/21
Demonstrations
10
10
5
11/25/21
Final Presentation
• A good basis for future involvement with the client, team or this
project
11
11
12
12
6
11/25/21
Preparation of Presentation
for IT3180 Project
(end of lecture)
13
13
7
11/26/21
SOICT
School of Information and Communication Technology
1
11/26/21
Heavyweight Approach
• Program design and coding are separated
• The design uses class models and other models to specify the program in
detail, before beginning the code
Lightweight Approach
• Program design and coding are intertwinned
• The development is iterative
Mixed Approach
• Outline design is created using models, with details worked out
iteratively during work
2
11/26/21
Program Design
UML Models
Models used for requirements
• Use case diagram shows a set of use cases and actors and their
relationships
Models used for system architecture:
• Component diagram shows the organization and dependencies among
a set of components
• Deployment diagram shows the configuration of processing nodes and
the components living on them
Models used for program design
• Class diagram shows a set of classes, interfaces, and collaborations
with their relationships
• Object Diagram or Sequence Diagram show a set of objects and their
relationships 6
3
11/26/21
Class Diagram
4
11/26/21
Notation: Relationships
10
10
5
11/26/21
11
11
Notation: Association
Employer Employee
12
12
6
11/26/21
Notation: Association
13
13
14
14
7
11/26/21
15
15
16
16
8
11/26/21
Noun Identification
17
17
Noun Identification
18
18
9
11/26/21
Candidate Classes
19
19
20
20
10
11/26/21
Methods
21
21
22
22
11
11/26/21
23
23
• Interaction diagrams
• Show set of objects and their relationships including messages that
may be dispatched among them
• Sequence diagram: time ordering of messages
24
24
12
11/26/21
Interaction
25
25
26
26
13
11/26/21
Actions on Objects
27
27
28
28
14
11/26/21
29
29
• Application classes:
• Customer
• Catalog
• Item/Product
• Order
• Purchased Item
• System classes:
• User Interface
• Purchase Interface
• Browse Interface
• Check Out
• Credit Card Authorization
• Item, Purchased Item
30
30
15
11/26/21
Class Diagram
31
31
Sequence Diagram
32
32
16
11/26/21
33
33
17
12/13/21
SOICT
School of Information and Communication Technology
1
12/13/21
Software Reuse
2
12/13/21
Evaluating Software
3
12/13/21
4
12/13/21
Design Patterns
Sources:
• E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns:
Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994
• Wikipedia has good discussion of many design patterns, using UML
and other notation, with code samples.
10
10
5
12/13/21
11
11
12
12
6
12/13/21
Delegation
13
13
Delegation (2)
14
14
7
12/13/21
15
15
16
16
8
12/13/21
17
17
18
18
9
12/13/21
Notation
19
19
Strategy Pattern
Encapsulating Algorithms
20
20
10
12/13/21
Problematic
• To solve a specific
problem, there may be a
family of algorithms
• Each algorithm is
separated in a class called
strategy
• The client will decide
which strategy will be
selected
21
21
22
22
11
12/13/21
23
23
24
24
12
12/13/21
25
25
Observer
Pattern
Subscriber-Publisher
26
26
13
12/13/21
Problematic
• To define a subscription
mechanism to notify
multiple objects about any
events that happen to the
object they are observing
• Event-Subscriber
• Listener
27
27
28
14
12/13/21
29
29
30
30
15
12/13/21
Observer
Pattern
Structure (3)
31
32
32
16
12/13/21
Solution
33
33
State Pattern
34
34
17
12/13/21
Problematic
• State is a behavior pattern
• Allow an object to alter its
behavior when its internal
state changes
• Closely related to the
concept of Finite State
Machine
35
35
• When a new order is created, the users should view the state of the
order
• When the state of an order is changed, some actions will be fired!
36
36
18
12/13/21
State Structure
37
37
Case study
38
38
19
12/13/21
Solution
39
39
40
40
20
12/20/21
SOICT
School of Information and Communication Technology
1
12/20/21
Testing
2
12/20/21
3
12/20/21
• Integration Testing: do you get the expected results when the parts are
put together?
• Approaches: Bottom-up, top-down testing
• Acceptance Testing: does it match to user needs?
4
12/20/21
Terms
10
10
5
12/20/21
Terms (2)
• Test case
• a set of conditions/variables to determine whether a system under
test satisfies requirements or works correctly
• Test suite
• a collection of test cases related to the same test work
• Test plan
• a document which describes testing approach and methodologies
being used for testing the project, risks, scope of testing, specific
tools
11
11
Test suite
12
12
6
12/20/21
Examine the interface between modules as well as the input and output
• Stub/Driver:
• A program that simulates functions of a lower-level/upper-level module
13
13
14
14
7
12/20/21
15
15
• Big-bang test
• Wherein all the modules that have completed the unit tests are linked all
at once and tested
• Reducing the number of testing procedures in small-scale program; but
not easy to locate errors
• Sandwich test
• Where lower-level modules are tested bottom-up and higher-level
modules are tested top-down
16
16
8
12/20/21
Regression test
“When you fix one bug, you introduce several new bugs”
• Re-testing an application after its code has been modified to verify that
it still functions correctly
• Re-running existing test cases
• Checking that code changes did not break any previously working functions
(side-effect)
• Run as often as possible
• With an automated regression testing tool
17
17
Specification
Precondition Postcondition
Implementation
Black box White box
Must choose inputs without Can choose inputs with
knowledge of the knowledge of the
implementation implementation
18
18
9
12/20/21
White box
Black box
Can choose inputs with knowledge of the
Must choose inputs without knowledge of the
implementation
implementation
19
19
20
20
10
12/20/21
White-box
Testing
21
21
22
22
11
12/20/21
True False
Computation Decision
*/
int i = 0;
if( Selective Testing
((( fptr1 = fopen("file1", "r")) != NULL) && (i++)
Lund University / Faculty of Engineering/ Department of Computer Science / Software Engineering Research Group
&& (0)) ||
((( fptr2 = fopen("file2", "r")) != NULL) && (i++) 24
&& (0)) ||
24 ((( fptr3 = fopen("file3", "r")) != NULL) && (i++))
);
return(i);
}
• Inputs Path
selection
• Source code of unit
Work criteria
selected paths to
satisfy path selection Are
25 Figure 4.1 Process of generating test input data for control flow testing.
Selection of Paths: Paths are selected from the CFG to satisfy the path selec-
tion criteria, and it is done by considering the structure of the CFG.
Generation of Test Input Data: A path can be executed if and only if a
certain instance of the inputs to the program unit causes all the conditional
Path selection criteria statements along the path to evaluate to true or false as dictated by the
control flow. Such a path is called a feasible path. Otherwise, the path is
said to be infeasible. It is essential to identify certain values of the inputs
from a given path for the path to execute.
• Example: Feasibility Test of a Path: The idea behind checking the feasibility of a
selected path is to meet the path selection criteria. If some chosen paths
• Given the source code of the function AccClient
are found to be infeasible, then new paths are selected to meet the criteria.
• Draw the CFG
4.3 CONTROL FLOW GRAPH
Life Insurance Example
A CFG is a graphical representation
1
of a program unit. Three symbols are used
Age, Gender
to construct a CFG, as shown in Figure 4.2. A rectangle represents a sequential
2
bool AccClient(agetype T if(female) F
if(gender=female)
accept := age < 85;
Accept = true 5 Accept = false 6
else
accept := age < 80;
Return accept 7
return accept
Lund University / Faculty of Engineering/ Department of Computer Science / Software Engineering Research Group
26
26
13
12/20/21
• Objective: Design all possible test cases so that all paths of the
program are executed
• 4 test cases satisfy the all paths coverage criterion
All paths
Female Age < 85 Age < 80
Age, Gender 1
Yes Yes Yes
Yes Yes No
2
Yes No Yes T if(female) F
Yes No No
T 3 F
No Yes Yes Age <85
4
T F
No Yes No Age <80
No No Yes
No No No
Accept = true 5 Accept = false 6
<Yes,Yes,*> 1-2(T)-3(T)-5-7
<Yes,No,No> 1-2(T)-3(F)-6-7 Return accept 7
<No,Yes,Yes> 1-2(F)-4(T)-5-7
<No,*,No> 1-2(F)-4(F)-6-7
Lund University / Faculty of Engineering/ Department of Computer Science / Software Engineering Research Group
27
27
Statement Coverage
bool accept 2
T if(female) F
if(gender=female)
3
accept := age < 85; T
Age <85
F
4
F
else T
Age <80
28
28
14
12/20/21
Branch coverage
29
29
Example
AccClient(83,
Branch Coverage /1 female)->accept
Age, Gender 1
bool AccClient(agetype
age; gndrtype gender) 2
T if(female) F
bool accept
if(gender=female) T 3
Age <85
F
4 F
accept := age < 85; T
Age <80
true
else
accept := age < 80; Accept = true 5 Accept = false6
return accept
Return accept 7
Lund University / Faculty of Engineering/ Department of Computer Science / Software Engineering Research Group
30
30
15
12/20/21
Example
AccClient(83, male)
Branch Coverage /2 ->reject
Age, Gender 1
bool AccClient(agetype
age; gndrtype gender)
T if(female) 2 F
bool accept
if(gender=female) T 3
Age <85
F
T 4 F
accept := age < 85; Age <80
else
accept := age < 80; Accept = true 5 Accept = false 6
false
return accept
Return accept 7
Lund University / Faculty of Engineering/ Department of Computer Science / Software Engineering Research Group 31
31
Example
AccClient(78, male)-
Branch Coverage /3 >accept
Lund University / Faculty of Engineering/ Department of Computer Science / Software Engineering Research Group
32
32
16
12/20/21
Example
AccClient(88,
Branch Coverage /4 female) ->reject
if(gender=female) T 3 F
Age <85
accept := age < 85; T 4
Age <80
F
false
else
accept := age < 80;
false Accept = true 5 Accept = false 6
return accept
Return accept 7
Lund University / Faculty of Engineering/ Department of Computer Science / Software Engineering Research Group
33
33
Comparing 3 criteria
34
34
17
12/20/21
35
35
36
36
18
12/20/21
Black-box
Testing
37
37
Black-box Techniques
• Equivalence Partitioning
• Boundary Analysis
• Table Decision
38
38
19
12/20/21
Equivalence Partitioning
• Create the encompassing test cases by analyzing the input data space
and dividing into equivalence classes
• Input condition space is partitioned into equivalence classes
• Every input taken from a equivalence class produces the same result
39
39
40
40
20
12/20/21
0 20 40 60 70 80 100
41
41
42
42
21
12/20/21
(7) 52 58 Failed
(8) -15 120 Invalid
20
Score of
Math. (9) 68 -66 Invalid
0 20 40 60 70 80 100
(10) 118 85 Invalid
(9)
43
43
Table Decision
44
22
12/20/21
45
45
If both of mathematics score and physics score are invalid è Two messages are expected to be
output. Is it correct specifications?
46
46
23
12/20/21
47
47
• “Thành công”
• Mã PIN đúng
• “Thất bại”
• Mã PIN sai và số lần sai < 3
• “Khoá tài khoản”
• Mã PIN sai và số lần sai >= 3
Mã PIN đúng Y Y N N
Số lần sai < 3 Y N Y N
“Thành công” x N/A - -
“Thất bại” - N/A x -
“Khoá tài khoản” - N/A - x
48
48
24
12/20/21
49
49
25
SOICT
School of Information and Communication Technology
IT3180 – Introduction to Software
Engineering
17 – Configuration Management
Content
4
5
Changes and Software Configuration
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
6
Changes and Software Configuration
changes in
business requirements
changes in
technical requirements
changes in
user requirements other
documents
software models
Project
Plan
data
Test
code
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
7
Changes and Software Configuration
programs documents
The pieces
data
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
8
Changes and Software Configuration
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
9
Changes and Software Configuration
Baselines
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
10
Changes and Software Configuration
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
11
Software Configuration Management
SCM Repository
• The SCM repository is the set of mechanisms
and data structures that allow a software team to
manage change in an effective manner
• The repository performs or precipitates the
following functions [For89]:
• Data integrity
• Information sharing
• Tool integration
• Data integration
• Methodology enforcement
• Document standardization
12
Software Configuration Management
Repository Content
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
13
Software Configuration Management
Repository Features
• Versioning.
• saves all of these versions to enable effective management of product
releases and to permit developers to go back to previous versions
• Dependency tracking and change management.
• The repository manages a wide variety of relationships among the data
elements stored in it.
• Requirements tracing.
• Provides the ability to track all the design and construction components
and deliverables that result from a specific requirement specification
• Configuration management.
• Keeps track of a series of configurations representing specific project
milestones or production releases. Version management provides the
needed versions, and link management keeps track of interdependencies.
• Audit trails.
• establishes additional information about when, why, and by whom
changes are made.
SCM Elements
Component elements—a set of tools coupled within a file management system (e.g.,
a database) that enables access to and management of each software configuration
item.
Process elements—a collection of procedures and tasks that define an effective
approach to change management (and related activities) for all constituencies
involved in the management, engineering and use of computer software.
Construction elements—a set of tools that automate the construction of software by
ensuring that the proper set of validated components (i.e., the correct version) have
been assembled.
Human elements—to implement effective SCM, the software team uses a set of tools
and process features (encompassing other CM elements)
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
15
SCM Process
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
16
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
17
SCM Process
Change Control
STOP
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
18
SCM Process
developer evaluates
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
19
SCM Process
check-out SCIs
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
20
SCM Process
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
SCM Process
Version Control
• Version control combines procedures and tools to manage different versions
of configuration objects that are created during the software process
• A version control system implements or is directly integrated with four
major capabilities:
• a project database (repository) that stores all relevant configuration objects
• a version management capability that stores all versions of a configuration object (or
enables any version to be constructed using differences from past versions);
• a make facility that enables the software engineer to collect all relevant
configuration objects and construct a specific version of the software.
• an issues tracking (also called bug tracking) capability that enables the team to
record and track the status of all outstanding issues associated with each
configuration object.
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
22
SCM Process
Configuration Auditing
Change
Requests SQA
Plan
SCIs
SCM Audit
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
23
SCM Process
Status Accounting
Change
Change
Reports
Requests ECOs
SCIs
Status Accounting
Reporting
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
24
SCM Process
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
25
SCM Process
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
26
Content Management-I
• The collection subsystem encompasses all actions required to create and/or
acquire content, and the technical functions that are necessary to
• convert content into a form that can be represented by a mark-up language
(e.g., HTML, XML
• organize content into packets that can be displayed effectively on the client-
side.
• The management subsystem implements a repository that encompasses the
following elements:
• Content database—the information structure that has been established to
store all content objects
• Database capabilities—functions that enable the CMS to search for specific
content objects (or categories of objects), store and retrieve objects, and
manage the file structure that has been established for the content
• Configuration management functions—the functional elements and
associated workflow that support content object identification, version
control, change management, change auditing, and reporting.
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
27
Content Management-II
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
28
Content Management
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
29
Change Management for WebApps-I
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
30
Change Management for WebApps-II
Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
31
4. Version Control
32
• Scenario 1:
• Your program is working
• You change “just one thing”
• Your program breaks
• You change it back
• Your program is still broken--
why?
34
•Scenario:
• You change one part of a
program--it works
• Your co-worker changes
another part--it works
• You put them together--it
doesn’t work
• Some change in one part
must have broken
something in the other part
• What were all the changes?
35
• Scenario:
• You make a number of
improvements to a class
• Your co-worker makes a
number of different
improvements to the same class
• How can you merge these
changes?
36
Tools: diff
• There are a number of tools
that help you spot changes
(differences) between two
files
• Tools include diff, rcsdiff,
jDiff, etc.
• Of course, they won't help
unless you kept a copy of the
older version
• Differencing tools are useful
for finding a small number of
differences in a few files
37
Tools: jDiff
38
Tools: jDiff
39
40
•Lock-Modify-Unlock
•Copy-Modify-Merge
41
Check-out
A
Bobby
Andy
3
42
Lock
A
Аndy
(Local Edit)
Bobby
Andy
33
43
Andy
Bobby
Andy
34
44
Commit
A
Andy
Bobby
Andy
35
45
Andy
Andy
(Local Edit)
Bobby
Andy
36
46
Bobby finishes,
Repository
commits her changes
and unlocks the file. Andy
Bobby
Commit
Andy
Bobby
Andy
Bobby
Andy
47
a. The Lock-Modify-Unlock
e Lock-Modify-Unlock Model Model
(7) (7)
Update Andy
Bobby
Andy
Bobby
Bobby
Andy
48
Check-out
A
Bobby
Andy
49
Bobby
Andy
(Local Edit)
(Local Edit)
Bobby
Andy
50
Bobby
Andy
Bobby
Andy
51
Andy tries to
commit his Repository
changes.
Bobby
A conflict occurs.
Commit Bobby
Bobby
Andy
Andy
(Local
Conflict) Bobby
Andy
52
Andy
&
Bobby
(Local
Merge) Bobby
Andy
53
Andy
&
Bobby
Bobby
Andy
54
Andy
&
Bobby
Bobby
Andy
46
55
4.3. Central vs. Distributed version control
• version control
• Only one repository
Centralized Version Control
Source: http://homes.cs.washington.edu/~mernst/advice/version-control.html 22
56
Source: http://homes.cs.washington.edu/~mernst/advice/version-control.html 23
57
A A
Local Local
Repository Repository
(Andy) (Bobby)
Andy
Bobby
58
(Local Edit)
(Local Edit) Andy Bobby
A A
Local Local
Repository Repository
(Andy) (Bobby)
Andy
Bobby
59
Local Local
Repository Repository
(Andy) (Bobby)
Andy
Bobby
60
Local Local
Repository Repository
(Andy) (Bobby)
Andy
Bobby
61
Push (conflict)
Local Local
Repository Repository
(Andy) (Bobby)
Andy
Bobby
62
Local Local
Repository Repository
(Andy) (Bobby)
Andy
Bobby
63
Local Local
Repository Repository
(Andy) (Bobby)
Andy
Bobby
64
Local Local
Repository Repository
(Andy) (Bobby)
Andy
Bobby
65
4.3. Vocabulary
• Repository (source control repository)
• A server that stores the files (documents)
• Keeps a change log
• Revision, Version
• Individual version (state) of a document
that is a result of multiple changes
• Check-Out, Clone
• Retrieves a working copy of the files from a
remote repository into a local directory
• It is possible to lock the files
66
Vocabulary
• Change
• A modification to a local file (document) that is under version
control
• Change Set / Change List
• A set of changes to multiple files that are going to be committed
at the same time
• Commit, Check-In
• Submits the changes made from the local working copy to the
repository
• Automatically creates a new version
• Conflicts may occur!
67
Vocabulary
• Conflict
• The simultaneous change to a certain file by multiple users
• Can be solved automatically and manually
• Update, Get Latest Version, Fetch / Pull
• Download the latest version of the files from the repository to
a local working directory + merge conflicting files
• Undo Check-Out, Revert / Undo Changes
• Cancels the local changes
68
Vocabulary
• Merge
• Combines the changes to a file changed locally and
simultaneously in the repository
• Can be automated in most cases
• Label / Tag
• Labels mark with a name a group of files in a given version
• For example a release
• Branch / Branching
• Division of the repositories in a number of separate
workflows
69
User Y
B Version B Branch
Check Out
D
Merge E
Check In
70
4.4. Tools
13
What is Git?
• Git
• Distributed source-control system
• Work with local and remote repositories
• Git bash – command line interface for Git
• Free, open-source
• Has Windows version (msysGit)
• http://msysgit.github.io
• https://www.atlassian.com/git/tutorials/setting-up-a-repository
72
Installing Git
74
• Check the status of your local repository (see the local changes)
git status
• Creating a new local repository (in the current directory)
git init
• Creating a remote (assign a short name for remote Git URL)
git remote add [remote name] [remote url]
• Pushing to a remote (send changes to the remote repository)
git push [remote name] [local name]
75
Using Git: Example
mkdir work
cd work
git clone https://github.com/SoftUni/test.git dir
cd test
dir
git status
(edit some file)
git status
git add .
git commit -m "changes"
git push
76
• Google Code –
http://code.google.com/projecthosting/
• Source control (SVN), file release, wiki, tracker
• Very simple, basic functions only, not feature-
rich
• Free, all projects are public and open source
• 1-minute signup, without heavy approval
process
• SourceForge – http://www.sourceforge.net
• Source control (SVN, Git, ...), web hosting,
tracker, wiki, blog, mailing lists, file release,
statistics, etc
78
Project Hosting Sites
• CodePlex – http://www.codeplex.com
• Microsoft's open source projects site
• Team Foundation Server (TFS) infrastructure
• Source control (TFS), issue tracker, downloads, discussions,
wiki, etc.
• Free, all projects are public and open source
• Bitbucket – http://bitbucket.org
• Source control (Mercurial), issue tracker, wiki, management
tools
• Private projects, free and paid editions
79
Bitbucket demo
80
Open questions
1. Here is an activity graph with time estimates for each activity in weeks