0% found this document useful (0 votes)
42 views7 pages

Design Principles

NOTHING

Uploaded by

Anifer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views7 pages

Design Principles

NOTHING

Uploaded by

Anifer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

DESIGN PRINCIPLES

Software design principles are concerned with providing means to handle the
complexity of the design process effectively. Effectively managing the complexity
will not only reduce the effort needed for design but can also reduce the scope of
introducing errors during design.

Following are the principles of Software Design

 Problem partitioning
 Abstraction
 Modularity
 Top down & bottom up stratergy

Problem Partitioning

For small problem, we can handle the entire problem at once but for the significant
problem, divide the problems and conquer the problem it means to divide the problem
into smaller pieces so that each piece can be captured separately.

For software design, the goal is to divide the problem into manageable pieces.

Benefits of Problem Partitioning


1. Software is easy to understand
2. Software becomes simple
3. Software is easy to test
4. Software is easy to modify
5. Software is easy to maintain
6. Software is easy to expand

These pieces cannot be entirely independent of each other as they together form the
system. They have to cooperate and communicate to solve the problem. This
communication adds complexity.

Abstraction

An abstraction is a tool that enables a designer to consider a component at an abstract


level without bothering about the internal details of the implementation. Abstraction
can be used for existing element as well as the component being designed.

Here, there are two common abstraction mechanisms

1. Functional Abstraction
2. Data Abstraction
Functional Abstraction
i. A module is specified by the method it performs.
ii. The details of the algorithm to accomplish the functions are not visible to the
user of the function.

Functional abstraction forms the basis for Function oriented design approaches.

Data Abstraction

Details of the data elements are not visible to the users of data. Data Abstraction forms
the basis for Object Oriented design approaches.

Modularity

Modularity specifies to the division of software into separate modules which are
differently named and addressed and are integrated later on in to obtain the completely
functional software. It is the only property that allows a program to be intellectually
manageable. Single large programs are difficult to understand and read due to a large
number of reference variables, control paths, global variables, etc.

The desirable properties of a modular system are:

o Each module is a well-defined system that can be used with other applications.
o Each module has single specified objectives.
o Modules can be separately compiled and saved in the library.
o Modules should be easier to use than to build.
o Modules are simpler from outside than inside.

Advantages and Disadvantages of Modularity

In this topic, we will discuss various advantage and disadvantage of Modularity.

Advantages of Modularity

There are several advantages of Modularity

o It allows large programs to be written by several or different people


o It encourages the creation of commonly used routines to be placed in the
library and used by other programs.
o It simplifies the overlay procedure of loading a large program into main
storage.
o It provides more checkpoints to measure progress.
o It provides a framework for complete testing, more accessible to test
o It produced the well designed and more readable program.
Disadvantages of Modularity

There are several disadvantages of Modularity

o Execution time maybe, but not certainly, longer


o Storage size perhaps, but is not certainly, increased
o Compilation and loading time may be longer
o Inter-module communication problems may be increased
o More linkage required, run-time may be longer, more source lines must be
written, and more documentation has to be done

Modular Design

Modular design reduces the design complexity and results in easier and faster
implementation by allowing parallel development of various parts of a system. We
discuss a different section of modular design in detail in this section:

1. Functional Independence: Functional independence is achieved by developing


functions that perform only one kind of task and do not excessively interact with other
modules. Independence is important because it makes implementation more accessible
and faster. The independent modules are easier to maintain, test, and reduce error
propagation and can be reused in other programs as well. Thus, functional
independence is a good design feature which ensures software quality.

It is measured using two criteria:

o Cohesion: It measures the relative function strength of a module.


o Coupling: It measures the relative interdependence among modules.

2. Information hiding: The fundamental of Information hiding suggests that modules


can be characterized by the design decisions that protect from the others, i.e., In other
words, modules should be specified that data include within a module is inaccessible
to other modules that do not need for such information.

The use of information hiding as design criteria for modular system provides the most
significant benefits when modifications are required during testing's and later during
software maintenance. This is because as most data and procedures are hidden from
other parts of the software, inadvertent errors introduced during modifications are less
likely to propagate to different locations within the software.

Strategy of Design

A good system design strategy is to organize the program modules in such a method
that are easy to develop and latter too, change. Structured design methods help
developers to deal with the size and complexity of programs. Analysts generate
instructions for the developers about how code should be composed and how pieces of
code should fit together to form a program.

To design a system, there are two possible approaches:

1. Top-down Approach
2. Bottom-up Approach

1. Top-down Approach: This approach starts with the identification of the main
components and then decomposing them into their more detailed sub-components.

2. Bottom-up Approach: A bottom-up approach begins with the lower details and
moves towards up the hierarchy, as shown in fig. This approach is suitable in case of
an existing system.

DESIGN PATTERNS

Pattern designing refers to the process of creating a blueprint or template for a


garment or textile item. Pattern designing involves a combination of artistic creativity
and technical skill, and it plays an essential role in the fashion industry and other
related fields. In order to create a pattern, a designer typically begins with a sketch or
a series of sketches, which serve as a visual representation of the design concept. The
designer then translates the sketch into a 2D pattern, taking into account the various
components of the garment, such as sleeves, collars, and cuffs. The pattern must be
precise and accurate to ensure that the finished garment fits well and looks good.

There are several methods for creating a pattern, including draping, flat
patternmaking, and computer-aided design (CAD). Draping involves creating the
pattern directly on a mannequin or dress form, while flat patternmaking involves
drawing the pattern pieces onto paper using measurements and calculations. CAD uses
specialized software to create digital patterns that can be edited and adjusted easily.

Once the pattern is complete, it can be used to create a sample garment, which is then
tested for fit and functionality. Adjustments may be made to the pattern based on the
results of the fitting, and the process may be repeated until the desired result is
achieved.

Pattern designing requires a combination of skills, including creativity, attention to


detail, and technical knowledge. A successful pattern designer must be able to
visualize the finished product and translate that vision into a precise and accurate
pattern. It’s not mandatory to always implement design patterns in your project.
Design patterns are not meant for project development. Design patterns are meant for
common problem-solving. Whenever there is a need, you have to implement a suitable
pattern to avoid such problems in the future. To find out which pattern to use, you just
have to try to understand the design patterns and their purposes. Only by doing that,
you will be able to pick the right one.

Goal: Understand the purpose and usage of each design pattern in order to pick and
implement the correct pattern as needed.

Example:

In many real-world situations, we want to create only one instance of a class. For
example, there can be only one active president of a country at any given time. This
pattern is called a Singleton pattern. Other software examples could be a single DB
connection shared by multiple objects as creating a separate DB connection for every
object is costly. Similarly, there can be a single configuration manager or error
manager in an application that handles all problems instead of creating multiple
managers.

Types of Design Patterns

There are mainly three types of design patterns:

1. Creational Design Pattern

These design patterns are all about class instantiation or object creation. These
patterns can be further categorized into Class-creational patterns and object-creational
patterns. While class-creation patterns use inheritance effectively in the instantiation
process, object-creation patterns use delegation effectively to get the job done.

Creational design patterns are the Factory Method, Abstract Factory, Builder,
Singleton, Object Pool, and Prototype.
2. Structural Design Pattern

These design patterns are about organizing different classes and objects to form larger
structures and provide new functionality. Structural design patterns are Adapter,
Bridge, Composite, Decorator, Facade, Flyweight, Private Class Data, and Proxy.

3. Behavioral Design Pattern

Behavioral patterns are about identifying common communication patterns between


objects and realizing these patterns. Behavioral patterns are Chain of responsibility,
Command, Interpreter, Iterator, Mediator, Memento, Null Object, Observer, State,
Strategy, Template method, Visitor

Advantages of Pattern Designing:

1. Precision: The primary advantage of pattern designing is that it allows for


precise and accurate measurements and calculations, resulting in a well-fitted
garment.

2. Efficiency: Creating a pattern saves time and effort in the production process.
Once the pattern is created, it can be used to make multiple garments, reducing
the time and resources needed to create each one.

3. Creativity: Pattern designing allows for creative expression and


experimentation, enabling designers to explore different styles, shapes, and
techniques.

4. Consistency: A pattern ensures consistency in the production process, resulting


in a uniformity of the finished product, which is essential for large-scale
manufacturing.

5. Replicability: Patterns can be replicated and used for different sizes, styles, and
fabrics, making them a valuable asset for designers and manufacturers.

Disadvantages of Pattern Designing:

1. Cost: Pattern designing can be expensive, particularly if it involves specialized


software or equipment.

2. Skill: Pattern designing requires specialized knowledge and skills, which may
not be available to everyone.

3. Time-consuming: Creating a pattern can be a time-consuming process,


requiring attention to detail and numerous adjustments to ensure a proper fit.

4. Limited creativity: Working within the confines of a pattern can limit the
designer’s creativity, making it difficult to create unique or innovative designs.
5. Sustainability: The production of patterns, particularly on paper, can contribute
to waste and harm to the environment.

GRASP

1. GRASP

General Responsibility Assignment Software Patterns (or Principles),


abbreviated GRASP, consists of guidelines for assigning responsibility to classes
and objects in object-oriented design.
The different patterns and principles used in GRASP are: Information Expert,
Creator, Controller, Low Coupling, High Cohesion, Polymorphism, Pure Fabrication,
Indirection, Protected Variations. All these patterns answer some software problem,
and in almost every case these problems are common to almost every software
development project. These techniques have not been invented to create new ways of
working but to better document and standardize old, tried-and-tested programming
principles in object oriented design.
It has been said that "the critical design tool for software development is a mind
well educated in design principles. It is not the UML or any other technology". Thus,
GRASP is really a mental toolset, a learning aid to help in the design of object
oriented software.

You might also like