| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
According to the principle of sole responsibility; There should be only one reason for a class to change.This means that each module or class must be responsible for a single piece of functionality provided by the software, and this responsibility must be fully covered by the class.
In object-oriented programming, the open/closed principle states that software entities such as classes, modules, functions, etc. should be open for extension, but closed for modification.
Substitutability is a principle in object-oriented programming and it states that, in a computer program, if S is a Subtype of T, then objects of type T may be replaced with objects of type S.
During the process of the application design, lower-level components are designed to be consumed by higher-level components which enable increasingly complex systems to be built. In this Process of Composition, higher-level components depend directly upon lower-level components to achieve some task.
This dependency upon lower-level components limits the reuse opportunities of the higher-level components and ends up in a bad design.
From the illustrated diagram, High-level Modules depends directly on Low-level Modules and this does not follow the first point of DIP. This flow certainly looks good, but we're combining different layers, so any further changes would be complex and hard to change.
The Separation of Concerns design principle focuses on our creation of clusters/capsules with components with low cohesion and similar responsibilities, with clear separation of responsibilities.
Don't repeat yourself! The DRY principle is hostile to code duplication. Destroying the project by repeating the same code (usually by copy-paste) wherever needed; manageability, naturally, focuses on preventing it from moving away from the possibilities of developability and sustainability.
If we need to reuse a previously written code or code block; By converting the existing code into a function/class/method (by refactoring if possible), we should connect the old user to this point, and then use this centralized point in the new codes we will write.
With SoC, sustainable, developable and reusable components and projects are possible thanks to these components.In this way, it will be easier to manage and we will have a much more organized architecture.
IoC is a software development principle that aims to create loose coupling objects with little interdependence throughout the application lifecycle. It is responsible for the life cycle of objects, provides their management. When an interface is injected into the class using IoC, the corresponding interface methods become available. Thus, the class using IoC only knows the methods it will use, even if there are more methods in the class, it will be able to access the methods specified in the interface.
| Back | FazBrowse Home | New Git URL |