Topic 2 Principle of Software
Topic 2 Principle of Software
8 SOFTWARE
ENGINEERING
P R I N C I P L E S TO
LIVE BY
THERE ARE SEVERAL
BASIC PRINCIPLES OF
GOOD SOFTWARE
ENGINEERING
APPROACH
P R E S E N TAT I O N T I T L E
INCLUDE:
2
PRINCIPLES
P R E S E N TAT I O N T I T L E
exposing only the necessary information.
3
PRINCIPLES
4. DRY principle (Don’t Repeat Yourself): Avoid duplication of code and data in
the software.
5. KISS principle (Keep It Simple, Stupid): Keeping the software design and
P R E S E N TAT I O N T I T L E
implementation as simple as possible.
6. YAGNI (You Ain’t Gonna Need It): Avoid adding unnecessary features or
functionality to the software.
7. Occam’s Razor states that all things being equal, the simplest solution is
usually the best.
4
PRINCIPLES
P R E S E N TAT I O N T I T L E
9. Test-driven development: Writing automated tests before writing the code, and
ensuring that the code passes all tests before it is considered complete.
10. Law of Demeter Ensure that software components are independent of one
another.
5
PRINCIPLES
11. SOLID principles: A set of principles that guide the design of software to
make it more maintainable, reusable, and extensible. This includes the Single
Responsibility Principle, Open/Closed Principle, Liskov Substitution
P R E S E N TAT I O N T I T L E
Principle, Interface Segregation Principle, and Dependency Inversion
Principle.
6
SRP (SINGLE
RESPONSIBILITY
PRINCIPLE)
States that every function, class, module, or service
should have a single clearly defined responsibility.
In other words, A class/function/module should have
P R E S E N TAT I O N T I T L E
one and only one reason to change.
7
OCP
(OPEN/CLOSED
PRINCIPLE)
When we develop software, we do it in phases. We
implement a bunch of functionalities, test them, and
then release them to the users. Then we start
P R E S E N TAT I O N T I T L E
implementing the next set of functionalities.
8
L S P ( L I S KOV
SUBSTITUTION
PRINCIPLE)
The Liskov Substitution Principle simply means that
every child/derived class should be substitutable for
their parent/base class without altering the
P R E S E N TAT I O N T I T L E
correctness of the program.
9
I S P ( I N T E R FA C E
S E G R E G AT I O N
PRINCIPLE)
states that a client should never be forced to depend
on methods it does not use.
P R E S E N TAT I O N T I T L E
10
DIP
(DEPENDENCY
INVERSION
PRINCIPLE)
Tries to avoid tight coupling between software
modules. It states that High-level modules should
P R E S E N TAT I O N T I T L E
not depend on low-level modules, but only on their
abstractions.
11
SOME BASIC
PRINCIPLES
OF GOOD
SOFTWARE
ENGINEERING
ARE –
INTRO • One of the basic software Engineering
principles is Better Requirement analysis
P R E S E N TAT I O N T I T L E
• Maintaining the vision of the project.
13
INTRO • Another specialization of the principle of
separation of concerns is Abstraction.
P R E S E N TAT I O N T I T L E
use.
14
INTRO • Law of Demeter
• Principle of Consistency
P R E S E N TAT I O N T I T L E
• Exit in current technology market trends
Using modern programming practices is
important to meet users’ requirements in the
latest and most advanced way.
15
INTRO • Scalability in Software Engineering should
be maintained to grow and manage
increased demand for software applications.
P R E S E N TAT I O N T I T L E
16
T H A N K YO U
17 P R E S E N TAT I O N T I T L E