React.js – JSX, useState, useEffect, custom hooks, comparison with Vue
After covering Vue.js in September, it is time for React – currently the most popular frontend library for building interactive UIs. React thinks differently from Vue: everything is a function, state flows one way, and JSX looks like HTML in JavaScript. I show the fundamentals from a PHP developer’s perspective and compare the two approaches.
- Published in JavaScript
BFS and DFS – graph traversal, shortest path, cycle detection
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.
- Published in Algorytmy
Cron in Magento 2 – groups, custom jobs, admin schedule, debugging
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.
- Published in Magento / Adobe Commerce
Command pattern – undo, CommandBus, macros, Magento 2 queue integration
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.
- Published in Wzorce projektowe
