SOLID Principles for C# Developers

Every C# developer, or any developer using an object-oriented programming language, needs a good understanding of the SOLID principles. These principles guide your design toward more loosely coupled and maintainable software.
Course info
Rating
(88)
Level
Beginner
Updated
Apr 2, 2019
Duration
2h 8m
Table of contents
Description
Course info
Rating
(88)
Level
Beginner
Updated
Apr 2, 2019
Duration
2h 8m
Description

It's easy to write software that fulfills its users' immediate needs, but is difficult to extend and maintain. Such software becomes a burden for companies striving to remain competitive. In this course, SOLID Principles for C# Developers, you will learn five fundamental principles of object-oriented design that will keep your software loosely coupled, testable, and maintainable. First, you will see how to keep classes small and focused, and how to extend their behavior without having to edit their source code. Then, you will discover the importance of properly designing interfaces and abstractions in your systems. Finally, you will explore how to arrange dependencies in your system so different implementations can be added or plugged in as needed, allowing a truly modular design. When you are finished with this course, you will understand how to build maintainable, extensible, and testable applications using C# and .NET.

About the author
About the author

Steve Smith (@ardalis) is an entrepreneur and software developer with a passion for building quality software as effectively as possible.

More from the author
Pair Programming
Beginner
2h 29m
Apr 7, 2016
More courses by Steve Smith
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone. My name is Steve Smith, aka Ardalis. Welcome to my course, SOLID Principles for C# Developers. This is my 11th Pluralsight course, an update to my most popular course on the SOLID principles of object-oriented design. I'm an independent trainer and mentor for teams and individuals seeking to build better software. You can find me online at ardalis.com and check out my podcast weeklydevtips.com. This course covers the SOLID principles for C# developers, which are principles all professional C# developers should understand and be able to apply. During this course, we'll cover defining the five principles, understanding what responsibilities and dependencies are in our software, understanding how to identify violations of the principles, and when and how to correct violations once you've identified them. By the end of this course, you'll be familiar with five fundamental principles of object-oriented programming and how to apply them to C# applications. Before beginning this course, you should be familiar with C#, but you don't need extensive experience. From here, you should feel comfortable diving into other code quality courses on refactoring, domain-driven design fundamentals, and design patterns. I hope you'll join me on this journey to learn how to apply the five SOLID principles to your C# applications here, on Pluralsight.

Liskov Substitution Principle
Welcome back. In this module, you'll learn about the Liskov substitution principle, which provides guidance on how to properly use inheritance in object-oriented languages like C#. The Liskov substitution principle, or LSP, is the third of the SOLID principles. As we'll see, LSP also tends to produce code that better follows the open closed principle we just learned about in the previous module. The original definition of the Liskov substitution principle reads, Let phi(x) be a property provable about objects x of type T. Then phi(y) should be true for objects y of type S where S is a subtype of T. Was that perfectly clear? Yeah, many programmers may not immediately understand what's meant by this. So a more approachable definition is simply subtypes must be substitutable for their base types. Just like the open closed principle, this principle has its origins in the 1980s, so it's not a particularly new idea. Barbara Liskov introduced the principle in a conference keynote in 1987.