System design
Design is first step moving from problem domain to solution domain. Design is plan for solution for a system. Designing start when specification document are available.
Designing process has two levels:
1- System Design
2- Detailed Design
1- System Design: It is first level, the focus is on deciding which modules are needed for system i.e. specification of module & how these modules are interconnected.
2- Detailed Design: It is 2nd level, the focus is on internal design of module. Actually detailed design is extension of system design.
For designing, there are various methodologies
A designing methodology is systematic approach to creating a design by application of set of technique or guidelines.
Design objective: The design of system will be correct if it has following properties:
1- Verifiability
2- Completeness
3- Efficiency
4- Consistency
5- Traceability
6- Simplicity
A design should be clearly verifiable, complete and traceable. However two important properties that concern design are efficiency and simplicity.
Efficiency of system is concerned with proper use of scares resources by the system. The need for efficiency arises due to cast consideration. An efficient system is one that consumes less processor time and less memory.
Simplicity: Simplicity is important feature for criteria because maintainability becomes very easy.
Design principle: there are some basic principles which effectively handle the complexity of design process.
1- Problem Partitioning: With partitioning we can able to maintain system design.
2- Abstraction: The basic goal of system design is to specify the module in system and their abstraction.
Functional abstraction: A module is specified by the function, it perform. A module computes the value of log represented by function log. eg A module compute sine of value can be abstractly represented by function sine.
Data abstraction: An entity in the real world provides some services to the environment to which it belongs. Often entity provides some predefined services. Data abstractions are basics of object oriented design.
In using abstraction, a system is viewed as a set of objects providing some services. Hence decomposition of system is done with respect to the objects the system contains.
3- Top to bottom, bottom to top
Module level concept: A system is modular if any component adds or removes, no effect on system. Every part is almost independent.
Coupling: Two modules are independent if one module can perform function completely without presence of other, if two modules are independent, they are solvable and modified separately.
Coupling is strength of interconnection between modules or measure of interdependence among modules. Higher coupled module is joined strongly while loose coupled modules are joined weakly.
Independent module has no coupling.
There are some major factors determining coupling b/w modules.
1- Type of connection between modules.
2- Complexity of interface.
3- Type of information flow b/w modules.
1- Type of connection means direct/indirect.
2- Complexity of interface affect on coupling if more complex interface, higher will be degree of coupling.
3- Type of information affect on coupling data or control.
Transfer of data information means a module passes as input some data to another module & get in return some data as output which result in low coupling. Transfer or receive back control information means control of module in other hand. It has high degree of coupling.
Cohesion: coupling is reduced when there is no bond between modules. Cohesion of module represent bound internal element of modules are one another. Cohesion and coupling are clearly related. Usually greater the cohesion of each module, lower will be coupling. There are several level of cohesion
1- Coincidental
2- Logical
3- Temporal
4- Procedural
5- Communicational
6- Sequential
7- Functional
1- Coincidental cohesion occurs when there is no meaningful relationship among element of module.
2- Logical cohesion: If there is some logical relationship occur b/w the element of a module. e.g. it performs all inputs/output.
3- Temporal cohesion: It is same as logical except element are relates to time & are executed together. e.g clean up, initialization.
4- Procedural: It contains element that belong to common procedural unit. E.g. loop.
5- Communicational: The elements of communication module are related by a reference to same input or output data. E.g. print or punch record.
6- Sequential: in sequential cohesion output of one element will be input of another.
7- Functional: functional cohesion is strongest. All elements perform single function. E.g. sort the array.
Design Methodology
The aim of design methodology provides guidelines to designer.
1- Structure charts: The SDM (structure design methodology) design is represented by structure chart. Every computer program has structure. The structure chart of program is graphic representation of its structure. In structure chart, a module is represent by box. Arrow from module A to module B show A invokes B. B is called subordinate of A. A is super ordinate.
2- Input, output, transform and co-ordinate: Modules in system are categorized into various classes.
Structure design methodology aims to control and influence the structure of a program. So our structure will be simple and understandable.
For determining the structure of program there are four major steps in SDM
1- Relate problem as data flow graph.
2- Identify input and output data elements
3- First level factoring
4- Factoring of input, output and transform branches.
Design methodology – object oriented approach
Structure design methodology concentrates on functional aspect of problem.
Object- oriented approach based on concept of data abstraction.
Before discuss object oriented approach, object to be package of information together with operation perform on that information.
In other words objects supports data abstraction object consider an entity which encapsulates the object data and provide the user with a set of predefined operation to manipulate and access the object data.
Functional approach vs object oriented
approach
1- In object oriented design, decomposition of system based upon object. During design, object considered as basic units in which system is decomposed. In functional method, each module represents a function or an operation to perform activity in the system.
2- According to functional view, module consists of data items which represent same data items that represent some information and a set of procedure that manipulate the data. There is clear separation of data from procedural in functional view.
In object oriented view, data and procedure are dependent. In object, object data and operations defined on object & depend on other.
e.g. A programmer implement a stack, with push and pop operations.
In functional approach, there are two sub problems of defining data and designing two functions. (Push and pop)
In object oriented approach, data and operation are consider together & view as part of a single object which show behavior of stack.
Monitoring and control
1- Check the cost and schedule during designing.
2- S/w size are according to requirements.
3- Designing structure charts & computer time.
4- Review the designing.