Creational Patterns
Concerned with how objects are created.
Dated Sep 16, 2026; last modified on Wed, 16 Sep 2026
Concerned with how objects are created.
| Random Link ¯\_(ツ)_/¯ | ||
| Sep 16, 2026 | » | OOP Creation Patterns: Factory Method
1 min; updated Oct 3, 2026
A factory is a helper that makes the right kind of object for you so you don’t have to decide. That said, factories are polarizing because some engineers view them as examples of engineering. Simple FactoryFactory shows up when requirements say something like “support different notification types”, e.g., … where clients do |
| Sep 21, 2026 | » | OOP Creation Patterns: Singleton
2 min; updated Sep 21, 2026
SingletonSingleton ensures only one instance of a class exists. Useful when you need exactly one shared resource like a connection pool, logger, etc. Most times, passing shared objects through constructors is clearer, works, and easily testable. Sample… with usage: In multi-threaded scenarios, C# offers |
| Sep 21, 2026 | » | OOP Creation Patterns: Builder
2 min; updated Sep 21, 2026
Builder PatternShows up when designing things like HTTP requests, configuration objects, etc. Instead of a ctor with 10 parameters where half are null, you build the object incrementally, e.g., … with usage like: |