Object-Orientation: Wolfgang Emmerich
Object-Orientation: Wolfgang Emmerich
Wolfgang Emmerich
The aim of this first lecture is to set the scene for this module. We
shall try to theme each lecture by a question. During this session
we are going to answer the question: What is object-orientation all
about, what is its evolution and how can it be positioned with
respect to other (structured) methods?
1
Outline
2
Software System Complexity
The first lines on this slide include the definition of complexity from
the Oxford English Dictionary.
In the world of software systems, we would therefore be looking at
complex examples, such as retail banking systems, mobile phone
switches, airline reservation systems, component warehouse
systems and process control systems of, say a nuclear power
plant.
The complexity in software systems arises from a number of
properties software systems have in common with any system of
size. These systems are developed by a team of developers, often
in a lengthy process. The size of the system is such that individuals
can no longer fully comprehend the system. They are difficult to
document and test. They may be inconsistent and incomplete and
they radically change in order to meet changing requirements.
Please note that the complexity that we are interested in here is
macro complexity, i.e. the reflection of complex processes and
information of the real world in a software system, as opposed to
micro complexity of algorithms that complexity theory, a research
field of theoretical computer science is interested in.
The physical sciences have, in many cases, provided fundamental
natural laws to explain complexity and its phenomena, eg
gravitation or thermodynamics. Software engineering, by reason of
its social content, is in some ways closer to the social sciences
and cannot yet provide any such laws.
On the next slide we are going to provide a more theoretical view of
complexity from one of the founders of object-oriented methods...
3
Reasons for Complexity
In [Booc94], Grady Booch identifies four major reasons for complexity of any
system that has an intensive software component.
The first reason is related to the application domains for which the software
system is being constructed. The people who have the knowledge and skills to
develop software usually do not have detailed domain knowledge and they
need to acquire the requirements for the software system from that particular
domain. Also these requirements are usually not stable but evolve. They evolve
during the construction of the system as well as after its delivery requiring
continous evolutions of the system. Complexity is often increased in trying to
preserve the investments that were made in legacy applications. Then
components addressing new requirements have to be integrated with existing
legacy applications and interoperability problems caused by the heterogeneity
of different system components introduces new complexity.
The second reason is the complexity of the software development process.
Complex software intensive systems cannot be developed by single developers
but rather require teams of developers to work on it. This adds additional
overhead as the developers have to communicate about the development effort
and about intermediate artefacts they produce in order to make them as
consistent and complete as possible. This complexity often gets even more
difficult to handle if the teams do not work in one location but are geographically
dispersed. Then the management of these processes becomes an important
subtask on its on and they need to be kept as simple as possible.
On the next slide, we are going to review the third and fourth reasons...
4
Reasons for Complexity (continued)
5
Systems and Subsystems
Software systems are systems itself and let us now focus on the
definition of a system. The quote on the top of this slide gives the
definition of a system from the Oxford English Dictionary.
Checkland and Scholes define systems in [CS90] to have a clear
boundary an embedding into its operating environment, a
homogeneous character and an emergent property as a whole.
These considerations apply to software systems as well. They have
to be properly bounded in the sense that it has to be defined which
operations are being performed within the system and which parts
are being performed without the system. They have to be properly
embedded into their environment. The should have a unique
character, which is often expressed in terms of the non-functional
requirements the system should meet and they have an emergent
property in the sense that only the whole software system renders
its components useful.
Complex systems are constructed by interconnecting subsystems,
which are increasingly often systems on their own rights.
Interconnecting subsystems: personal computer (I/O, processor,
memory), weather system (atmosphere, oceans, land masses),
local ecology (soil, buildings, micro-climate, users)
If these subsystems are constructed independently, there is a
certain potential for inconsistencies and incongruities that usually
are undesirable. According to Checkland and Scholes, the results
of inconsistencies are disasters, such as smog or pests. With
software systems these inconsistencies and incongruities
materialise in requirements that are not met, system malfunctions
and crashes.
6
Attributes of Complex Systems
8
Class vs. Object Structure
D1 Objects
C1
C3 D2 D3
C2
C4 D4
C5 D5 D6
C7
D7
C6
s D8
l a sse
C
Wolfgang Emmerich, 1998/99 9
9
Approaching a Solution
10
Abstraction & Hierarchy
11
Decomposition
12
A function/data composition
Transaction
Get
transaction
Open Withdraw
Deposit
13
An object-oriented Decomposition
Open
Deposit
Withdraw
Account
ihs ihs
ihs
14
Adding a new Market Account
Transaction
Get
transaction
Open Withdraw
Market Market
Open Deposit Withdraw
Market
Deposit
15
Adding a new Market Account
Open
Deposit
Withdraw
Account
ihs ihs
ihs
Market
Account
16
Model of OO Development
Dynamic Model
Static Model Class structure
Logical Object
Class structure
structure
Model Object structure
Class structure
Physical Object structure
Module architecture
Model Process architecture
17
History of Object-Orientation
Time DCOM Java UML
COM
CORBA
1990 OOAD
DCE Eiffel
C++
Information Hiding
1970
Simula-67
Distributed Systems Programming Languages Software Engineering
Wolfgang Emmerich, 1998/99
18
18
Structured Methods
19
Object-Oriented Methods
20
Suggested object-oriented Methods
21
Drawbacks of OO
22
Summary
Functional
decomposition
Complex Complex
Abstraction Hierarchy Decomposition
Real-world Software
System System
OBJECT
ORIENTATION