Page 328 - Mironsoft Blog
-
Maxim Mironjuk
-
February 11, 2025
A direct fetch call that throws JSON at the template is not an API layer, it is a maintenance problem waiting to happen. DTOs, structured error mapping, and retry logic turn a Vue REST API integration into a stable layer you can actually rely on.
-
Maxim Mironjuk
-
February 11, 2025
Once the customer scrolls past the original add-to-cart button, a lean sticky add to cart bar takes over at the bottom of the screen. With x-intersect instead of a custom scroll listener, this pattern can be implemented performantly and without layout thrashing, in sync with variant selection and quantity in the main form.
-
Maxim Mironjuk
-
February 11, 2025
An assignment like $b = $a for a large PHP array looks at first glance like an expensive copy operation, but internally it initially only costs incrementing a reference counter. Copy-on-Write postpones the actual copy to the moment one of the two variables is actually modified, and this exact mechanism decides memory usage and performance for every array hand off in PHP.
-
Maxim Mironjuk
-
February 10, 2025
Server side rendering delivers visible content quickly, but hydration often makes that content interactive only after a delay. Lazy hydration shifts exactly that delay to where nobody notices it: to components that are not yet visible or are not currently needed.
-
Maxim Mironjuk
-
February 10, 2025
Mocking everything a class touches, indiscriminately, produces unit tests that break on every refactor even though the application's behavior never changed. Gerard Meszaros' taxonomy distinguishes dummy, stub, fake, spy and mock as five clearly separated roles, each with a different purpose, a different verification logic and a different degree of coupling to implementation details. This article walks through the theory behind every test double using hand-written PHP implementations, independent of any particular testing framework.
-
Maxim Mironjuk
-
February 09, 2025
An open port does not mean an application is truly ready. Docker Healthchecks give containers a voice of their own: they report when a service can actually process requests, when it is degraded, and when a restart is needed. Without this mechanism, container orchestration stays blind.
-
Maxim Mironjuk
-
February 09, 2025
Requisition Lists are the B2B tool for repeat customers who regularly order the same line items, with their own data model, their own API, and a clear functional distinction from wishlists. Building a custom frontend integration means knowing how the data model is structured, which API operations are available, and where the default feature reaches its limits.
-
Maxim Mironjuk
-
February 09, 2025
Duplicated test data in every setUp, magic arrays in DataProviders, and hardcoded IDs scattered across hundreds of test classes. These are the typical signs of a test suite without a clear data organization strategy. The Builder pattern, fixture classes and factory methods bring order without overengineering.
-
Maxim Mironjuk
-
February 09, 2025
Anyone who still ships product images and CMS assets only as JPEG or PNG is giving away load time and Core Web Vitals points on every page view. An automated WebP conversion in the build and deploy process generates a much smaller WebP variant for every image, serves it through the picture element with a clean fallback, and integrates fully into an existing Hyvä deploy sequence without ever putting the storefront at risk if a conversion fails.
-
Maxim Mironjuk
-
February 09, 2025
Anyone using Elasticsearch only for full text search is leaving most of its analytical power on the table. Bucket aggregations group documents by field values, value ranges or time intervals, while metric aggregations compute concrete numbers such as average, sum or minimum from those groups. Only when both aggregation types work together do you get the dashboards, facets and reports that separate a production search application from a simple keyword search.
-