SOLID

Mayelana Wikipedia
Jump to navigation Jump to search

Kuhlelo lwamakhompiyutha olwenzelwe into, i- SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion) isichazamazwi se- mnemonic sezinqubomgomo ezinhlanu zokuklama okuhloswe ngazo ukwenza ukwakheka kwesoftware kuqondeke kakhudlwana, kube nezimo futhi kulondolozwe . Ayihlobene nemigomo yokwakhiwa kwesoftware ye- GRASP . Lezi zimiso zingaphansi kwezimiso eziningi ezithuthukiswa ngunjiniyela wesoftware waseMelika kanye nomqeqeshi uRobert C. Martin . [1] [2] [3] Noma zisebenza kunoma yikuphi ukwakheka okugxilwe entweni, imigomo ye-SOLID nayo ingakha ifilosofi eyisisekelo yezindlela ezinjengokuthuthuka ngokuphuthuma noma ukuthuthukiswa kwesoftware . Umbono wemigomo ye-SOLID wethulwa nguMartin lakhe le-2000 Design Design and Designs Design, [4] yize isigaxa se-SOLID sangeniswa kamuva nguMichael Feather. [5]

Imiqondo[hlela | Hlela umthombo]

Umgomo wesibopho esisodwa [6]
Isigaba kufanele sibe nesibopho esisodwa, okungukuthi, izinguquko engxenyeni eyodwa yokucaciswa kwesoftware kuphela okufanele zikwazi ukuthinta okubekiwe kwesigaba.
Umgomo ovaliwe [7]
"Izinhlaka zesoftware   ... kufanele ivulelwe ukunwetshwa, kepha ivalelwe ukuguqulwa. "
Umgomo wokufaka esikhundleni weLiskov [8]
"Izinhloso ezinhlelweni kufanele zibambezelwe ngezigatshana zezincazelo zazo ngaphandle kokushintsha ukunemba kwalolo hlelo." Bheka futhi ukwakhiwa ngenkontileka .
Umgomo wokuhlukanisa [9]
"Izindawo eziningi eziqondene namakhasimende zingcono kune-interface eyodwa yenhloso ejwayelekile." [4]
Umgomo wokuncika wokuncika [10]
Umuntu kufanele "ancike kokukhishwayo (abstended), [hhayi] kokucindezelwayo kufakwe ndawonye (concretions)."
  1. Robert C. Martin. "Principles Of OOD".
  2. Robert C. Martin. "Getting a SOLID start".
  3. Sandi Metz. "SOLID Object-Oriented Design".
  4. 4.0 4.1 Robert C. Martin. "Design Principles and Design Patterns" (PDF).
  5. Fenton, Steve (2017). Pro TypeScript: Application-Scale JavaScript Development. ISBN 9781484232491.
  6. "Single Responsibility Principle" (PDF). Archived from the original (PDF) on 1 June 2015.
  7. "Open/Closed Principle" (PDF). Archived from the original (PDF) on 5 September 2015.
  8. "Liskov Substitution Principle" (PDF). Archived from the original (PDF) on 5 September 2015.
  9. "Interface Segregation Principle" (PDF). Archived from the original (PDF) on 5 September 2015.
  10. "Dependency Inversion Principle" (PDF). Archived from the original (PDF) on 5 September 2015.