Design Patterns by PHP and JavaScript examples

Design Patterns
Design Patterns by PHP and JavaScript examples
Image generated by Gemini

After having your project fully tested, deployed and running, it seems the application architecture is pretty good enough. All the requirements met and everybody is happy. But then as it happens, the requirements change and you, all of sudden, find yourself in the time of troubles. It comes out that some modules easier to hack than to modify. Change of other ones brings endless changes in a cascade of dependent modules. Or you change one module and whole the application starts to collapse like a house of cards. And, of course, you find out that you can’t reuse already written modules for the new tasks, because the encapsulation of the desired parts would take too much risk and work. Robert C. Martin was very accurate naming those symptoms of rotting design as Viscosity, Rigidity, Fragility and Immobility

Anonymous Functions and Closures in PHP

PHP
Anonymous Functions and Closures in PHP
Image generated by DALL·E

If you are used to switch between JS and PHP programming, it obviously happened to you to miss some of JS flexibility in PHP. I felt it every time when declaring a callback function , being eager to apply something from JS like that...

How to Make AJAX Read between the Lines

Web Standards
How to Make AJAX Read between the Lines
Image generated by DALL·E

A walkthrough of how to build on-hover term definitions using AJAX. When a visitor hovers over a technical keyword, JavaScript fetches the definition from a server endpoint and shows it in a popup, without any page reload.

Interactive Grid with Your Own Hands

JavaScript
Interactive Grid with Your Own Hands
Image generated by DALL·E

Users coming from desktop apps tend to find web application interfaces frustrating. With AJAX, there is no good reason for that. This article walks through building an interactive data grid with sorting, filtering, and pagination, all without reloading the page.