DEV Community


Discussion on: Name a DESIGN PATTERN and WHY u use it πŸ˜€ ?????

pclundaahl profile image
Patrick Charles-Lundaahl

Null object is definitely really cool!

I usually try to avoid using too many patterns - they can be really handy in a pinch, but most of my projects are pretty small, so I usually just try to pay attention to SRP and make sure things are small and composable. I've been slowly adopting more functional patterns, too, and I find that helps simplify things quite a lot.

I suppose the big one I tend to use is the façade pattern (helps with SRP). Others I've used a fair bit are Observable, along with a slightly-modified Service Locator (to get rid of the need to cast the results).

sharadcodes profile image
Sharad Raj (He/Him) Author

That's nice