The document discusses several key principles of software engineering:
1. Modularity - Systems should be composed of independent modules that can be developed and reused independently.
2. Abstraction - Complexity is managed by abstracting away unnecessary details and focusing on essential aspects.
3. Separation of concerns - Different aspects of a problem are separated, so each can be addressed independently.
5. marcello.thiry@gmail.com
Principles form the basis of
methods and techniques
A systematic way of doing
something
https://upload.wikimedia.org/wikipedia/c
ommons/thumb/8/8f/PSM_V10_D029_A
ncient_fire_making_methods.jpg/800px-
PSM_V10_D029_Ancient_fire_making_
methods.jpg
(Ghezzi, Jazayeri & Mandrioli, 2003)
6. marcello.thiry@gmail.com
methods and techniques*
* For the purpose of this course
these terms will be used
interchangeably
How to plan...
How to test...
How to design...
How to code...
How to elicit requirements
How to estimate...
...
Observation, interviews, workshops, surveys...
7. marcello.thiry@gmail.com
A body of practices, procedures, and rules
System of methods and principles used
in a particular discipline
(Ghezzi, Jazayeri & Mandrioli, 2003)
12. marcello.thiry@gmail.com
List of Unified Modeling Language tools
https://en.wikipedia.org/wiki/List_of_Unified_Modeling_Language_tools
List of diagramming tools
http://www.diagramming.org/
Data Modeling Tools
http://toolsfordatabases.com/data-modeling-tools.html
Comparison of data modeling tools
https://en.wikipedia.org/wiki/Comparison_of_data_modeling_tools
Test management tools
https://en.wikipedia.org/wiki/Test_management_tools
List of GUI testing tools
https://en.wikipedia.org/wiki/List_of_GUI_testing_tools
List of web testing tools
https://en.wikipedia.org/wiki/List_of_web_testing_tools
Comparison of project management software
https://en.wikipedia.org/wiki/Comparison_of_project_management_software
List of build automation software
Configuration, Build, Integration, ...
https://en.wikipedia.org/wiki/List_of_build_automation_software
Application lifecycle management (ALM)
https://en.wikipedia.org/wiki/Application_lifecycle_management
Try on...
…
18. marcello.thiry@gmail.com
Leonardo da Vinci
(1452-1519)
“…Leonardo da Vinci employed a
variety of techniques ...”
“One of his most well-known paintings,
the Mona Lisa, displays some of the
techniques used by da Vinci in its
grandeur.”
http://www.davincilife.com
19. marcello.thiry@gmail.com
Software engineering must be practiced
systematically
Rigor is a necessary complement to
creativity which increases confidence
in the results of the development
Precision, exactness
20. marcello.thiry@gmail.com
Rigor
enables repeatability and allows teams
to avoid problems experienced in past
projects
What level of discipline set of rules we
need to…
… produce products with higher reliability, greater
quality while controlling costs and meeting
expectations?
21. marcello.thiry@gmail.com
So, rigor varies in degree!
We need to use the appropriate amount
http://mcx.sourceforge.net/upload/matlab_mmclab.pnghttp://www.mathworks.com/products/matlab/
http://4.bp.blogspot.com/-
IyHsfT1sB1A/UhTQdRV8opI/AAAAAAAABiI/H2R3X1OmAUg/s1600/V
NLIVES.NE-Simple-calculator-01.png
22. marcello.thiry@gmail.com
Formality is rigor at the highest
degree
Allows automation tools
A formal practice is where software systems
can be verified by mathematical laws
Formal methods petri nets, z, …
The source code is written in a formal
language
25. marcello.thiry@gmail.com
https://en.wikipedia.org/wiki/
Edsger_W._Dijkstra
“The term separation of concerns
was probably coined by Dijkstra in
his 1974 paper On the role of
scientific thought”
Edsger Wybe Dijkstra
(1930-2002)
A pioneer in the fields of computer
science and computational physics.
Among many contributions, he coined
the phrase "structured programming"
and discovered the algorithm for the
shortest path in a graph, which now
bears his name.
http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD447.html
Paper "On the role of scientific thought" transcribed by Richard Walker:
https://en.wikipedia.org/wiki/Separation_of_concerns
26. marcello.thiry@gmail.com
The only way to master the complexity of
a project is to separate the different
concerns
Time
Qualities
Views
Parts
Skills
http://www.crochetville.com/community/uploads/monthly_06_2013/post-48806-0-42116700-1370920781.jpg
29. A complex system can be partitioned in
smaller and simpler units or parts
MODULES
http://www.brickshop.co.uk/bricks-16-c.asp http://www.lego.com/ http://constructionweekonline.com//pictures/LEGO_Sungnyemun.jpg
36. marcello.thiry@gmail.com
https://en.wikipedia.org/wiki/
Niklaus_Wirth
In 1971, Niklaus Wirth, wrote the
influential paper Program Development
by Stepwise Refinement. Today, we refer
to this approach as top-down design (or
top-down decomposition).
Niklaus Emil Wirth
(1934-)
A Swiss computer scientist, best known for
designing several programming languages (Algol
W, Pascal, Modula, Modula-2, Oberon, Oberon-
2, Oberon-7) and for pioneering several classic
topics in software engineering. In 1984 he won
the Turing Award for developing a sequence of
innovative computer languages. He designed
the simple programming language PL/0 to
illustrate compiler design. It has formed the
basis for many university compiler design
classes.
http://oberoncore.ru/_media/library/wirth_program_development_by_stepwise_refinement2.pdf
“Program Development by Stepwise Refinement” (1971)
37. marcello.thiry@gmail.com
TOP-DOWN Considerations
+ -
Logical, well-organized
thought discipline
Allows to split large teams
into groups and assign them
to different subsystems
Works very well for small
projects
Focus on functional
requirements
Thinking of a system as
just one function top
Premature decisions, less
prepared for changes
Reuse is more difficult
Defers coding and testing
Increases chance of having
unwanted dependencies
41. marcello.thiry@gmail.com
BOTTOM-UP Considerations
+ -
Allows earlier coding and
testing
Potentializes reuse, simpler
to incorporate and test pre-
existing modules
Better prepared for changes
Without some forethought,
modules can be difficult to
link together
Focus is not on specific
requirements results may
not fulfill a given need
Hard to do a entire system
from bottom-up
Better suited to small
groups
43. marcello.thiry@gmail.com
In practice, large systems design is never truly top-down
TOP-DOWN X BOTTOM-UP
Some branches are designed before others
Designers reuse experience and modules
Both allow us to understand the relations
between high and low-level views of a system
(Sommerville, 1995)
Hybrid design
Combine both to potentialize understanding, information hiding
and reuse
45. marcello.thiry@gmail.com
https://en.wikipedia.org/wiki/
David_Parnas
The concept of information hiding was
first described by Parnas in his paper On
the Criteria to be Used in Decomposing
Software into Modules (1972)
David Lorge Parnas
(1941-)
Canadian early pioneer of software engineering,
who was one of the first to recognize the
importance of software structure. He developed
the concept of information hiding in modular
programming, which is an important element
of object-oriented programming today. He is
also noted for his advocacy of precise
documentation.
https://www.cs.umd.edu/class/spring2003/cmsc838p/Design/criteria.pdf
“On the Criteria to be Used in Decomposing Software into Modules” (1972)
46. marcello.thiry@gmail.com
Account
getNumber : int
deposit float
withdraw float
getBalance : float
Encapsulation + Information hiding
IMPLEMENTATIONINTERFACE
http://thumbs.dreamstime.com/t/manikin-keep-distance-
orange-cartoon-character-red-text-30647683.jpg
Client modules depend only on the interface
Continuity: small changes have localized effects
Increases reusability and substitutability
Protection: fault isolation
(Meyer, 1988-1997)
47. marcello.thiry@gmail.com
Account
getNumber : int
deposit float
withdraw float
getBalance : float
All the elements of a module
must belong together
Cohesion: internal measure
GOAL: HIGH COHESION
All the elements share the same
purpose
Understandability of a module
in isolation
48. The single responsibility principle
Martin*, 1995
*Robert Martin is commonly known as Uncle Bob
http://wordlesstech.com/wp-content/uploads/2010/12/swiss-army-knife-giant-elite1.jpg
https://lostechies.com/gabrielschenker/2009/01/21/real-
swiss-don-t-need-srp-do-they/
By Gabriel Schenker
49. Reason to change
SINGLE PART of all functionality
Encapsulation cohesion
Anticipate how the class could evolve
A class should have only one
reason to change
RESPONSIBILITY
54. marcello.thiry@gmail.com
Every module communicates with as few
other modules as possible
Coupling: external measure
modules interdependency
GOAL: LOW COUPLING
Reducing coupling
+ Understanding
Meyer, 1988-1997
+ Testability
+ Modifiability
+ Reusability
56. marcello.thiry@gmail.com
Add new behaviors to satisfy the
changes
Open for extension
But without changing the source code
of the existing modules
Closed for modification
65. marcello.thiry@gmail.com
Module as a package...
Provides unique namespace
Encapsulates classes, interfaces and
resources
Access rules: package visibility
66. marcello.thiry@gmail.com
Module as a library...
Contains one or more packages
Piece of code with no internal state and
a public API
In Java, the boundaries of a JAR are not
clear once deployed on the class path
67. marcello.thiry@gmail.com
Module as a class...
Can be instantiated multiple times
Can implement different interfaces
Classes and single responsibility
Granularity?
70. marcello.thiry@gmail.com
But be careful…
You must ignore only
those details which
can be really ignored
What to
do here???
http://www.convio.com/common-ground/assets/crazy_sm.jpg
71. marcello.thiry@gmail.com
Abstraction
Special case of separation of concerns
Technique to master complexity
Important aspects x Less important details
What we abstract away and consider as a detail that
may be ignored depends on the observer and on the
problem been observed
Modeling, diagramming, prototyping, defining
equations, …
75. Software
changes all
the time
New features Improvements
in existing
features
Correction
of defects
Performance
improvements
Adaptation due to changes
in law, regulations,
environment ex: DBMS, OS
80. marcello.thiry@gmail.com
How to support maintainability?
Configuration Management tools
Version control
Change management
Integration
Repositories
Reusable components
Documentation
84. marcello.thiry@gmail.com
Try to discover if it is an instance of a
MORE GENERAL PROBLEM
While solving a problem...
Sometimes a general problem is easier to solve
than a special case
Maybe, the solution can be reused in
other cases
You need to balance generality
against performance and cost
But...
85. Liskov substitution principle
Liskov, 1987
*Keynote address: data abstraction and hierarchy, OOPSLA '87
http://dl.acm.org/citation.cfm?id=62141
If an object X of type T has a method P
that behaves in a defined way
The object Y of type S, where S is a
subtype of T, should have the same method
P behaving the same way
86. Liskov substitution principle
Liskov, 1987
*Keynote address: data abstraction and hierarchy, OOPSLA '87
http://dl.acm.org/citation.cfm?id=62141
You should depend on the interfaces
rather than class types
It is all about semantics!
89. marcello.thiry@gmail.com
Deliver subsets of a system early to get early feedback from expected
users, then add new features incrementally
Deliver a first prototype and then incrementally add effort to turn
prototype into product
Process proceeds in a stepwise fashion increments
user
FeedbackDelivery
user
Feedback
user
Delivery Delivery
Examples process
Development
user
Inc #1 Inc #2 Inc #N
Development Development
90. marcello.thiry@gmail.com
References.
(Ghezzi, Jazayeri & Mandrioli, 2003). Fundamentals of Software Engineering. 2nd ed. Pearson Education.
(ISO/IEC 25010, 2011). Systems and software engineering — Systems and software Quality Requirements
and Evaluation (SQuaRE) — System and software quality models.
(Martin, 1995). https://groups.google.com/forum/?hl=en#!topic/comp.object/WICPDcXAMG8.
(Meyer, 1997). Object-Oriented Software Construction. 2nd ed. Prentice Hall.
(Sommerville, 2015). Software Engineering. 10th ed. Pearson.