Patterns tags
Snuffleupagus-Oriented Programming
An impromptu introduction to Snuffleupagus-Oriented Programming (SOP): https://t.co/jPkjPRgqQr — Casey Muratori (@cmuratori) July 21, 2015 Sometimes naming something is the best way to start talking about a topic that lots of people do but don’t realise or haven’t pulled together as a concept. This is …
The Service Locator base class anti-pattern
Something I have seen a lot of over the last few years is a lot of service location, particularly in base classes, particularly in Controllers. But not limited to there, it can happen anywhere we see base classes. Short rant about inheritance The longer I do this, the more I find that base classes are not meant to be …
More small classes
Its a pretty common rule of thumb to avoid monoliths and write more small classes. Think about the solid principles. Single responsibility per class. This implies less in it. Smaller. Open for extension closed for modification. Take out the things that will change. Smaller. Liskov substitution principle says …
Ports and Adapters
It feels like everywhere I turn (in my circles anyway), people are talking about Ports and Adapters, and I thought I would jump on the bandwagon. You may have also heard this architecture called Onion Architecture, or Hexagonal Architecture. All of these are essentially the same idea, under a different name. Brief …
Semantics vs implementation detail
When we write out classes and variables, we are pretty good at naming them for what they represent. What I mean by this, is that when we declare a customer first name variable, we don’t call it firstNameString, or cfnString, and we have also lost the bad habit of firstNameStr or strFirstName. The implementation …