PWA Studio, Hyvä, and Luma are the three main frontend options for Magento 2. Each represents a fundamentally different architecture and development model. Choosing the wrong one is an expensive mistake that is hard to reverse. I give an honest comparison including Total Cost of Ownership, not just technical features.
Running Magento 2 in production with Docker Compose requires more than just copying the development setup. Secrets management, health checks, zero-downtime deployment, and log aggregation are the gaps between “works on my machine” and “runs reliably in production”. I show a complete production-grade docker-compose configuration with all these pieces in place.
A Bloom Filter is a probabilistic data structure that answers “is this element in the set?” with two possible answers: “definitely not” or “probably yes”. False positives are possible, false negatives are not. This makes it perfect for negative caching, token blacklists, and spam detection – cases where you need to quickly eliminate non-members before doing an expensive lookup.
PHP 8.4 final RC is here with three features that did not get enough attention in the preview posts. Lazy Objects let the DI container defer expensive object construction until first use – without manually writing Proxy classes. BcMath\Number finally gives PHP a clean API for arbitrary precision arithmetic. Dom\HTMLDocument brings proper HTML5 parsing to PHP’s DOM extension. I show all three in code.
OpenTelemetry is the emerging standard for distributed tracing, metrics, and logs. Where Blackfire shows you what is slow within a single PHP process, OpenTelemetry shows you what happens across multiple services – from the Magento web server through Redis, MySQL, and external APIs, to the queue consumer. I show auto-instrumentation setup, Jaeger in DDEV for viewing traces, and adding custom spans to your own code.
Event Sourcing is an architectural pattern where instead of storing the current state of an entity, you store the sequence of events that led to that state. The current state is always derived by replaying the events. Combined with CQRS it gives you a complete audit trail, time-travel debugging, and the ability to create new read models from historical data. I show the core concepts with PHP implementation and connect them to CQRS.
A custom shipping carrier in Magento 2 goes beyond just returning rates – full implementations include package tracking, label generation, and webhook handling for status updates. I show the complete implementation from collectRates through tracking requests to PDF label generation, using a fictional carrier API to demonstrate all the integration points.
PHP 8.4 RC is out and the final release is coming in November 2024. Property hooks looked great on paper – after a month with RC builds on real code I can report what works exactly as expected, where the syntax surprises you, and what limitations matter in practice. Asymmetric visibility also has a few edge cases worth knowing before the feature goes stable.
Memento is a behavioural pattern that captures and restores an object’s internal state without violating encapsulation. It is the foundation of undo/redo, version history, and audit logs. I show the classic GoF implementation, a practical price history tracker for Magento, and a database-persisted version that doubles as an audit log.
Blackfire is a PHP profiler that shows not just what is slow, but why – with call graphs, timeline, and SQL query analysis. Unlike Xdebug which shows you line-level execution, Blackfire aggregates and visualises the performance bottlenecks in a way that makes them immediately actionable. I show installation in DDEV, profiling HTTP requests and CLI commands, and writing performance assertions for CI/CD.
