architecture
All my posts about architecture.
Capturing the World in Software
Very nice post by Jessica Joy Kerr on the benefits and tradeoffs of event sourcing.
We can get a complete, consistent model of a small piece of the world using Event Sourcing. This is powerful but expensive.
Read more [blog.jessitron.com]
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.
"Freek’s newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."
Lost in transaction
Bernd Ruecker talks about how determine the right level of consistency in distributed applications.
Design Principles of Vue 3.0
Evan You explains the principles behind the changes coming in Vue 3.0
Fetching data in the perimeter of your Laravel applications
Jonathan Reinink wrote another excellent blog post.
As much as possible, keep data fetching to the perimeter of your Laravel applications. What do I mean by this? In the simplest terms, it means running your database queries in your controllers.
Read more [reinink.ca]
Build your own React
– pomb.us
In a very cool post, Rodrigo Pombo explains the internals of React by rewriting it's core from scratch.
We are going to rewrite React from scratch. Step by step. Following the architecture from the real React code but without all the optimizations and non-essential features.
Read more [pomb.us]
Getting started with Domain Oriented Laravel original
A couple of days ago my colleague Brent published a blogpost on Domain Oriented Laravel. In short, he makes the case for organising your code around business concepts or features. That might sound very "heavy" or daunting, but it's actually for easy to get started with.
In this short video I explain how you can use PhpStorm to refactor your code. Make up your own mind if you need this in your projects.
Don't add an API too fast
Not adding an API until absolutely necessary lets us keep our model internal and lets us iterate as needed.
— Matthieu Napoli (@matthieunapoli) October 10, 2019
Read more [twitter.com]
Software Architecture is Overrated, Clear and Simple Design is Underrated
Gergely Orosz argues that you should start with a simple design and try your best to keep it simple. I don't necessarily agree with everything in the post, but it's an interesting opinion nonetheless.
Software architecture best practices, enterprise architecture patterns, and formalized ways to describe systems are all tools that are useful to know of and might come in handy one day.
Read more [blog.pragmaticengineer.com]
Extracting doesn’t guarantee simplicity
Extracting doesn’t guarantee simplicity. Sometimes extracting code into another module means I’ve smeared one “conceptual module” in my brain into two physical files. Now I can’t look at the whole thing at once, and their internal wiring is more prominent than it deserves. Oops.
— Dan Abramov (@dan_abramov) September 25, 2019
Read more [twitter.com]
How much JavaScript do we really need?
An interesting opinion written by my colleague Seb.
Over the years I’ve experimented with different strategies to build user interfaces. From sprinkling JavaScript over server side templates to full-blown SPAs. My conclusion up until now: we can do better.
Read more [sebastiandedeyne.com]
An alternative way to organize the Laravel directory structure
I don't necessarly agree with every detail in this post, but it's very interesting to see how others structure larger projects.
In this article, I would like to show you an alternative way to organize your Laravel directory structure. I think the default structure is fine for the most projects. But when it comes down to larger projects I was looking for a different structure.
Read more [stefanbauer.me]
Creating beautiful status pages using Oh Dear! original
My buddy Mattias and I are running an uptime checker service called Oh Dear. Earlier this week, we've launched a new major feature: status pages.
In this blog post, I'd like to walk you through what status pages have to offer. We'll also dive deep in some technical details of the underlying Laravel app.
JAMstack as a beginner
– dev.to
I hear more and more people talking about JAMstack. Here's a good post that explains what it is.
JAMstack is am excellent way to build fast, secure and static websites. (keep in mind, not every JAMstack website has every element of the JAM - the core feature that they all have in common is that they are serverless)
Read more [dev.to]
Domain Events vs. Event Sourcing
Christan Stettler wrote an interesting post on why domain events and event sourcing should not be mixed up.
Event sourcing and domain events can of course be used both at the same time, but should not influence each other. The two concepts are used for different purposes and should therefore not be mixed.
Read more [www.innoq.com]
Patterns Are Not Defined by Their Implementation
Some wise words by Mathias Verraes
We must remember to think of a design pattern as “a problem in a context with a reusable solution”, not merely “a reusable solution”. If two patterns have identical solutions, we should not think of them as the same pattern.
Read more [verraes.net]
Functional architecture: the pits of success
Here's a talk by Mark Seeman that explains the differences between object oriented and functional programming.
Patterns for Decoupling in Distributed Systems
On his blog, Mathias Verraes started a series of posts on patterns for decoupling in distributed systems. I'll link to just one of the posts here, but they're all worth your time.
The mind switch is to think of the passage of time as just another Domain Event, exactly like all the other events. After all, if we define a Domain Event as a granular point in time where something happened that is relevant to the business, then certainly the next business day, month, or quarter, is extremely relevant.
Read more [verraes.net]
Video: getting started with event sourcing in Laravel original
The last few months I gave a talk on how to get started with event sourcing at several conferences and user groups. I took the time to record the talk at home. It's now published on YouTube so everybody can enjoy it.
Implementing event sourcing: aggregates original
Recently we've released v2 of laravel-event-projector. The package is probably the easiest way to get started with event sourcing in Laravel.
One of the prominent new features is support for aggregates. While creating v2, I found it surprising that such a powerful concept could be implemented in so little code. In this short blog post, I'd like to explain how aggregates are coded up.