Join Reynald Adolphe for an in-depth discussion in this video Common design patterns as best practice, part of C# Best Practices for Developers.
- [Instructor] One last thing that I wanted to mention regards to best practices, is a concept of design patterns. Now I believe that it goes hand and hand, I mean the concept of best practice is to be able to write code in a conventional and efficient way that makes sense so that your code works well and it benefits not only yourself, but anyone else that reads your code. But that also applies to design patterns. And design patterns though, if you were to look up the definition, you would get something like it's a reusable solution to a commonly occurring problem within a given context in software design.
And that's great, but one of the things that's really awesome about it is the fact that it presents a formality to fixing issues that can become very common amongst all developers. Otherwise everyone could try to fix problems in their own ways, and that's ultimately the goal of design patterns. And there's three major areas of patterns. There's creational patterns, structural patterns, and behavioral. I've gone ahead and created a course on Lynda so if you wanna check that out, please go ahead and do so 'cause it definitely goes in depth.
In fact, I have to do three parts to it. And my course is focused on C#, it's actually called C# Design Patterns, but there's also a part two and part three, and I do cover all of the three types of patterns that I just mentioned. And those, by the way, are coined by a group of developers called A Gang of Four. So definitely check that out because I strongly believe that it is something to go hand in hand when you are implementing best practices.
- Naming and handling classes
- Running a unit test
- Using constructors
- Naming and handling methods, fields, and properties
- Using properties correctly
- Managing objects efficiently
- Common design patterns as best practices