Spis treści
SOLID
SOLID principles are basic rules of object-oriented programming. You should not only know them but also practice and use them at work. At first, I remind you of SOLID principles, and then I show you some exercises.
Single responsibility principle
Every class should have only one responsibility (every class should have only one reason to change) — one purpose of existence.
Open/closed principle
All classes should be open for enlargement and closed for modifications.
Liskov substitution principle
The application should work correctly when we put in the base class place every derived class.
Interface segregation principle
Many small and dedicated interfaces are better than few and general.
Dependency inversion principle
High-level modules should not depend on low-level modules, but the dependence should result from abstraction.
SOLID principles exercises
- Write code and think about principles.
- Sometimes read SOLID principles.
- Read code other programmers and look for principles there.
- Observe, how your code is changing. If SOLID principles help to handle changes, or they cause bigger problems.
- Read code with examples of principles.
- Give your code to review and ask reviewer about principles
Check sites with SOLID exercises:
- https://www.codeguru.com/csharp/csharp/writing-c-code-using-solid-principles.htm
- https://dotnetcodr.com/2016/12/22/rewriting-hello-world-according-to-solid-in-net/#more-8973
- https://www.c-sharpcorner.com/UploadFile/damubetha/solid-principles-in-C-Sharp/
- https://blog.thedigitalgroup.com/solid-architecture-principle-using-c-with-simple-c-example
- https://www.codeproject.com/Articles/703634/SOLID-Architecture-Principles-Using-Simple-Csharp
- https://www.dotnetforall.com/solid-design-principles-examples/
- https://stackoverflow.com/questions/16638873/how-to-practice-solid-principle-of-oop-design
- https://journal.artfuldev.com/do-you-write-solid-c-code-expanding-upon-the-single-responsibility-principle-part-1-846dc48f876a
- https://dzone.com/articles/solid-grasp-and-other-basic-principles-of-object-o
- https://github.com/hammer4/SoftUni/tree/master/C%23%20OOP%20Advanced
All posts from mini project: Learn SOLID and OOP principles:
- SOLID
- SOLID exercises
- S like Single responsibility principle
- SOLID exercises — Kata
- O as Open-closed principle
- L jak Liskov Substitution Principle
- Interface segregation principle
- KISS — Keep it simple, stupid
- DRY — Don’t repeat yourself
- Dependency inversion principle
- SLAP — Single Level of Abstraction Principle
- Composition Over Inheritance
- Encapsulate what changes
- Lod — Law of Demeter
- ES as Exercises of Single responsibility principle
- EO as Exercises of Open/closed principle
- EL as Exercises of Liskov Substitution Principle
- EI as Eexrcises of Interface segregation principle
- ES as Exercises of Dependency Inversion Principle
- Object-oriented programming
- OOP — Object-Oriented Programming — Advice
- OOP — Object Oriented Programming
Sources
Main image
Materials
- Book: Clean architecture — Robert C. Martin
- http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
- https://en.wikipedia.org/wiki/SOLID
- https://pl.wikipedia.org/wiki/SOLID_(programowanie_obiektowe)
- https://www.samouczekprogramisty.pl/solid-czyli-dobre-praktyki-w-programowaniu-obiektowym/
- https://www.p-programowanie.pl/paradygmaty-programowania/zasady-solid/
- https://javadeveloper.pl/solid/
- https://sii.pl/blog/solid-dobre-praktyki-programowania/
- https://devcave.pl/notatnik-juniora/zasady-projektowania-kodu
1
/
47
Wgraj Plik Video - Upload Videos Directly| Bubble.io TUTORIAL
Data API - Udostępnij API Bazy Danych - How to Use the Data API Endpoint| Bubble.io TUTORIAL
Zbuduj Nawigację| Bubble.io TUTORIAL
System Kontroli Wersji - Version Control| Bubble.io Quick Tip
Śledzenie Przepływu Pracy - Workflow Trackers| Bubble.io Quick Tip
Satelitarne Typy Danych - Satellite Database Types| Bubble.io Quick Tip
Optymalizacja Zdjęć - Optimizing Photos| Bubble.io Quick Tip
Jedno Miejsce Do Wysyłania E-maili - Emails with Centralized Workflows| Bubble.io Quick Tip
Zatrzymanie w Workflow - Workflow Pause Mistakes| Bubble.io Quick Tip
Zabezpiecz URL API - API Security| Bubble.io Quick Tip
Optymalizacja pod SEO - SEO Optimization| Bubble.io Quick Tip
Automatyczne Śledzenie Błędów - Automated Error Tracking| Bubble.io Quick Tip
KB_ZW_0200 - Refleksje Na Temat Zarządzania Wiedzą: Wiedza Akademicka
Bezpieczny Dostęp Do Treści Premium - Payment Gateway Access| Bubble.io Quick Tip
Zapisuj Datę Ostatniego Logowania Użytkownika - Last Login Date| Bubble.io Quick Tip
Pokaż i Ukryj Element - Hide and Unhide Elements | Bubble.io TUTORIAL
Operator Zwraca Dane dla Pustej Wartości - 'Defaulting to' Operator| Bubble.io Quick Tip
Dostosowywanie Kolorów przez Użytkownika - Custom Color Themes| Bubble.io Quick Tip
Zakładka z Zaplanowanymi Zadaniami - Scheduler Tab| Bubble.io Quick Tip
Struktura Aplikacji - Structure Applications| Bubble.io Quick Tip
Menu z Dostępami - Dynamic Menus| Bubble.io Quick Tip
KB_ZW_0199 - Refleksje Na Temat Zarządzania Wiedzą: Niespodzianki
Dodaj Podpowiedź - Better Custom Tooltips| Bubble.io Quick Tip
Analiza Zużycia Jednostek w Celu Optymalizacji - Workflow Units Analysis| Bubble.io Quick Tip
Zapisuj Stan Tworzonej Aplikacji - Save Points Safely| Bubble.io Quick Tip
Zabezpieczenie API - Safeguard with API Security| Bubble.io Quick Tip
Optymalizacja Filtrowania Danych - Maximizing Filtering Efficiency| Bubble.io Quick Tip
Nawigacja z Parametrem URL - Efficient Navigation with URL Parameters| Bubble.io Quick Tip
KB_ZW_0198 - Refleksje Na Temat Zarządzania Wiedzą: Procedura
Sprytnie Ukrywaj Boczne Menu - Sidebars for an Exceptional User Experience| Bubble.io Quick Tip
1
/
47
I was suggested this web site by my cousin. I am not
sure whether this post is written by him as no one else
know such detailed about my difficulty. You are incredible!
Thanks!