Principles

Modularity

Breaking down the software into smaller, independent, and reusable components or modules.

This makes the software easier to understand, test, and maintain.

Abstraction

Hiding the implementation details of a module or component and exposing only the necessary information.

This makes the software more flexible and easier to change.

Encapsulation

Wrapping the data and functions of a module or component into a single unit, and providing controlled access to that unit.

This helps to protect the data and functions from unauthorized access and modification.

Test Driven Development

Writing automated tests before writing the code, and ensuring that the code passes all tests before it is considered complete.

This helps to ensure that the software meets the requirements and specifications.

DRY (Don’t Repeat Yourself) / DIE (Duplication Is Evil)

DRY, an acronym coined by software developer Andy Hunt, emphasizes the importance of reducing duplication in code.

When developers follow this principle, they aim to write code in a way that avoids repetition and promotes reusability.

By reusing existing code and creating modular components, developers can not only save time and effort but also enhance the maintainability and readability of their codebase.

The key to applying the DRY principle effectively is to identify patterns and extract common functionalities into reusable functions or classes.

This not only streamlines the development process but also reduces the risk of errors caused by multiple instances of similar code.

KISS (Keep It Simple Stupid)

Complexity in software can lead to confusion, increased development time, and difficulty in debugging.

The KISS principle advocates keeping software solutions as simple as possible.

Simplicity allows for easier understanding, maintenance, and scalability.

To embrace the KISS principle, developers should strive to write clean, concise, and straightforward code.

Avoid unnecessary complexities or over-engineering.

Instead, focus on elegant solutions that fulfill the requirements efficiently without sacrificing clarity.

SOLID

SOLID is an acronym representing five essential design principles that guide developers in creating maintainable and scalable software:

Single Responsibility Principle (SRP):

Each class should have a single responsibility, encapsulating one aspect of the software’s functionality.

Open/Closed Principle (OCP):

Software entities should be open for extension but closed for modification. This allows developers to add new features without modifying existing code.

Liskov Substitution Principle (LSP):

Subtypes must be substitutable for their base types without affecting the correctness of the program.

Interface Segregation Principle (ISP):

Clients should not be forced to depend on interfaces they do not use. It promotes the creation of smaller, more focused interfaces.

Dependency Inversion Principle (DIP):

High-level modules should not depend on low-level modules. Instead, both should depend on abstractions.

Following these SOLID principles promotes flexibility, maintainability, and scalability in software development.

You Aren’t Gonna Need It (YAGNI)

The YAGNI principle encourages developers to avoid adding functionality or features that are not immediately required.

Often, developers anticipate future needs and add extra code that might never be used.

However, this can lead to unnecessary complexity and may even introduce bugs.

By adhering to the YAGNI principle, developers prioritize delivering the current requirements without speculating about future ones.

This approach keeps the codebase lean, agile, and easier to manage.

BDUF (Big Design Up Front)

BDUF is a software engineering principle that confirms that a software developer completes the design of the project first and then implements it.

This principle helps in discovering various issues at the requirement stage and solving it.

But the changes in the software requirements that occur during the process can cause difficulties.

Therefore, having a general architecture first before developing a functionality is very important. It enables setting priorities.

DSDM (Dynamic Systems Development Method)

DSDM (dynamic systems development method) is one of the most important principles when it comes to software development.

It comes with three main factors that can be fixed beforehand.

These three factors are known as time, cost, and quality.

Besides this, the dynamic systems development method is something that embraces the MoSCoW prioritization approach for priority modification.

And doing this results in timely delivery.

Last updated