If I have limited time, but I want to start learning a few design patterns, which ones should I learn first?
I'd suggest Inversion of Control/Dependency Injection. This comes in very handy when unit testing as it enables you to supply mock dependencies for the class under test. Proxy is also very useful when wrapping a sealed class to make it more usable in testing scenarios.
If I make another suggestion, I would focus on learning which patterns are useful in different situations rather than focusing on learning how to implement a particular pattern. You can almost always find a reference implementation to use when implementing a pattern, but being able to discern when and which pattern to use will make the patterns more useful. If you start going about it the other way, you end up making your problem fit the patterns you know rather than applying the correct pattern that fits the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With