Application Development Flashcards
there are three (3) important characteristics of a bad design architecture that should be avoided:
Rigidity, Fragility, Immobility
The software is hard to change because every applied change will affect many parts of the software.
Rigidity
When applying changes, unexpected parts of the software breaks..
Fragility
The modules of the software are hard to reuse ins another software because these cannot be extracted from
the current software
Immobility
s are a set of guidelines
to be followed that helps developers arrange methods and data structures into classes,
Design principles
Martin assembled a set of five (5) software design principles, and Michael Feathers arranged these principles into an acronym
called SOLID.
(SRP), (OCP) , (LSP) , (ISP) , (DIP)
S-O-L-I-D
(SRP), (OCP) , (LSP) , (ISP) , (DIP)
This is one of the basic principles most developers apply to build robust and
maintainable software.
S: Single Responsibility Principle (SRP)
This suggests that each software module, class, or interface should have only one (1) reason to
change.
S: Single Responsibility Principle (SRP)
This states that for a software to be easy to change,
O: Open-Closed Principle (OCP)
the software classes must be designed to allow the behavior of those classes to be changed by adding new code rather than changing existing code.
O: Open-Closed Principle (OCP)
Barbara Liskov introduced this principle which states that the derived classes should be substitutable for their base classes to build a software from interchangeable modules or classes.
L: Liskov Substitution Principle (LSP)
This principle advises software designers to avoid depending on things that they don’t use.
I: Interface Segregation Principle (ISP)
This principle suggests that flexible software are those with classes that depend on abstract classes or interfaces.
D: Dependency Inversion Principle (DIP)
The blank instructs developers to design each module, interface, or class of a software system to
have only one (1) responsibility.
Single Responsibility Principle (SRP)
The accounting personnel is responsible
for computing the salary of an employee.
It should use the calculatePay()
method
Single Responsibility Principle (SRP)
The human resource personnel is
responsible for creating a report of hours
of an employee. It should use the
reportHours() method.
Single Responsibility Principle (SRP)
The database administrator is
responsible for saving an employee’s
details. It should use the
saveEmployee() method.
Single Responsibility Principle (SRP)
The blank states that software modules, interfaces, or classes should be open for extension but closed
for modification.
Open-Closed Principle (OCP)
For every newly added method, the unit testing of the software should
be done again.
Open-Closed Principle (OCP)
When a new requirement is added, the maintenance and adding
function may take time.
Open-Closed Principle (OCP)
Adding a new requirement might affect the other functionality of
software even if the new requirement works.
Open-Closed Principle (OCP)
To blank , use an interface,
an abstract class, or abstract methods to
extend the functionality of the class
Implement the OCP
The blank suggests that when creating a new derived class of an existing class, make sure that the
derived class can be a substitute for its base class.
Liskov Substitution Principle (LSP)