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.

(more…)

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.

(more…)

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.

(more…)

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.

(more…)

TOP