BFS and DFS are fundamental graph traversal algorithms. They appear in unexpected places in web development: finding the shortest path between categories in a tree, detecting circular dependencies between modules, or checking if two nodes in a social graph are connected. I implement both in PHP with practical examples.

(more…)

Magento 2’s cron system is responsible for dozens of background tasks – reindexing, sending emails, cleaning cache, synchronising with external systems. Writing your own cron job is straightforward, but understanding groups, scheduling, and how to debug when a job is not running saves hours. I show the complete picture.

(more…)

The Command pattern encapsulates an operation as an object. This sounds abstract until you see the concrete benefits: undo/redo, operation queuing, logging, retry logic – all flow naturally from treating commands as first-class objects. I show the classic GoF implementation, CommandBus, and integration with the Magento 2 message queue.

(more…)

REST API design is one of those topics where everyone has an opinion but few have a consistent set of rules. Resources vs actions, the right HTTP status codes, response structure, versioning – decisions made here stay with the API for years. I show the principles I follow when designing REST APIs in PHP projects and Magento 2 modules.

(more…)

TOP