Analysis of DOM update methods in modern web frameworks: Virtual DOM and Incremental DOM
- Авторлар: Bondarenko O.S.1
-
Мекемелер:
- Шығарылым: № 2 (2025)
- Беттер: 35-43
- Бөлім: Articles
- URL: https://journal-vniispk.ru/2454-0714/article/view/359370
- DOI: https://doi.org/10.7256/2454-0714.2025.2.74172
- EDN: https://elibrary.ru/JCILDR
- ID: 359370
Дәйексөз келтіру
Толық мәтін
Аннотация
The article presents an analysis of modern methods for updating the Document Object Model (DOM) structure in popular client-side web frameworks such as Angular, React and Vue. The main focus is on comparing the concepts of Virtual DOM and Incremental DOM, which underlie the architectural solutions of the respective frameworks. The Virtual DOM used in React and Vue operates on a virtual tree, compares its versions in order to identify differences and minimize changes in the real DOM. This approach provides a relatively simple implementation of the reactive interface, but comes with additional costs for computing and resource usage. In contrast, Angular uses an Incremental DOM, which does not create intermediate structures: changes are applied directly through the Change Detection mechanism. This approach allows to achieve high performance through point updates of DOM elements without the need for a virtual representation. The study uses a comparative analysis of architectural approaches to updating the DOM, based on the study of official documentation, practical experiments with code and visualization of rendering processes in Angular and React. The methodology includes a theoretical justification, a step-by-step analysis of the update mechanisms and an assessment of their impact on performance. The scientific novelty of the article lies in the systematic comparison of architectural approaches to updating the DOM in leading frameworks, with an emphasis on the implementation of the signal model in Angular version 17+. The impact of using signals on the abandonment of the Zone library is analyzed in detail.js and the formation of a more predictable, deterministic rendering model, as well as lower-level performance management capabilities. The article contains not only a theoretical description, but also practical examples that reveal the behavior of updates in real-world scenarios. The nuances of template compilation, the operation of the effect() and computed() functions are also considered. The comparison of Virtual DOM and Incremental DOM makes it possible to identify key differences, evaluate the applicability of approaches depending on the tasks and complexity of the project, and also suggest ways to optimize frontend architect
Негізгі сөздер
Әдебиет тізімі
Бетеев К.Ю., Муратова Г.В. Концепция virtual dom в библиотеке react.js // Инженерный вестник Дона. – 2022. – № 3. – С. 170-180. EDN: LHOOOS. Incremental DOM [Электронный ресурс]. URL: https://github.com/google/incremental-dom (дата обращения: 16.04.2025). Introducing Incremental DOM [Электронный ресурс]. URL: https://medium.com/google-developers/introducing-incremental-dom-e98f79ce2c5f (дата обращения: 12.04.2025). Understanding Angular Ivy: Incremental DOM and Virtual DOM [Электронный ресурс]. URL: https://blog.nrwl.io/understanding-angular-ivy-incremental-dom-and-virtual-dom-243be844bf36 (дата обращения: 16.04.2025). Разбираемся в Angular Ivy: Incremental DOM и Virtual DOM [Электронный ресурс]. URL: https://habr.com/ru/articles/448048/ (дата обращения: 03.03.2025). Virtual DOM vs Incremental DOM in Angular [Электронный ресурс]. URL: https://www.angularminds.com/blog/virtual-dom-vs-incremental-dom-in-angular (дата обращения: 17.02.2025). Angular Документация [Электронный ресурс]. URL: https://angular.dev/api/core/ChangeDetectionStrategy (дата обращения: 16.04.2025). Довженко М.И., Готская И.Б. Анализ способов реализации алгоритма отслеживания изменений в одностраничных веб-приложениях // Альманах научных работ молодых ученых XLVII научной и учебно-методической конференции Университета ИТМО. Том 7. – 2018. – С. 123-126. EDN: YXNFSH. Исходный код примеров [Электронный ресурс]. URL: https://stackblitz.com/edit/6meb5pyu?file=src%2Fmain.ts (дата обращения: 16.04.2025). Zone.js [Электронный ресурс]. URL: https://github.com/angular/angular/tree/main/packages/zone.js (дата обращения: 16.04.2025).
Қосымша файлдар
