Magento B2B is a separate module suite for business-to-business selling. Company accounts, Shared Catalogs with customer-specific pricing, Negotiable Quotes, and Requisition Lists are the core features. I show the architecture, how each feature connects to the core Magento data model, and how to extend them with custom plugins.
CQRS (Command Query Responsibility Segregation) is an architectural pattern that separates write operations (Commands) from read operations (Queries). This separation enables independent optimisation of reads and writes, event sourcing, and eventually consistent read models. I show an implementation with CommandBus and QueryBus, apply it to a Magento 2 module, and explain when the added complexity is justified.
A Trie (prefix tree) is a data structure that stores strings in a tree where each node represents a character. It is the foundation of autocomplete, spell-check, and IP routing. PHP arrays can implement the same functionality but at very different performance characteristics. I implement a Trie from scratch and benchmark it against array-based approaches.
AI coding assistants moved from novelty to daily tool in the span of a year. After using GitHub Copilot, Claude, and local models via Ollama for several months across PHP and Magento projects, I have a clear picture of where they genuinely save time and where they confidently generate plausible-looking wrong code. This is an honest assessment, not a marketing piece.
Magento 2 REST API is powerful but exposed to abuse if not properly secured. Default token authentication, over-permissive ACL resources, no rate limiting, and logging gaps are the most common issues I see on production installations. I show a layered security approach: proper token management, granular ACL, nginx rate limiting, and monitoring for suspicious patterns.
ReactPHP is a library for event-driven, non-blocking I/O in PHP. It brings the same model that made Node.js famous to the PHP world – a single-threaded event loop that handles multiple concurrent connections without threads. I show how to build a simple HTTP server, make parallel HTTP requests, and bridge between ReactPHP’s promise-based async and PHP 8.1’s Fibers.
Next.js is the most popular React framework for building full-stack web applications with server-side rendering. For a PHP developer the concepts of SSR, static generation, and server-side data fetching are familiar – they are what PHP has always done. What is new is the React component model and the hybrid approach where some code runs on the server and some in the browser. I show Next.js from a PHP perspective with Magento 2 GraphQL as the backend.
Visitor is one of the less commonly used GoF patterns, but it solves a specific problem elegantly: adding new operations to an object hierarchy without modifying the hierarchy itself. Double dispatch – calling different methods based on both the visitor type and the element type – is the mechanism. I show a PHP implementation and apply it to a real scenario: exporting product data to CSV and PDF without adding export logic to the product classes.
Hyvä Theme has become the default choice for new Magento 2 projects. It replaces the Knockout.js and RequireJS stack with Alpine.js and Tailwind CSS, keeping templates in standard PHP/PHTML with no build step for JavaScript. The result is dramatically simpler frontend code and Lighthouse scores that Luma could never reach. I show the architecture and how development actually differs from Luma.
PHP 8.4 is due in November 2024 and its headline features address two long-standing awkwardnesses. Property hooks allow computed and validated properties without getter/setter boilerplate. Asymmetric visibility lets you expose a property publicly for reading but restrict writing to the class. Chaining on new without parentheses removes a syntactic annoyance. I preview all three with practical examples.
