The author defines software design
as a scheme of turning a specification of a computer program
into an operational program. Design links requirements specification
to coding and debugging
. The author points out that design is a heuristic
process and requires creativity and insight.
The author tries to distinguish between designs done in large and small projects. In large projects, design might be an activity distinct from requirements and coding and carried out by different set of people. The design may be divided in several stages like software architecture
, high-level module design and detailed implementation design. Design work continues even after the design phase is over.
On small projects, design might involve just writing the PDL before coding it in the programming language
.
The author then discusses design at different levels:
. The author defines the object-oriented design
process as identification of real-world and abstract objects and representation of this objects by programming language objects. The author clarifies that object-oriented design
works at a higher level of abstraction than structured design
and the building of design is based on the data which makes it more stable approach.
The author then discusses following ideas related to object-oriented programming
:
:
The author then compares following popular design approaches:
The author tries to distinguish between designs done in large and small projects. In large projects, design might be an activity distinct from requirements and coding and carried out by different set of people. The design may be divided in several stages like software architecture
On small projects, design might involve just writing the PDL before coding it in the programming language
The author then discusses design at different levels:
- Division into subsystems: This involves identification of major components in the software
and interfaces/interaction between them.
- Division into modules: If a subsystem is too big to translate to module, this level ensures that the subsystem has been decomposed to a level of detail fine enough to implement it as a set of modules.
- Division into routines: This involves dividing a module into service routines and specifying syntactic details of service routines.
- Internal routine design: This requires writing PDL, investigating algorithms
, deciding on organization of code and then coding in programming language.
- Top Down Decomposition: It is also called top-down design or stepwise refinement. It involves moving from a general statement of what the program does to detailed statements about specific tasks that are performed. Following steps should be followed in top down decomposition:
- Design top levels first before moving to lower levels
- Avoid language specific details
- Postpone details to lower level design
- Formalize and Verify each level
- Move to next level for next set of refinement
The author compares the technique with divide and conquer
. The author advises to continue decomposition until it seems it is easier to code then decompose.
- Bottom Up Composition: Following steps need to be followed in bottom up decomposition:
- Identify low level capabilities from the description of the problem
- Identify common aspects of low level capabilities and group them
- Continue with the next level up
- It is easy
- Implementation details can be deferred
- Systems not hierarchical in nature are difficult to design using this approach
- This approach requires single function at the top which is different from modern event driven systems
- Top level function of a system is hard to identify
- It identifies utility routines early which results in compact design
- It results in a lot of reuse
- This approach cannot be used exclusively. It needs to be combined with top-down approach.
- Sometimes it becomes difficult to assemble pieces to build the system.
The author then discusses following ideas related to object-oriented programming
- Abstraction: Object oriented design
allows to ignore irrelevant details.
The unit of abstraction in structured design is a function while in object-oriented design; it is an object. Since object has both functions and data, object-oriented design
provides bigger intellectual building blocks than structured design.
- Encapsulation: It involves principles of information hiding.
- Modularity: It is nothing but grouping of related services and data into modules that are highly cohesive and loosely coupled.
- Hierarchy and Inheritance: This involves identifying similarities and differences between different objects.
- Objects and classes
- Identify objects and their attributes
- Determine what can be done to each object
- Determine what each object can do to other objects
- Determine parts of each object that will be visible
- Define each object's public interface
- Problem Domain Component
- User Interface Component
- Task Management Component
- Data Management Component
The author then compares following popular design approaches:
- Structured Design
: It works well for systems with several hundred lines of code.
- Information Hiding: This approach should be used whenever possible.
- Object Oriented Design: It works well for systems with more than hundred thousand to over a million lines of code.
- Design is a sloppy process
- Design is a wicked problem
- Design is a heuristic process: The author provides reference to G Polya's book, How to Solve It and summarizes the approach that he suggested in his book.
- Intellectual Manageability
- Low Complexity
- Ease of Maintenance
- Minimal Connectedness
- Extensibility
- Reusability
- High fan-in
- Low to medium fan-out
- Portability
- Leannes
- Stratified Design
- Standard Techniques
No comments:
Post a Comment