PHP / Magento Dev Blog

  • Home

React.js – JSX, useState, useEffect, custom hooks, comparison with Vue

  • 0
Henryk Tews
Tuesday, 08 June 2021 / Published in JavaScript

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.

(more…)

BFS and DFS – graph traversal, shortest path, cycle detection

  • 0
Henryk Tews
Tuesday, 11 May 2021 / Published in Algorytmy

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…)

Cron in Magento 2 – groups, custom jobs, admin schedule, debugging

  • 0
Henryk Tews
Tuesday, 13 April 2021 / Published in Magento / Adobe Commerce

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…)

Command pattern – undo, CommandBus, macros, Magento 2 queue integration

  • 0
Henryk Tews
Tuesday, 09 March 2021 / Published in Wzorce projektowe

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 – resources vs actions, HTTP codes, response structure, versioning

  • 0
Henryk Tews
Tuesday, 09 February 2021 / Published in PHP

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…)

PHPUnit – unit tests, mocks, data providers, testing in Magento 2

  • 0
Henryk Tews
Tuesday, 12 January 2021 / Published in PHP

Unit testing in PHP projects is a topic most developers know in theory but keep putting off until “when there is time”. The time never comes. I show how to get started with PHPUnit, how to write tests that actually check something meaningful, and how to mock dependencies – with examples that look like real production code.

(more…)

Symfony components without the framework – Console, Validator, HttpClient

  • 0
Henryk Tews
Tuesday, 08 December 2020 / Published in PHP, Symfony

Symfony is not just a framework – it is a set of independent PHP components you can use separately in any project. Magento 2 itself uses them (Console, Filesystem, Serializer). I show a few components that genuinely help in everyday PHP and Magento work: Console for writing CLI commands, Validator for validating data, and HttpClient for communicating with external APIs.

(more…)

PHP 8.0 – release and first impressions of the new features

  • 0
Henryk Tews
Thursday, 26 November 2020 / Published in PHP

PHP 8.0 was officially released on 26 November 2020. I wrote about the previews in July – now that I have the final version, it is time for first practical impressions. I check what works as promised, what surprised me, and what to watch out for when migrating older projects.

(more…)

Varnish – VCL, cache tagging, ESI, invalidation, DDEV setup

  • 0
Henryk Tews
Tuesday, 13 October 2020 / Published in Magento / Adobe Commerce, Środowiska

Magento’s built-in Full Page Cache stores pages in files or Redis. It works, but it handles requests inside PHP – nginx and PHP-FPM still have to start for every request. Varnish sits in front of nginx and serves pages from memory without touching PHP. For a shop with traffic that is the difference between a second and milliseconds.

(more…)

Vue.js for the PHP developer – Options API, Composition API, Magento REST communication

  • 0
Henryk Tews
Tuesday, 08 September 2020 / Published in JavaScript

As a PHP developer you have probably had some contact with jQuery and maybe a bit of plain JS. Vue.js is the next step – a reactive framework that increasingly appears in e-commerce projects as a frontend layer for headless Magento or as a replacement for the older knockout.js. I show the basics from the perspective of someone who thinks in PHP day to day.

(more…)

  • 15
  • 16
  • 17
  • 18
  • 19

© 2026 Created by

TOP
Zarządzaj zgodą
Aby zapewnić jak najlepsze wrażenia, korzystamy z technologii, takich jak pliki cookie, do przechowywania i/lub uzyskiwania dostępu do informacji o urządzeniu. Zgoda na te technologie pozwoli nam przetwarzać dane, takie jak zachowanie podczas przeglądania lub unikalne identyfikatory na tej stronie. Brak wyrażenia zgody lub wycofanie zgody może niekorzystnie wpłynąć na niektóre cechy i funkcje.
Funkcjonalne Always active
Przechowywanie lub dostęp do danych technicznych jest ściśle konieczny do uzasadnionego celu umożliwienia korzystania z konkretnej usługi wyraźnie żądanej przez subskrybenta lub użytkownika, lub wyłącznie w celu przeprowadzenia transmisji komunikatu przez sieć łączności elektronicznej.
Preferencje
Przechowywanie lub dostęp techniczny jest niezbędny do uzasadnionego celu przechowywania preferencji, o które nie prosi subskrybent lub użytkownik.
Statystyka
Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do celów statystycznych. Przechowywanie techniczne lub dostęp, który jest używany wyłącznie do anonimowych celów statystycznych. Bez wezwania do sądu, dobrowolnego podporządkowania się dostawcy usług internetowych lub dodatkowych zapisów od strony trzeciej, informacje przechowywane lub pobierane wyłącznie w tym celu zwykle nie mogą być wykorzystywane do identyfikacji użytkownika.
Marketing
Przechowywanie lub dostęp techniczny jest wymagany do tworzenia profili użytkowników w celu wysyłania reklam lub śledzenia użytkownika na stronie internetowej lub na kilku stronach internetowych w podobnych celach marketingowych.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Zobacz preferencje
  • {title}
  • {title}
  • {title}