0% found this document useful (0 votes)
35 views

Topic 2 Principle of Software

The document discusses several principles of good software engineering including: 1. Modularity, abstraction, and encapsulation which involve breaking software into smaller, independent and reusable components. 2. DRY, KISS, and YAGNI which aim to avoid duplication and unnecessary complexity. 3. Additional principles like least astonishment, test-driven development, and independence of components. 4. The SOLID principles including single responsibility, open/closed, Liskov substitution, interface segregation and dependency inversion which guide design for maintainability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Topic 2 Principle of Software

The document discusses several principles of good software engineering including: 1. Modularity, abstraction, and encapsulation which involve breaking software into smaller, independent and reusable components. 2. DRY, KISS, and YAGNI which aim to avoid duplication and unnecessary complexity. 3. Additional principles like least astonishment, test-driven development, and independence of components. 4. The SOLID principles including single responsibility, open/closed, Liskov substitution, interface segregation and dependency inversion which guide design for maintainability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

CS 106

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

1. Modularity: Breaking down the software into smaller, independent, and


reusable components or modules.

2. Abstraction: Hiding the implementation details of a module or component and

P R E S E N TAT I O N T I T L E
exposing only the necessary information.

3. Encapsulation: Wrapping the data and functions of a module or component


into a single unit and providing controlled access to that unit.

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

8. Principle of Least Astonishment: Software systems should act in a way that is


consistent with what the users and stakeholders expect, according to the
Principle of Least Astonishment.

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.

• Open for Extension

• Close for Modification

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

• All designs and implementations should be


as simple as possible meaning the KISS
(Keep it Simple, Stupid) principle should be
followed.

P R E S E N TAT I O N T I T L E
• Maintaining the vision of the project.

• Software projects include a number of


functionalities, all functionalities should be
developed in a modular approach so that
development will be faster and easier.

13
INTRO • Another specialization of the principle of
separation of concerns is Abstraction.

• Think then Act is a must-required principle


for software engineering.

• Sometimes, the developer adds all


functionalities together but later finds no

P R E S E N TAT I O N T I T L E
use.

• Providing better Documentation at required


steps is a good way of developing software
projects.

14
INTRO • Law of Demeter

• The developers should develop the project


in such a way that it should satisfy the
principle of Generality.

• Principle of Consistency

• Performing continuous validation

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

You might also like