Object-Oriented Design Solid

SOLID is an acronym for a group of five good principles (rules) in computer programming.

SOLID allows programmers to write code that is easier to understand and change later on. Solid is often used with systems that use an object-oriented design.

SOLID was promoted by Robert C. Martin but the name itself was created by Michael Feathers.

SOLID Principles

  • Single responsibility principle - Class has one job to do. Each change in requirements can be done by changing just one class.
  • Open/closed principle - Class is happy (open) to be used by others. Class is not happy (closed) to be changed by others.
  • Liskov substitution principle - Class can be replaced by any of its children. Children classes inherit parent's behaviours.
  • Interface segregation principle - When classes promise each other something, they should separate these promises (interfaces) into many small promises, so it's easier to understand.
  • Dependency inversion principle - When classes talk to each other in a very specific way, they both depend on each other to never change. Instead classes should use promises (interfaces, parents), so classes can change as long as they keep the promise.

References

Tags:

AcronymComputer programmingObject-oriented design

🔥 Trending searches on Wiki Simple English:

Names of large numbersKhalid ibn al-WalidRoyal Canadian Mounted PoliceJanuaryMammary intercourseCommunismList of cities in BelgiumLayne Staley12 (number)Mandarin orangeShakiraKalkiList of current members of the United States SenateWilliam ShakespearePeriodic tableWe Rock (Camp Rock song)List of youngest prime ministersTonic immobilityParisConstitutional republicYouTubeVarun GandhiPhysicsNorwayPlay (theatre)The Dark Knight RisesBernie SandersSolar SystemYao MingPhases of the MoonList of political parties in the United KingdomLeetDhruv SharmaGlobal warmingFriendshipDiane KeatonOrders of magnitude (time)Didier DrogbaSentenceNathuram GodseTheologyStone fruitLondonAmjad SabriList of best-selling singlesAmir TalaiTeal (color)FarmingBreast fetishismThe UndertakerUmarHexadecimalGameKL RahulList of people who have walked on the MoonParis HiltonPitch, yaw, and rollCaféWinterI'm a Celebrity...Get Me Out of Here! (Australian season 10)BaguioKurt AngleRandy OrtonPAW PatrolSummerButterflyList of districts of Tamil NaduMinecraftList of country calling codesPrimary colorHUnited statesList of European countriesBob HewittList of districts of MaharashtraBTS🡆 More