Design patterns are one of the easiest and quickest ways to create clean manageable code whether you are starting from scratch or refactoring existing code. One of the easiest to implement design patterns is the Null Object Pattern. This pattern is all about handling the null keyword in a way that removes all of those nasty if (object == null) checks from your code. It also makes handling default values for null objects a breeze.
If you want to learn more about the Null Object Pattern make sure to checkout the repository linked below.


Design Pattern Playlist:
http://bit.ly/2QrGnDq

Design Pattern Repository:
https://github.com/WebDevSimplified/Design-Patterns

Twitter:
https://twitter.com/DevSimplified

GitHub:
https://github.com/WebDevSimplified

CodePen:
https://codepen.io/WebDevSimplified


#DesignPatterns #CleanCode #Programming