Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
C# Object-Oriented Design: SOLID Principles and Singleton
Rating: 3.7 out of 5(14 ratings)
1,478 students

C# Object-Oriented Design: SOLID Principles and Singleton

Understand class responsibilities, dependencies, and Singleton choices including thread safety and loading strategies
Created byAlper ÇELİK
Last updated 3/2019
English
English [Auto],

What you'll learn

  • Explain each SOLID principle in terms of responsibilities, contracts, and dependencies.
  • Compare design decisions using the vocabulary introduced by the five principles.
  • Describe the purpose of the Singleton pattern and its implementation structure.
  • Explain the role of a sealed class in the Singleton examples.
  • Compare lazy and eager loading and examine thread-safety considerations.
  • Distinguish a Singleton from a static class using the examples in the course.

Course content

2 sections • 14 lectures • 1h 39m total length
  • Overview7:51
  • Single Responsibility Principle5:44
  • Open Closed Principle14:57
  • Interface Segregation Principle7:56
  • Liskov Substitution Principle3:38
  • Dependency Inversion Principle4:51
  • Exercise: Give an invoice two independent reasons to change0:38

Requirements

  • You should understand basic C# classes, interfaces, and inheritance. A C# practice environment is recommended for following the examples.

Description

As a C# application grows, a change in one class can affect code in several other places. Learning to discuss responsibilities, contracts, and dependencies gives you a clearer way to examine those effects. This course introduces the five SOLID principles and follows them with a focused study of the Singleton design pattern.

The SOLID section covers Single Responsibility, Open Closed, Interface Segregation, Liskov Substitution, and Dependency Inversion. You learn the purpose of each principle and build a vocabulary for reviewing object-oriented code. These ideas help you ask more precise questions about what a class does and how it interacts with the rest of an application.

The design-pattern section introduces patterns and the Gang of Four before turning to Singleton. You examine the structure of a Singleton implementation and the role of a sealed class in the examples. Lessons on thread safety and lazy versus eager loading show that implementation choices have consequences beyond the class name.

A comparison between static classes and Singleton helps clarify the differences between approaches that may initially look similar. Following the examples in a small project gives you a practical way to inspect those differences and connect them with the design intent.

Basic C# knowledge, including classes, interfaces, and inheritance, is recommended. The course concentrates on the five SOLID principles and the Singleton topics listed in the curriculum. As you study, compare the examples with familiar code and consider the assumptions behind each choice. This provides a foundation for more detailed work on refactoring and additional design patterns.

Who this course is for:

  • C# developers and learners who want an introduction to SOLID design principles and a focused study of the Singleton pattern.