May 29, 2017Laracasts recently published a very interesting non-Laravel video about something called visual debt. It’s only 3 minutes long, so please, take the time to watch it before reading further.Done? Okay, spoilers below.In the video, Jeff starts out with with a bit of verbose event-based code with some listeners, ...
February 13, 2017As your web application becomes larger, you certainly start to think more about designing a flexible, modular architecture which is meant to allow for a high amount of extensibility. There are lots of ways to implement such architecture, and all of them circle around the fundamental principles: separation of concerns, ...
November 16, 2016If you’ve used Eloquent on medium to large projects before, you may have encountered a situation where you want to take action when something happens to your models. Eloquent provides a convenient way to do so.The Observer PatternThe observer pattern is a software design pattern in which an object, called the...
June 29, 2016Dependency Injection is all about code reusability. It’s a design pattern aiming to make high-level code reusable, by separating the object creation / configuration from usage.Consider the following code:
<?phpclass Test {protected $dbh;public function __construct(PDO $dbh)
{
...
January 25, 2016Command Buses have been getting a lot of community attention lately. The topic can be quite overwhelming at first when trying to understand all the concepts and terminology, but in essence – what a Command Bus does is actually incredibly simple.
In this article, we’ll take a closer look at variations of the Com...
October 21, 2015The flyweight pattern is a relatively unknown design pattern in PHP. The fundamental principle behind the flyweight pattern is that memory can be saved by remembering objects after they have been created. Then, if the same objects need to be used again, resources do not have to be wasted recreating them.You can think...
Recent Comments