PHP / Magento Dev Blog

  • Publikacje
  • O autorze
  • Kontakt

Magento B2B – Company, Shared Catalog, Negotiable Quote, custom plugins

  • 0
Henryk Tews
Tuesday, 21 May 2024 / Published in Magento 2

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 Bus, Query Bus, read models, Magento 2 integration

  • 0
Henryk Tews
Tuesday, 07 May 2024 / Published in Wzorce projektowe

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

Trie – prefix tree, autocomplete, spam filter, benchmark vs array

  • 0
Henryk Tews
Tuesday, 16 April 2024 / Published in Algorytmy

A Trie (prefix tree) is a data structure that stores strings in a tree where each node represents a character. It is the foundation of autocomplete, spell-check, and IP routing. PHP arrays can implement the same functionality but at very different performance characteristics. I implement a Trie from scratch and benchmark it against array-based approaches.

(more…)

AI tools for the PHP developer – Copilot, Claude, Ollama, where it helps and where it fails

  • 0
Henryk Tews
Tuesday, 02 April 2024 / Published in PHP

AI coding assistants moved from novelty to daily tool in the span of a year. After using GitHub Copilot, Claude, and local models via Ollama for several months across PHP and Magento projects, I have a clear picture of where they genuinely save time and where they confidently generate plausible-looking wrong code. This is an honest assessment, not a marketing piece.

(more…)

REST API security – tokens, ACL, nginx rate limiting, monitoring suspicious requests

  • 0
Henryk Tews
Tuesday, 19 March 2024 / Published in Magento 2

Magento 2 REST API is powerful but exposed to abuse if not properly secured. Default token authentication, over-permissive ACL resources, no rate limiting, and logging gaps are the most common issues I see on production installations. I show a layered security approach: proper token management, granular ACL, nginx rate limiting, and monitoring for suspicious patterns.

(more…)

ReactPHP – event loop, parallel HTTP requests, HTTP server, Fibers bridge

  • 0
Henryk Tews
Tuesday, 05 March 2024 / Published in PHP

ReactPHP is a library for event-driven, non-blocking I/O in PHP. It brings the same model that made Node.js famous to the PHP world – a single-threaded event loop that handles multiple concurrent connections without threads. I show how to build a simple HTTP server, make parallel HTTP requests, and bridge between ReactPHP’s promise-based async and PHP 8.1’s Fibers.

(more…)

Next.js for the PHP developer – SSR, Server Components, GraphQL with Magento

  • 0
Henryk Tews
Tuesday, 27 February 2024 / Published in JavaScript

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.

(more…)

Visitor pattern – double dispatch, CSV/PDF export, validation without modifying classes

  • 0
Henryk Tews
Tuesday, 13 February 2024 / Published in Wzorce projektowe

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.

(more…)

Hyvä Theme – architecture, Alpine.js, Tailwind, PHTML templates, events

  • 0
Henryk Tews
Monday, 22 January 2024 / Published in Magento 2

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.

(more…)

PHP 8.4 preview – property hooks, asymmetric visibility, chaining new

  • 0
Henryk Tews
Tuesday, 09 January 2024 / Published in PHP

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.

(more…)

  • 4
  • 5
  • 6
  • 7
  • 8

© 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}