0% found this document useful (0 votes)
6 views6 pages

Report-Paper Fixed

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)
6 views6 pages

Report-Paper Fixed

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/ 6

Overview

The concepts of software design are covered in this topic, which is crucial for creating
well-organized and maintainable systems. It covers ideas like as separation of concerns,
encapsulation, abstraction, modularity, issue splitting, and effective design techniques.

Objectives
Upon finishing this module, you will have the ability to:
- Effectively apply design ideas to object-oriented systems.
- Make use of modularity and problem division to simplify challenging software
development tasks.
- Acknowledge the significance of abstraction, packaging, and concern separation in
improving the maintainability and clarity of code.

Overview of Software Design Principle


Software design principles are fundamental guidelines for producing logical, well-
organized, and maintainable software. These concepts include encapsulating related data and
operations, hiding complex details and only displaying what is necessary, breaking big projects
down into smaller sections (modularity), and separating different duties so they don't overlap
(separation of concerns). Developers may create software that is simple to read, accurate, and
update by following to these guidelines, which will eventually result in fewer errors and more
smooth teamwork.

Introduction to Principles of Software Design


Software design principles provide a framework for creating user-friendly, expandable,
and easily maintainable software. Writing code is only one aspect of good design; other
considerations include the system's architecture and user and data interactions, as well as system-
to-system communication. These guidelines help developers avoid blunders and produce
adaptable, dependable software.
Key Software Design Principles
Problem partitioning
Divide and conquer, also known as issue partitioning, is the process of dividing a large
difficulty into smaller, more doable tasks. This simplifies and maintains organization for each
part.

For example:
Building a sizable e-commerce website wouldn't require you to do everything at once. Rather,
you would divide it up into smaller jobs like shopping cart, payment, product catalog, and user
login. The procedure can be simplified by handling each component independently, enabling
multiple components to be worked on simultaneously.

Modularity
A software system can be made more modular by dividing it into smaller, independent
components, or modules, each of which has a distinct function. The system is simpler to update,
reuse, and test because to these modules' open interfaces.

For example:
You can separate a content management system into modules such as media handling, content
production, and user management. As a result, you can update or operate on one module (such as
media management) without interfering with other system components.

Abstraction
The goal of abstraction is to reveal only the essential information, leaving out the
complex structure of a system. This makes use easier and allows modifications to be made in the
background without impacting the system as a whole.

For example:
Users can draw forms in a graphics library without having to understand its fundamental
technological complexities. The user won't be affected if modifications are made to the internal
drawing process as long as the library continues to perform the same tasks.
Encapsulation
Encapsulation is the process of combining data with the methods that manipulate it into a
single entity, typically a class. By preventing unauthorized access, this guarantees that the data
can only be modified under close supervision, safeguarding its integrity.

For example:
Customer account information and transaction history are restricted to particular methods within
a banking app. This maintains the data accurate and safe and stops unauthorized modifications.

Separation of Concerns
Splitting a software system into components that each handle a particular task is known
as separation of concerns. As a result, maintaining and updating specific parts is made simpler
without having an impact on the entire system.

For example:
You keep the frontend (user interface) and backend (data processing) separate in a web
application. This enables backend upgrades without interfering with the user interface and UI
changes without affecting the backend logic.

Strategy of Design
Selecting the appropriate design patterns, approaches, and technologies for addressing
particular software system difficulties is the main goal of the design strategy. It involves making
decisions with knowledge based on specifications, limitations, and industry best practices.

For example:
To effectively handle message delivery, you may choose to use the Publish-Subscribe design
pattern when developing a real-time chat application. This approach aids in making decisions on
component organization, communication, and data handling.
SOLID Principles
Single Responsibility Principle (SRP)
Single Responsibility Principle (SRP) means that every class or module should have a
single, distinct duty. This minimizes the effect of changes in one area on others while keeping
the code focused and making it simpler to comprehend, test, and maintain.

For example:
You can have distinct classes in a payroll system for handling employee data, creating pay stubs,
and computing compensation. This separation helps to maintain code organization and facilitates
finding and resolving problems particular to a given activity.

Open/Closed Principles (OCP)


Software components (such as classes, modules, and functions) should be made to allow
for the addition of new features without requiring modifications to the existing code.

For example:
Developers can add new plugins to a software framework without changing the main code. For
example, developers may be able to add new payment gateway plugins to an e-commerce
platform without having to modify the current payment processing system.

Liskov Substitution Principles(LSP)


The objects from derived classes ought to be able to swap out objects from base classes
without breaking the code. Class hierarchies are encouraged by this idea to be stable and
predictable.

For example:
Using LSP implies that if your base class is called Bird and your derived classes are Sparrow and
Penguin, you can use a Sparrow or Penguin anywhere a Bird is anticipated. This guarantees that
the program's operation won't be interfered with when new bird species are introduced.
Interface Segregation Principles (ISP)
It promotes designing focused, targeted interfaces rather than a single, expansive one,
keeping them organized and pertinent.

For example:
It is preferable to have distinct interfaces like Clickable and Renderable in a user interface library
rather than a general UIComponent interface that contains methods for mouse events, keyboard
events, and button rendering. In this manner, all that is needed for a button to implement the
Clickable interface is to minimize unnecessary dependencies and maintain efficiency.

Dependency Inversion Principles (DIP)


High-level modules are suggested to rely on abstractions (such as interfaces) rather than
particular implementations. By separating components, this method increases the system's
flexibility and ability to adjust to changes.

For example:
If an app depends on a MessageProvider interface and uses many message providers (such as
SMS, email, or push notifications), its basic logic will not change even when the providers are
switched. This encourages the system to be more flexible.

KISS (Keep it Simple, Stupid)


Choosing simplicity over complication is emphasized by this principle. It is simpler to
maintain, troubleshoot, and comprehend simple designs.

For example:
A user interface should not have too many features or complex interactions. Users get a better
user experience from an interface that is simple to use and easy to navigate.

DRY (Don’t Repeat Yourself)


Repetition of code and functionality should be avoided as it might lead to inconsistent
results and maintenance issues. Rather, try to make modular and reusable parts.

For example:
A single reusable validation module can save you the trouble of writing the same validation code
repeatedly when you're developing a web application and need to validate user inputs in
numerous locations. This method avoids consistency issues and enables future validation logic
updates.
References
Scalar. Software Design Principles. Retrieved from https://www.scaler.com/topics/software-
design-principles/

You might also like