You are on page 1of 37

UNIT -3

Good Morning
Software Design
• Software design is the process by which an agent creates a specification of a software artifacts intended to accomplish

goals, using a set of primitive components and subject to constraints.

• It allows the software engineer to create the model of the system or software or product that is to be developed or built.

The software design concept provides a supporting and essential structure or model for developing the right software.

• Types

• Interface Design.

• Architectural Design.

• Detailed Design.
Good design

•  Good design relies on a combination of high-level systems thinking and low-level component

knowledge.

• Creating modular components that you can call and deploy as needed.

• In doing this, you build software that is reusable, extensible, and easy to test 


Conventional Design : Design process

• Conventional engineering design typically involves the repeated analysis and modification of an

initial concept until what is considered to be a satisfactory design emerges.

• At each stage, the properties of the design are evaluated and compared with the specified

requirements.
• Software design is a process to transform user requirements into some suitable form,

• which helps the programmer in software coding and implementation. ... 

• Software design is the first step in SDLC (Software Design Life Cycle), which moves the
concentration from problem domain to solution domain.

• software product using well-defined scientific principles, methods and procedures. The outcome
of software engineering is an efficient and reliable software product.
Principles & Concepts of
Conventional Software Engineering

•  After many years of experience regarding software development, the software industry has learned and
understood many lessons and formulated or created many principles.

• Create or Make Quality – Quality of software must be measured and mechanisms put into place to motivate
towards achieving the goal.

• High-quality software is possible –increase and quality includes involving customer, prototyping, simplifying
design, conducting inspections, and hiring good and best people.

• Give end-products to Customers early –most important and effective to determine and identify their real and
realistic needs is to give product to users and let them play with it.

• Determine problem or issue before writing and needs or requirements – When engineers usually face with
what they believe is a problem, they rush towards offering a solution. But we should keep in mind that before
we try to solve any problem, be sure to explore all alternatives and just don’t get blinded by obvious solution.
• Evaluate all Design Alternatives - we must examine and understand various architecture and algorithms. We usually don’t want to
use “architecture” generally due to its usage in requirements specification.
• Use an appropriate and correct process model – Each and every project must select an appropriate process that makes most sense
for that project generally on basis of corporate culture, willingness to take risks, application area, volatility of requirements, and
extent to which all requirements and needs are understood in a good manner.
• Use different languages for various phases – Our industry generally gives simple solutions to large complex problems. Due to his,
many declare that best development method is only one that makes use of notation throughout life cycle.
• Minimize intellectual distance – The structure of software must be very close enough to a real-world structure to minimize
intellectual distance.
• Before tools, put Techniques – An undisciplined software engineer with a tool becomes very dangerous and harmful.

• Get it right just before we make it very faster – It is very easy and simple to make a program that’s being working run very faster
than it is to simply make a program work fast.
• Inspect Code – Assessing or inspecting design with its details and code is most and better way of identifying errors other than
testing.
• Rather than Good technology, Good management is more important – Good management simply motivates other people also to
do their work at best, but there are no universal “right” styles for management.

Key to success is “PEOPLE” – People with many skills, experience, talent, and training are key to success.
• Follow with Care and in a proper manner - Everyone is doing something doesn’t mean that it is right for
us. So, we must inspect or assess its applicability to our environment very carefully.
• Take Responsibility –Best and important methods can be used to produce or develop an awful design, and
best and largely antiquated methods to develop an elegant design.
• Understanding priorities of customers – It is simply possible that customer would tolerate 90 percent of
performance that is delivered late only if they could have 10 percent of it on time.
• More they see, more they need – More the functionality or performance we provide to user, more
functionality or performance they will want. Their expectation increases by time to time.
• Plan to throw one away – The most essential and critical factor is whether a product is entirely new or not.
Brand-new applications, architectures, interfaces, or algorithms generally work rarely for first time.
• Design for update or change – We should update or accommodate change architecture, components, and
specification techniques that we generally use.
• Without documentation, design is not a design – We have some engineers often saying that “I have
finished and completed design and all things left is documentation”.
• Be realistic while using tools – Tools that software used make their customers and users more efficient.
• Encapsulate – Encapsulate simply means to hide information and it is easy, simply. It is a concept that
simply results in software that is simpler and easier to test and very easy to maintain.
• Avoid tricks – Some of programmers love to create and develop programs with some tricks constructs that
perform a function in correct way but in a non-understandable manner. Rather just prove to world how
smart we are by avoiding trick code.
• Don’t test-own software – Software Developers should not test their own software. They should not be
primary testers of their own software.
• Coupling and Cohesion – Using coupling and cohesion are best way to measure software’s inherent
maintainability and adaptability.
• Except for excellence – Our employees will work in a far better way if we have high expectations for them.
Object Oriented Design

• Object-Oriented Software Engineering (OOSE) is a software design


technique that is used in software design in object-oriented
programming. ...

• It includes a requirements, an analysis, a design, an implementation


and a testing model.

• Interaction diagrams are similar to UML's sequence diagrams.


• In the object-oriented design method,

• the system is viewed as a collection of objects (i.e., entities).

• The state is distributed among the objects, and each object handles its state data.

• Every entity has some attributes associated with it and has some methods to perform on the attributes.

• Process of Object Oriented Design: ...

• To design classes and their attributes, methods, associations, structure, and even protocol, design axiom is

applied.

• The static UML class diagram is redefined and completed by adding details. Attributes are refined.
Design Issues

• Some are quality concerns that all software must address—

• performance,

• security,

• reliability,

• usability, etc.

• Another important issue is how to decompose, organize, and package software components.


Design Process

• Software design is a process to transform user requirements into


some suitable form,
• which helps the programmer in software coding and implementation.

• Interface Design
• Architectural Design
• Detailed Design
Interface design

• Interface design is the specification of the interaction between a system and its environment.

• Precise description of events in the environment, or messages from agents to which the system must respond.

• Precise description of the events or messages that the system must produce.

• Specification on the data, and the formats of the data coming into and going out of the system.

• Specification of the ordering and timing relationships between incoming events or messages, and outgoing

events or outputs.
Architectural design
• Architectural design is the specification of the major components of a system, their responsibilities, properties,
interfaces, and the relationships and interactions between them. 

• Gross decomposition of the systems into major components.

• Allocation of functional responsibilities to components.

• Component Interfaces

• Component scaling and performance properties, resource consumption properties, reliability properties, and so
forth.

• Communication and interaction between components.


Detailed Design
• Design is the specification of the internal elements of all major system components, their properties,

relationships, processing, and often their algorithms and the data structures.

• Decomposition of major system components into program units.

• Allocation of functional responsibilities to units.

• User interfaces

• Unit states and state changes

• Data and control interaction between units

• Data packaging and implementation, including issues of scope and visibility of program elements

• Algorithms and data structures


System Design

• System design is the process of designing the elements of a system such as the architecture,

modules and components, the different interfaces of those components and the data that goes

through that system.

• The designs can be defined in graphical or textual modelling languages.


Object Design

• In the object-oriented design method, the system is viewed as a collection of objects (i.e.,

entities). ... 

• Objects have their internal data which represent their state. Similar objects create a class.

• In other words, each object is a member of some class.

• Classes may inherit features from the superclass.


Software Design Document
The software design document (SDD) typically describes a software product's data design, architecture
design, interface design, and procedural design. The content and organization of an SDD is specified by the
IEEE 1016 standard.

IEEE defines software design documentation as

“a description of software created to facilitate analysis, planning, implementation, and decision-making”.

In essence, a software design document (SDD) explains how a software product or a feature will be built to
meet a set of technical requirements.

The purpose of the Software Design Document is to provide a description of the design of a system fully


enough to allow for software development to proceed with an understanding of what is to be built and
how it is expected to built.
various example templates
• Data Design,
• Architecture Design,
• Interface Design & Procedural Design

Coding

• Coding standard give a uniform appearance to the code written by different programmers

• Use comments

• Proper indentation

• It provide sound under standing of code

• It encourages good programming practice


Coding Standards

• Rules for limiting global variable

• Contents of the header proceeding codes for different modules

• Naming conventions for variables and identifiers

• Error return and Exception handling


Guidelines

• Do not use coding style that too clever or too difficult to under stand

• Avoid obscure side effects

• Do not use an identifier for multiple purposes

• The code should be well documented

• The length of any function should not exceed 10 source line

• Dot use goto statement


Code Debugging

• Remove all syntax error

• Read and under stand the code

• Check all guidelines


Code Verification

• Check for logical and algorithmic errors with test cases

• Code review

• Code walk through – 3 to 7 member in that team check code for errors

• Code inspection – look for the possible and common errors

• Eg:non terminating loop, uninitialized variables … etc


Code Optimization
• Unroll small loops:

• Avoid calculations in loop

• Avoid pointer Dereference in loop

• Use Register variables as counters of inner loops

• Avoid unnecessary Integer Division

• Multiplication and division by power of 2

• Optimization with Switch Statement -

Sometimes we see a lot of repeated code written in all cases except one or two statements …… etc
Advantages

• Code optimization is any method of code modification to improve code quality and efficiency.

• A program may be optimized so that it becomes

• a smaller size,

• consumes less memory,

• executes more rapidly,

• performs fewer input/output operations.


yo u
h a nk
T

You might also like