Object-oriented Design with C# 10

by Mel Grubb - Pluralsight - 13 Mar 2023

Object-oriented programming

Object-oriented programming and design are not the same thing! Writing code in an object-oriented language only make your code object-oriented at a superficial level. It does very little to influence the design of your system.

Although you can write Procedural code in C#, why use an object-oriented language if you are not going to take advantage of object-oriented features. An object-oriented language make it a lot easier to implement object-oriented features, those features are not going to come automatically, it still requires work.

Object-oriented design

In a way, it's just a commitment to thinking about the responsibilities of classes and taking a disciplined approach to deciding how your code will be organized. Each class you write is an opportunity to create tools that the rest of the system can leverage. It's just object‑oriented programming done right.

  • Thinking in objects
  • Commitment to organisation of responsibilities
  • Classes are tools, used by other classes with other responsibilities

Mermaid introduces UML diagramming to MarkDown:

Object-oriented design is

  • Not - Code written in an object-oriented language
  • Not - Code that uses language features like inheritance and interfaces
  • Planning out a system in terms of objects and their responsibilities

Key to Object-oriented design is 'The Four Pillars', 'SOLID', and other Object-oriented vocabulary.