RSSAmplifier

Blog

Weblog on Dmitry Sheiko's Web Development Blog

Recent content in Weblog on Dmitry Sheiko's Web Development Blog

dsheiko.comRSS feed ↗93 posts

Latest posts

Migrating Legacy Apps to Next.js with Claude Code

Over the past year I migrated several legacy projects to Next.js with the help of Claude Code. Along the way I found a workflow that consistently produced good results, and it’s worth sharing because it saved a surprising amount of time. Migrating functionality and content Most of the legacy projects I worked on were PHP applications. Claude Code wasn’t just copying templates. It…

React Design Patterns: A Practical Reference

GoF design patterns gave OOP developers a shared vocabulary for recurring structural problems. SOLID gave them principles for evaluating design decisions. React doesn’t fit neatly into either framework, but after several years of widespread adoption, its own set of idiomatic patterns has emerged. These aren’t best practices in the vague sense. They’re concrete, named solutions to…

Thirty Years of Building Software

It probably started when I was very young. My father worked in an industrial automation department that housed a Soviet counterpart of the IBM System/360-370. Sometimes he would lift me through a window into the computer room. I still remember the massive keyboard they let me play with. To a child, it felt like touching something mysterious and almost magical. During my high school years, I spent…

Claude Code Beyond the Basics: Skills, Rules, and Agents

As a web developer, you can start using Claude Code in VS Code almost immediately after installing the extension. Even without any advanced setup, it already handles a surprising amount of routine work. You can treat it like a developer who handles routine implementation tasks under supervision, helps with refactoring, upgrades libraries and frameworks, generates tests, updates documentation after…

Must-Know Web Development Concepts in 2026

Software can be perfectly functional, secure, and even performant, yet still become a long-term problem. The real test of a system is not whether it works today, but whether it can survive tomorrow’s requirements. When code becomes difficult to modify, every small change risks breaking something unrelated. Features take longer to implement, bugs appear in unexpected places, and eventually even…

How to Add Web Push Notifications to a Next.js App

Web Push notifications have quietly become one of the most effective engagement channels on the web. They don’t require an email address. They don’t depend on social algorithms. And they work even when your website isn’t open. If you run a blog, SaaS, e-commerce store, or internal platform, Web Push can dramatically improve retention and real-time communication. Let’s walk through what Web Push…

A Global Custom 404 Page for Route Groups in Next.js

Implementing a custom 404 page in Next.js versions <=16 can be surprisingly tricky when using route groups. By default, Next.js expects a not-found.jsx file to be placed next to the layout of a route. But what happens when you have multiple route groups with different layouts? Let’s dive in. Suppose we have two route groups, each with its own layout and not-found.jsx: app ├── (admin) │ ├── admin │…

Tables and Modals in Next.js 16: Preserving State

When developing administrative UIs, one of the most common patterns is a table to navigate database records and modals to view or edit individual entries. In Next.js, this can be achieved in several ways, not only with Parallel Routes, which are the officially recommended approach in the documentation. In this article, I’ll share three different implementation strategies I explored and discuss…

Optimizing End-to-End Testing with Playwright

E2E tests are easy to write and hard to keep fast and reliable. This guide covers how to structure Playwright tests with fixtures, handle authentication flows, work with data tables, check responsive layouts, and set performance budgets, whether you&rsquo;re coming from Selenium or Cypress or starting fresh with Playwright.

Next.js 15 Tutorial: Full-Stack App with Ant Design

At the beginning of 2025, Next.js is likely the best choice for React developers building server-side applications. Personally, I&rsquo;m used to developing apps without a framework. I typically use Express.js to write a REST API server with both SSR and client-side rendering. While this approach offers maximum flexibility, it comes at the cost of excessive boilerplate code. It also requires…

Refactoring Legacy React: From OOP to Functional

When React Hooks arrived in 2019, migrating a large class-based codebase to functional components looked impractical. A few tricks made it workable: composition instead of inheritance, useImperativeHandle for imperative APIs, and function-based customization in place of subclassing.

From Zero to Blog: Getting Started with Hugo

This blog hadn’t a redesign for a decade. It was driven by self-made CMS, which naturally has become, say the least of it, outdated. So some time ago I ripened for a remastering. Instantly I started by looking for a CMS or a headless CMS. Then I realized, the blog is actually static – I don’t have here any forms or services, it’s all about representation of content. Why not to go with a site…

Puppetry 3: Test Automation without Coding

Nowadays nobody would argue the importance of automated testing. Yet end-to-end tests are often hard to write and even harder to maintain. There are many solutions to help with it. Puppetry is a test constructor, which allows you building test suites without any coding. QA-engineer can record user scenario in a built-in browser, extend the generated test case with browser commands and assertions,…

Building an Awesome Image Preview with LQIP

Images in HTML, what could be easier? However when you have many of them on a page, they do not appear immediately. That depends on caching strategy and bandwidth, but still if you don’t take a special care it may look quite ugly. Basically we need to fill in the slots with something appropriate while images are loading. In other words we need placeholders. Probably the most prominent technique…

Testing Email Activation in Sign-Up Flows

Functional testing is nothing new. We all do it, to varying degrees, with different tools and approaches. But when flows involve transactional emails (signup confirmations, password resets, purchase notifications), things get trickier. You instruct your testing tool to navigate to the registration page, fill out the form, and click submit. The app sends a confirmation email with an activation…

Puppetry 2.0 released

Eventually Puppetry 2.0 was released. The development took for a while, yet it contains a lot of changes. In fact the branch 1.x was basically a GUI for Puppeteer/Jest, but the tool grew up into a fully-fledged testing environment. Now Puppetry has a built-in templating engine, which supports environment-dependent variables and expressions, what brings a great potential. Just consider: you have…

Validating Function Arguments in JavaScript: The Smart Way

In software engineering we try to discover and eliminate bugs as soon as possible. One of the most important heuristics here is validation of input/output on functions and methods. If you are going with TypeScript or Flow, you are fine. But if not? Then we have to manually validate at least input (arguments). What would be the best way to do it? First comes to mind aproba. It&rsquo;s ridiculously…

Puppeteer for E2E Testing: How to Automate Your Web Tests

A sound application architecture doesn&rsquo;t resist to changes, but welcomes them. Yet it still doesn&rsquo;t guarantee that the code is unbroken after we implement new features, making fixes or refactoring. Here we run automated tests to ensure that the app integrity didn&rsquo;t suffer. So we write unit-tests to check if separate objects, methods, functions work property independently. With…

Effortless Form Handling in React with HTML5 Validation API

When we talk about user input within a web app we often think first of HTML forms. Web forms have been available with the very first editions of HTML. Apparently the feature was introduced already in 1991 and standardized in 1995 as RFC 1866. We use them everywhere, with almost every library and framework. But what about React? Facebook gives a limited input on how to deal with forms . Mainly…

Optimizing Your Dev Workflow with Webpack 3

I’ve been working with PHP since 2000 and with JavaScript even longer. Over last decade JavaScript evolved drastically. It had a promising design from the very beginning and gained its current incredible shape with the shift to ES2015 (Harmony). PHP though didn’t change that much. Apparently it’s doomed always to suffer from its own legacy. It arrived in middle 90s as a simple CGI app to maintain…

Setting Up Dev Environment with Webpack 3

I observe as some people still write ancient ES5 syntax of JavaScript and it’s disheartening. I wonder what keeps them from moving forward. Some must be driven by psychological inertia, but some likely just find it to complex to make their new syntax running in a wide range of browsers. In fact, nowadays we may not fear about it anymore. One can set up a dev environment where tools decide what…

Leveraging HTML5.2 for Interactive Web Apps

What do you do when you need a widget-like functionality? At the present there is a whole generation of developers who with as a rule are googling for ready-made jQuery plugin. Can&rsquo;t we do better than that? With advance of web-components we are expected to compose UIs from these building blocks. They are many. One can find one for almost any task. They are highly customizable. One can reuse…

JavaScript Modules in 2017: Where We Stand and What’s Next

Before modules Historically JavaScript had neither a module system, nor facilities to load sources from within the code. In order to understand what have now, let&rsquo;s take a retrospective look. I remember in the past a number of libraries where the code-base was split into a separate files which were concatinating during the build process. As simply as that it didn&rsquo;t help with module…

My Book on Electron, Node, NW.js, and React Is Out

I always fancied to write a book that would combine most of my programming experience gathered over two decades. Packtpub gave a chance that I embraced gratefully. And here we are, half a year of efforts paid off and my book is live - https://www.packtpub.com/web-development/cross-platform-desktop-application-development-electron-node-nwjs-and-react I split the book in four tutorials, starting…

Bringing Angular 2&#43; Development Experience into Backbone

I&rsquo;ve been working with Backbone for years and it suited me pretty well. I do love its conciseness. It gives the desired abstraction and yet leaves you at the full control of your app. When you need to know what exactly is happening in your app behind your code, it&rsquo;s matter of minutes to go though the Backbone annotated sources and figure out the flow. That&rsquo;s something you hardly…

Stop Bugs Before They Happen: Function Guards in JavaScript

As developers we spend a lot of our time on debugging and particularly on spotting the source of a problem. DevTools guides us though the call stack, but the tracing process can be still pretty time consuming, especially on a cascade of asynchronous calls. The remedy here is early problem reporting. Let&rsquo;s say we have a function to search trough a multidimensional structure for the elements…

Nightmare of End-to-End Testing

Modern application get complex, we cannot go without automated testing. The canonical agile testing quadrants are split to technology-facing and business-facing tests. As for technology-facing testing I believe nowadays everybody has dealt with unit-tests. Thus we make sure that the smallest parts of the system act as intended in isolation. Also we use component tests to verify the behavior of…

Writing Backbone Applications in TypeScript

Nowadays JavaScript evolves fast. We have ECMAScript 6th and 7th editions released over just 2 years. the current support of ES6 specification in major browsers is close to 100%. So the language changed, and changed for better. It has become more expressive, much more concise and readable. It is tempting to jump into, but what about older browsers? Transpilers can translate ES.Next into the…

User Experience: A Chapter from Unlocked JavaScript

My book “Unlocked JavaScript” (https://www.packtpub.com/web-development/javascript-unlocked) has been released on December 7, 2015. This book is for developers already familiar with JavaScript who want to level up to get the most out of the language. The book is practice–oriented and would be most helpful for those who is used to learn by doing as the topics are thoroughly covered with real-life…

Responsive Web Design: Best Practices for Performance

User are impatient. Majority would leave a resource if it failed delivering the core user experience in 1-3 seconds. Today when mobile overtakes fixed Internet access you need to think of how the app loads on a low bandwidth, what images must requested on what devices, how stylesheets and JavaScript are cached e.t.c. Fortunately there a number of amazing tools such as PageSpeed Insights,…

Automated CSS Regression Testing in Action

We write unit-tests tests for server-side source code and for JavaScript. Even when putting aside benefits of TDD approach it gives us a priceless thing – early problem reporting during refactoring. So you make change, you run tests and you will know at once if anything broke. What about CSS? You encapsulate a declaration set into a separate rule, look through the site pages where dependent…

Packaging JavaScript for Scalable, High-Performance Apps

Modules in JavaScript With the advance of MV* frameworks you can observe as JavaScript evolves ahead of official specs towards large scale development. It requires even higher level of maintainability and one of the first focuses here is encapsulation and information hiding. We need the code-base to be organized into independent, interchangeable components so that each of them contained code…

10 Things You Need to Know About CSS

CSS may look as a simple language. In fact it can be simple only to use, but definitely not simple to maintain. Observing that the maximum number of people who can productively simultaneously work on CSS is one &ndash; @threedaymonk The skills required to write good CSS code are by and large the same skills required to write good code in general. &ndash; Lea Verou Everybody who used to work on a…

Creating a web-component: VanillaJS vs X-Tag vs Polymer

It seems like these days the most trending concept in the HTML5 world is web components. But what the fuss is all about? In order to make such a simple thing as a container expanding on click in past we needed to write CSS and JavaScript. Today thanks to checkbox-hack and :focus or :target pseudo-selector we go on with CSS-only. In fact by using summary/details elements we do not need any tricks…

Pure CSS Magic: Modal Windows Without JavaScript

What we are going to do is a modal window that opens in the center of the screen by pressing a link while everything that underlies the window becomes blurred. It can be done by [Dialog element](http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-dialog-element &ldquo;Dialog` element&rdquo;), but these day we don&rsquo;t need any JavaScript realy to solve this task. Well,…

JavaScript MV* Framework - Making the Right Choice

JavaScript frameworks have been proliferating recently with a frightening rate. Just take a look at TodoMVC that provides dozens of MV* framework-specific implementation for a single task. It gives a felling how must be confused a developer making a choice for a framework. Some time ago I even ran into a manifesto (http://bitworking.org/news/2014/05/zero_framework_manifesto) against JavaScript…

Enabling Templates in Client-Side JavaScript with CJSC

In spite of most server-side languages JavaScript was not designed for templates. Yet we have plenty of template engines for client-side JavaScript now. They allow us processing templates, but what about declaring a template? As you know JavaScript doesn’t provide a decent way to assign a multiline text to a variable. Well, you can go with string spitted by back-slashes, but in this case a…

Modular JavaScript in the browser with CommonJS Compiler

JavaScript was designed as a script language that is easy to embed in a larger host system and meant to manipulate the objects of the host system. With the advance of HTML5 formerly mostly static web-pages are turning into sophisticated web-applications. Now we expect JavaScript code to be scalable and modular. But how when JavaScript has no built-in facilities to combine distinct scripts? Surely,…

Mastering Responsive Web Design with HTML5

Bobby Solomon, from the Disney team, said in 2012: &ldquo;Honestly, our team is bored of talking about responsive design. It&rsquo;s how any self-respecting website should behave in 2012&rdquo;. Responsive web design (RWD) is no panacea, but it is a clear quality indicator as the range of devices people use to browse the web keeps growing. Put simply, RWD is a way to deliver a decent user…

Seamless Development: Mastering Live Reload

We all are taught not to repeat ourselves while coding. Nonetheless we keep repeating the same operation over and over – pressing F5/Ctrl-R for browser reload every time we have to examine the results of our last changes. After watching some of Paul Irish screencasts where he was showing the magic of live reload under Sublime Text 2 I wondered if I could employ something alike while keeping…

Importing External Files in JavaScript

As JavaScript application grows, navigation on the code becomes a hell. It comes on mind how useful would be to have ability including JavaScript files. For example, thanks to include/require statements we can build an expressive file structure in PHP. Let’s say following PSR-0 standard we have one class per file (or one prototype object per file in JavaScript) and class name (namespace) reflects…

Mastering HTML5 Forms: Validation, Inputs, and Beyond

Since the very beginning of HTML there were no much of changes regarding forms until recently. Yet, there was an attempt to bring a new API with XForms, but it was never really supported by any of major browsers. Now we have a comprehensive consistent Form API which allows us to create full-fledged forms even with not help of JavaScript. Everything sounds so exciting until you try to use HTML 5…

Google Analytics Reports, Right Inside Your App

Reasonably statistic analyses belong to CMS ACP reports. So, CMS vendors tend to include some into their products. However, they often make statistical data collection and analysis a part of CMS. It usually gains some primitive reports and affects application performance. I believe any sound statistic analysis can be delivered only by a dedicated specialized application. Meantime CMS can be used…

JavaScript Asynchronous Dependency Loader

Back in 2013, AMD was the standard approach for non-blocking script loading. It works well, but requires every dependency to be wrapped as an AMD module. That&rsquo;s fine for your own code. For third-party libraries, it means patching external code just to satisfy a module format, which isn&rsquo;t a trade-off worth making. So I built a small loader that works around this. Non-AMD libraries…

Harmony with TypeScript

On the way to harmony Not so long ago Microsoft announced a new language targeting front-end developers. Everybody&rsquo;s first reaction was &ldquo;Why on Earth?!&rdquo; Is it just Microsoft taking a shot at Google? Is that a trick to promote Visual Studio? But anyway, what&rsquo;s wrong with JavaScript? Why is everybody so keen to replace it? For a language designed in just two weeks, JavaScript…

Review: PHP Application Development with NetBeans

Recently I&rsquo;ve laid my hands on a copy of [&ldquo;PHP Application Development with NetBeans&rdquo; by M A Hossain Tonu](http://www.amazon.com/gp/product/1849515808 &ldquo;&ldquo;PHP Application Development with NetBeans&rdquo; by M A Hossain Tonu&rdquo;) (www.PacktPub.com). It appeared to be a really nice reading. One of those where it&rsquo;s hard to put the book down until the end. It must…

Optimizing Mobile Navigation: A Smooth UX for Small Screens

Making design responsive means not only certain representations on different screens, but also particular behavior on different devices. Usually on mobile devices mouse is not available, keyboard with navigation keys is out of reach. So we are short of controls to provide a useful navigation. Image viewer Let’s take image viewer. User taps a thumbnail and gets an overlay with the image. We don’t…

My lovely Mac OS X web-development environment

A few months ago I bought a new Macbook. I’m really fond of the development environment I set up on it. The more I work with it, the more I love it. However, while building the environment I couldn’t find any decent step-by-step manual. So, it took me for a while to get what I wanted. Here’s my experience. Front-end environment For the beginning we need a package manager. Here arises the first…

Getting started with TypeScript

After Microsoft released TypeScript I took a look at their examples and found the idea pretty promising. I do love JavaScript. However, it has its bad parts. JavaScript doesn’t provide any built-in facilities to declare interfaces or object abstraction. There is no explicit way to have type annotations and type checking. Well, even class-based OOP is not a part of the language. Flexibility of…

10 things you need to know about JavaScript

Back in 1995 Netscape wanted a language with a simple programming model, but flexible enough for building real scalable applications. Curious, that Brendan Eich accomplished the task in a few weeks. So, we have JavaScript which seems so simple that many people don&rsquo;t even bother to learn the language while using it. And yet it works! However, it turned out to be one of the reasons why…