Articles
Constructors in Traits
Traits are a handy way for sharing functionality in multiple classes, and since php doesn’t support multiple inheritance, this is the next best thing. But...
Using the decorator design pattern with repositories
I recently encountered something in the legacy app I’m working in, where the author added caching to at least a dozen or so repositories. The...
Named Constructors To Make Our Lives Easier
Have you ever found yourself adding parameters with null as defaults in your constructors? class PackingSlip { private $kit; private $kitGroup; public function __construct(KitInterface $kit...
Don't Mock What You Don't Own
The maxim “Don’t Mock What You Don’t Own” was cryptic to me when I first heard it. Even searching the internet for clues wasn’t much...
Managing Software Projects
Have you ever pushed through bad code in the name of a deadline? It’s ok, we all have, which is the reality of life. However,...
My favorite reason to use the repository pattern
Not everyone is in love with the Repository Pattern, which is understandable, because it has a way of complicating things and adding a lot of...
CSS - Min height inheritance
So you know how when you use something like height 100%, it’s based on the height value that was explicitly set on a parent element?...
Cache Factory service
In the process of creating an Angular service that uses the Http protocol to fetch data, I wanted a way to cache data. I proceeded...
Angular Pre and Post links
Do you use link functions in Angular directives? Me too. But sometimes that’s not always the best tool for the job. In my case, I’m...
Adventures with providers
I created an Angular service that makes http requests and returns data. I used a provider in order to be able to configure the url...