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.
Customising the Magento 2 checkout is one of the most requested – and most feared – development tasks. The checkout is a JavaScript-heavy single-page application built on Knockout.js and RequireJS. Adding custom fields, new steps, or modifying the order of existing ones requires understanding the JS architecture alongside the PHP backend. I show a complete example: custom delivery note field from frontend to Order.
PHP 8.3 was officially released on 23 November 2023. After a few weeks of real use, the features that seemed minor on paper turn out to be genuinely useful in everyday code. Typed class constants stop silent type errors in constant definitions. json_validate() replaces decode-and-discard. The readonly amendment makes value object cloning finally ergonomic. I show all three in production scenarios.
WooCommerce and Magento 2 are both serious e-commerce platforms, but they target fundamentally different use cases and developer profiles. After years of working primarily in Magento 2 I have done several WooCommerce projects. The architecture differences are real and the choice matters. I compare both platforms where it counts for a developer making the decision.
GraphQL Federation allows splitting a monolithic GraphQL schema into separate subgraphs maintained by different teams or services. Each service owns its part of the schema; the gateway stitches them together transparently for the client. This architecture fits e-commerce well: products, inventory, pricing, and orders as independent services with a unified API layer.
Dijkstra’s algorithm finds the shortest path in a weighted graph – the generalisation of BFS for graphs where edges have costs. It is the foundation of GPS navigation, network routing, and in e-commerce it appears in warehouse routing, delivery zone assignment, and shipping cost calculations. I implement it in PHP with SplMinHeap and show practical applications.
PageBuilder is Magento 2’s drag-and-drop content editor that replaced the plain HTML textarea in admin. A custom content type lets merchants create complex layouts without HTML knowledge while giving developers full control over the output. I show the complete implementation: XML configuration, JavaScript preview in admin, and frontend rendering.
