Open-Closed Principle

Pubblicato il: 09 ottobre 2023
sul canale di: ProgRank
425
15

In object-oriented programming, the open–closed principle (OCP) states "software entities (classes, modules, functions, etc.) should be open for extension but closed for modification"; that is, such an entity can allow its behavior to be extended without modifying its source code.

When a single change to a program results in a cascade of changes to dependent modules, that program exhibits the undesirable attributes that we have come to associate with “bad” design. The program becomes fragile, rigid, unpredictable, and unreusable. The open-closed principle attacks this in a very straightforward way. It says that you should design modules that never change. When requirements change, you extend the behavior of such modules by adding new code, not by changing old code that already works. 

"Software entities should be open for extension but closed for modification.” - Robert C. Martin

open-closed principle in hindi,open closed,ocp,java,solid principle,software engineering,open-closed principle,open-closed principle java,open-closed principle in software engineering,open-closed principle example in java,open closed principle hindi,open and closed principle of innovation,open and closed principle,define open and closed principle of innovation,open closed principle solid,what is open closed principle,the open closed principle,open/closed principle


In questa pagina del sito puoi guardare il video online Open-Closed Principle della durata di ore minuti seconda in buona qualità , che l'utente ha caricato ProgRank 09 ottobre 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 425 volte e gli è piaciuto 15 spettatori. Buona visione!