What is a Command Bus?
– www.youtube.com - submitted by Andrew Cairns
Take a quick look at what is a Command Bus and develop a mental model on how to think about it and it's purpose.
Read more [www.youtube.com]
Posts tagged with design patterns
– www.youtube.com - submitted by Andrew Cairns
Take a quick look at what is a Command Bus and develop a mental model on how to think about it and it's purpose.
Read more [www.youtube.com]
– blog.oussama-mater.tech - submitted by Oussama Mater
LLaravel offers an elegant method-calling feature called Facades. At first glance, they resemble static methods, but well, they are not! What kind of magic is Laravel doing?
Read more [blog.oussama-mater.tech]
Join thousands of developers
Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.
No spam. Unsubscribe anytime. You can also follow me on X.
– muhammedsari.me - submitted by Muhammed Sari
Mastering elation with the decorator foundation! Let's take a look at how we can leverage this simple, yet powerful design pattern in the context of a Laravel package.
Read more [muhammedsari.me]
– jeffochoa.me - submitted by Jeff
Although PHP Enumerations are meant to provide an easy and elegant solution to work with a predefined set of values, these classes are often misused, resulting in a lack of consistency due to the introduction of all sorts of methods that increase their complexity. In this article, we are going to go through some practices (both good and bad) with the goal of clarifying the understanding of these types of objects to help you build a more resilient and consistent codebase.
Read more [jeffochoa.me]
– flareapp.io - submitted by Spatie
In this post we'll describe how we created a flexible yet abstract external integrations structure for Flare.
Read more [flareapp.io]
– www.conroyp.com - submitted by Paul Conroy
Value objects are a great way to add safety and consistency to PHP applications, while improving readability & testability. Let's dive into what they are, what they're not (DTOs!), and how they can help us improve our code quality.
Read more [www.conroyp.com]
– tighten.com - submitted by Jamison Valenta
In this post, Andrew presents several patterns in polymorphic database relationships in Laravel that allow us to eliminate conditionals.
Read more [tighten.com]
Before you write any code — ask if you could ever possibly want multiple kinds of the thing you are coding. If yes, just do it. Now, not later.
Read more [www.swyx.io]
– medium.com - submitted by Mazen Touati
We will crack the controversy of the repository pattern in Laravel. The good and the bad, and what alternatives we can use to build a maintainable codebase.
Read more [medium.com]
Here's a strategy for soft deletes where you move data to another table instead of leaving it in-place.
Read more [brandur.org]
– www.eloquentarchitecture.com - submitted by John Freeman
Each call to the builder will modify the underlying pending request. Every modification, another link in the chain, that will be sent, finally, with get().
Read more [www.eloquentarchitecture.com]
Here's how you can make sure that all implementations of an interface behave correctly
Read more [www.kai-sassnowski.com]
Matthias Noback explains the difference.
Read more [matthiasnoback.nl]
As a system evolves, abstractions should arise from current needs, not future possibilities.
Read more [sebastiandedeyne.com]
– aschmelyun.com - submitted by Andrew Schmelyun
If you've been working with PHP regularly, chances are you've run across an Interface, Trait, or Abstract Class. At first glance, they might appear to have a few similarities between them, and it can be hard to make out their differences and use cases.
Read more [aschmelyun.com]
A very nice technique to decrease concurrency and prevent deadlocks.
Read more [planetscale.com]
Laravel gives you the flexibility to choose the structure of controllers yourself, which is both a blessing and a curse. You won't find any recommendations in the official Laravel docs, so let's try to discuss various options, based on one specific example.
Read more [laravel-news.com]
– stefanzweifel.io - submitted by Stefan Zweifel
Ever needed to work with an SDK and wished you could use Http::fake() in your Laravel tests?
This blog post explains how you can achieve this for the Facebook Business SDK using the Adapter pattern.
Read more [stefanzweifel.io]
– www.juststeveking.uk - submitted by Steve McDougall
In Laravel 5.1 the Command Bus was replaced with Dispatchable Jobs, we can still use them but let us also look at how to add a Command Bus.
Read more [www.juststeveking.uk]
– www.juststeveking.uk - submitted by Steve McDougall
Of all of the design patterns you could use in your code, the adapter pattern is one of my all time favourites. It allows you to abstract the implementation to an adapter that implements an interface. so you can switch implementation simply by switching the adapter.
Read more [www.juststeveking.uk]