Design Processes: - : Corollary 4 Corollary 1 Axiom 1 Corollary 2 Axiom 2 Corollary 3
Design Processes: - : Corollary 4 Corollary 1 Axiom 1 Corollary 2 Axiom 2 Corollary 3
Design Processes: - : Corollary 4 Corollary 1 Axiom 1 Corollary 2 Axiom 2 Corollary 3
Design Processes – Design Axioms – Class Design – Object Storage – Object Interoperability
Design Processes: -
o During the design phase the classes identified in OOA must be revisited with a shift in focus to
their implementation. New classes or attributes & methods are to added for implementation
purposes & user interfaces
o The object–oriented design process consists of following activities
1. Apply design axioms to design classes, their attributes, methods, associations, structures &
protocols. It constitutes two separate steps
⇒ Refine & complete the static UML class diagram by adding details. This steps consists of
Refine attributes
Design methods & protocols by UML activity diagram to represent method’s algorithm
Refine associations between classes (if required)
Refine class hierarchy & design with inheritance (if required)
⇒ Iterate and refine again
2. Design the access layer
⇒ Create mirror classes: For every business class identified & created, create one access class
⇒ Identify access layer class relationships
⇒ Simplify classes & their relationships: Main goal – eliminate redundant classes & structures
Redundant classes: Don’t keep 2 classes that performs |||lr translate request & results
Method classes: Try to eliminate classes with 1 or 2 methods by combining with others
⇒ Iterate & Refine again
3. Design the view layer classes
⇒ Design the macro level user interface, identifying view layer objects
⇒ Design the micro level user interface, which includes the following activities
Design view layer objects by applying the design axioms & corollaries
Build a prototype of view layer interface
⇒ Test usability & user satisfaction
⇒ Iterate and refine
4. Iterate & refine the whole design. Reapply design axioms, if needed repeat preceding steps
o Design must be traceable across requirements, analysis, design, code & testing. There must be
clear step–by–step approach to design from the requirements model. All designed components
must directly trace back to user requirements
Design Axioms: -
o An axiom is a fundamental truth that always is observed to be valid and for which there is no
counterexample or exception. They are hypothesized from a large number of observations by
noting the common phenomena shared by all cases
o A theorem is a proposition that may not be self–evident but can be proven from accepted axioms
o A corollary is a proposition that follows from an axiom or another proposition that has been proven
o As per Suh’s design axioms to OOD, two axioms are followed
⇒ Axiom 1: Independence Axiom. Maintain the independence of components
⇒ Axiom 2: Information Axiom. Minimize the information content of the design
o Axiom 1 states that, during the design process, as we go from
requirement and use case to a system component, each
Corollary 4
component must satisfy that requirement without affecting
other requirement Corollary 1
o Axiom 2 is concerned with simplicity. Occam razor says that
“The best theory explains known facts with a minimum Axiom 1
among of complexity and maximum simplicity &
Corollary 2
straightforwardness”
Axiom 2
Corollaries: -
o Many corollaries may be derived as a direct consequence of Corollary 3
axioms. These corollaries may be more useful in making
specific design decisions, since they can be applied to actual Corollary 6 Corollary 5
situations more easily than original axioms. They are also
called design rules and are derived from 2 basic axioms
o Corollary 1: Uncoupled design with less information content.
◊ Highly cohesive objects can improve coupling because only a minimal amount of essential
information need be passed between objects.
U – III 2
◊ The main goal here is to maximize objects cohesiveness among objects & s/w components in
order to improve coupling because only a minimal amount of essential information need be
passed between components
◊ Coupling is a measure of strength of association established by a connection from one object or
s/w component to one another.
◊ The degree or strength of coupling between two components is measured by amount &
complexity of information transmitted between them. Coupling increases (becomes stronger)
with increasing complexity or obscurity of the interface
◊ Interaction coupling involves amount & complexity of messages between components. It is
desirable to have little interaction.
◊ Inheritance is a form of coupling between super and sub classes. A sub class is coupled to its
superclass in terms of attributes and methods
◊ Cohesion reflects the “single–purposeness” of an object. Method cohesion function cohesion
means that a method should carry only one function. A method that carries multiple functions
is undesirable. Class cohesion means that all the class’s methods & attributes must be highly
cohesive meaning to be used by internal methods or derived classes’ methods.
o Corollary 2: Single Purpose. Each class must have a single, clearly defined purpose. When we
document, we should be able to easily describe the purpose of a class in a few sentences
o Corollary 3: Large number of simple classes. keeping the classes simple allows reusability.
◊ The smaller are classes, the better are chances of reusing them in other projects. Large &
complex classes are too specialized to be reused
◊ The primary benefit of s/w reusability is higher productivity. The s/w development team that
achieves 80% reusability is 4 times as productive as team that achieves 20% reusability
o Corollary 4: Strong mapping. There must be a string association between the physical system
(analysis’s object) & logical design (design’s object)
o Corollary 5: Standardization. Promote standardization by designing inter changeable components
and reusing existing classes or components
o Corollary 6: Design with inheritance. Common behavior (methods) must be moved ro super
classes. The superclass–subclass structure must make logical sense
Design Patterns: -
o Design patterns are devices that allow systems to share knowledge about their design. These
describe commonly recurring problems
o A perfect design pattern has the following documentation concepts
Pattern Name: Façade
Rationale & Motivation: The façade pattern can make the task of accessing a large number of
modules much simpler by providing an additional interface layer.
Classes: In façade system at least 4 or more classes are required: client, façade & classes
underneath façade. In typical situation, façade would have a limited amount of actual code,
making calls to lower layers most of time
Advantages/ disadvantages: The primary advantaged is making interfacing between many
modules or classes more manageable. One possible disadvantage is that we may lose some
functionality contained in lower level of classes which depends on how the façade designed
Examples: Imagine a client request program a room that is used to view objects all in room.
Using a design pattern façade eliminates the need for the client class to deal with a large
number of classes
Client
Façade
Something
U – III 3
Designing Classes: -
o The single most important activity in designing an application is coming up with a set of classes
that works together to provide the needed functionality. Underlying the functionality of any
application is the quality of its design
o OOD Philosophy: A great benefit of OO approach is that classes organize related properties into
units that stand on their own. Applying design axioms and carefully designed classes can have a
synergistic effect, not only on the current system but on its future evolution
o UML – OCL: UML is a graphical language with a set of rules & semantics in English in form of
OCL. Object Constraint Language (OCL) is specification language that uses simple logic for
specifying properties of a system. Syntax of some common navigational expressions is shown here
◊ Item.selector: The selector is name of an attribute in item. The result is the value of attribute
◊ Item.selector [qualifier–value]: The selector indicates a qualified association that qualifies the
item. Result is related object selected by qualifier, eg., array indexing as form of qualification.
◊ Set Æ select (Boolean–expression): Boolean expression is written in terms of objects within set
o Designing Classes – The Process: It constitute of step 1 of OOD process is an iterative process and
at each iteration, the design has been improved
o Class visibility: The main objective is designing well defined public, private & protected protocols
∝ Public protocols define the functionality & external messages of an object; private protocols
define implementation of an object
∝ Private Protocol (visibility) of class includes messages that normally should not be sent from
other objects. In protected protocol (visibility), subclasses use method in addition to class itself
∝ The problem of encapsulation leakage occurs when details about a class’s internal
implementation are disclosed through the interface
o Refining Attributes: Attributes identified in OOA must be refined on implementation during this
phase. In design phase, detailed information must be added to the model. The main goal is to
refine existing attributes or add attributes that can elevate the system into implementation
∝ Attribute Types: The three types of attributes are 1. Single–value attributes 2. Multiplicity or
multivalue attributes and 3. Reference to another object, or instance connection
∝ UML Attribute representation: The following is attribute presentation suggested by UML
Visibility name: type–expression = initial–value where visibility is one of following
+ public visibility (accessibility to all classes)
# protected visibility (accessibility to subclasses & operations of class)
⎯ private visibility (accessibility only to operations of the class)
Type–expression is language–dependent specification of implementation type of an
attribute. Initial value is language–dependent expression for initial value of newly created
object and is optional. Multiplicity indicated by placing a multiplicity indicator in brackets
o Common Object Request Broker Architecture (CORBA): It was a standard proposed as a means to
integrate distributed heterogeneous business applications & data.
o The CORBA interface definition language (IDL) allows developers to specify language–neutral,
Object oriented interfaces for application & system components. IDL definitions are stored in an
interface repository, a sort of phone book that offers object interfaces & services which is central to
communication among objects located on different systems
o CORBA object request brokers (ORBs) implement a communication channel through which
applications can access object interfaces and request data & services. CORBA common object
environment (COE) provides system level services such as life cycle management of objects, event
notification between objects & transaction and concurrency control
Multi–Database Systems: -
o Heterogeneous information systems facilitate the integration of heterogeneous information sources,
where they can be structured, semi –structured & some times unstructured. Such heterogeneous
information systems are referred to as federated multi-database systems
o A multi-database systems (MDBS) is a database system that resides unobtrusively on top of, say,
existing relational and object databases & file systems & presents a single database illusion to users
o The global schema is constructed by consolidating (integrating) the schemata of local databases;
schematic differences (conflicts) among them are handled by neutralization (homogenization), the
process of consolidating the local schemata
o The distinctive characteristics of multi-database systems: -
∝ Automatic generation of a unified global database schema from local databases, in addition to
schema capturing and mapping for local databases
∝ Provision of cross–database functionality (global queries, transactions) by unified schemata
∝ Integration of heterogeneous database systems with multiple databases
∝ Integration of data types other than relational data through use of tools – driver generators, etc
∝ Provision of a uniform but diverse set of interfaces (e.g. an SQL –style & C++) to access &
manipulate data stored in local databases
o Open Database Connectivity: Multi-database Application Programming interfaces: The benefits of
being able to port database applications by writing to an API for a virtual DBMS are so appealing
to s/w developers that computer industry recently introduced several multi-database API’s
Mirror business
Class package
Business layer objects Mirror Super-sub
Not done relationships Not done Has no
Define persistent
relationships Data
View layer objects
Normalize classes
and relationships Normalize classes
and relationships
User
Done
Done
O O
o Another approach is to let the methods to stored in a program & store only the persistent attributes
and modified process constitutes the following steps
1. Determine if the class has any persistent data
2. Mirror the business class package
3. Define relationships
4. Simplify classes and relationships
5. Iterate and refine
Questions: -
5 marks
1. What are the major components of object – oriented design process?
2. Write short notes on object – oriented database.
3. What are the two object oriented design axiom? Explain.
4. List the various rules to avoid bad design and explain.
10 marks
1. Explain major corollaries used for designing a system.
2. Discuss the major corollaries used for designing a system in an object oriented method.