Laravels Command Bus
– 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]
Posts tagged with design patterns
– 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]
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"As a Laravel developer, this is the one newsletter I most look forward to. Freek has a talent for distilling packages or techniques down to something immediately useful - one tip can save you hours and even weeks. It's concise and practical and highly relevant."
– www.juststeveking.uk - submitted by Steve McDougall
In a typical Laravel application we are very used to doing things in a certain way, by the book as they say. However there comes a point in the applications lifetime that it is going to be easier to start looking to split this code into Domains so that we can logically group our code.
Read more [www.juststeveking.uk]
– doeken.org - submitted by Doeke Norg
The Middleware Pattern allows you to easily change the input and output of an action; one layer at a time.
Read more [doeken.org]
PHP is a wonderful dynamic language that's capable of many cool things. I recently stumbled upon something quite fantastic that I want to share with you.
Andraes Möller blogged a few interesting strategies to name the constructors of your PHP objects.
Read more [localheinz.com]
This talk by Kevlin Henney looks at how a handful of coding habits, design practices and assumptions can systematically balloon code and compound its accidental complexity.
The use of a message envelope has many benefits for the design of your application. It allows you to carry system information, nicely separated from domain information, in a generic way.
Read more [blog.frankdejonge.nl]
Event-driven systems come in all sorts of shapes and sizes. The obvious commonality is; they all use events to communicate information. These events come in many shapes and sizes, and determining what goes into an event has an immense impact on the design of your system.
Read more [blog.frankdejonge.nl]
– doeken.org - submitted by Doeke Norg
The Visitor Pattern opens up your entities to extension without changing them (much); and keeps the code separate.
Read more [doeken.org]
– doeken.org - submitted by Doeke Norg
The Adapter pattern and the Bridge Pattern have brought along a lot of confusion. Time to connect the dots.
Read more [doeken.org]
– doeken.org - submitted by Doeke Norg
Enhance (final) classes and functions by implementing these similar, but not quite the same, patterns.
Read more [doeken.org]
– ryangjchandler.co.uk - submitted by Ryan Chandler
Let's take a look at how we can create a custom Option type to handle optional values in PHP.
Read more [ryangjchandler.co.uk]
Native PHP functionality and having a good design in the first place provide everything you need to avoid a mocking library.
Read more [peakd.com]
Here's the recording of an excellent talk by Matthias Noback given at Socrates.
Sometimes it is not clear what the responsibility of a certain class is. This can be solved by adding a suffix to the class name.
– www.tonysm.com - submitted by Tony Messias
Tony Messias explains this design pattern using a cool example.
Read more [www.tonysm.com]
Let's dive into some of the design considerations you might make when designing abstractions that reach over a network.
Read more [blog.frankdejonge.nl]
This is a very nice talk given by Eric Evans at DDD Europe 2018. He argues that sometimes try to solve a problem, without reaching to existing solutions, might provide good insights.