pncsoares / dotnet-solid-principles

The SOLID principles in Dotnet C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SOLID principles

This repository contains the SOLID principles details and code examples written in Dotnet C#.

contributions welcome

Definition

SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable, flexible, and maintainable.

👆 Wikipedia documentation

The SOLID principles are:

[S] Single responsibility principle

There should never be more than one reason for a class to change. In other words, every class should have only one responsibility.

Code example and documentation 📄

[O] Open–closed principle

Software entities should be open for extension, but closed for modification.

Code example and documentation 📄

[L] Liskov substitution principle

Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it. See also design by contract.

Code example and documentation 📄

[I] Interface segregation principle

Many client-specific interfaces are better than one general-purpose interface.

Code example and documentation 📄

[D] Dependency inversion principle

Depend upon abstractions, not concretions.

Code example and documentation 📄

🤲 Contribute

Any contributions are highly appreciated 🙏

You can contribute in some ways:

  1. Fork the project and submit a PR with an improvement of any kind, code, documentation, scenarios, pros, cons, spelling, etc;
  2. If you noticed something and want to register it so others can handle it, create a new issue with the label that better fits that scenario and fill as much information as you can;
  3. Answer questions that you know about in the issues and/or in the discussion section.

Please make sure that you read and follow the Contribution Guide

📢 Give feedback

Do you have any suggestions on how we could improve this project overall? Let us know! We'd love to hear your feedback!

Use the discussions tab for this purpose. Choose the category that better fits the scope of the discussion.

🌱 Spread the word!

If the information from this repo was useful to you in any way, make sure you give it a star ⭐

This way others can find it and benefit too! Together we can grow and make our community better!

Thanks 🙏