Closed shouhardik closed 1 month ago
I'm confused - are we planning to cache the footnotes for performance concerns or are generating them dynamically through DOM manipulation or both? The title says the latter but the considered option describes the former. Maybe we can discuss this in today's call.
Sorry we are still writing the ADR
Should be up to date now
Since littlefoot does not require jQuery, could we already obviously observe the effect of its not using jQuery and how littlefoot handle it?
One concern discussed is that implementing ADR 2 with ES6 JS could conflict with jQuery as mentioned in this ADR
This ADR was rejected due to conflicts with ADR02 - which was eventually extended into ADR05 and implemented.
Handling DOM Manipulation in Bigfoot
Context and Problem Statement
In the previous prototype, we developed on Bigfoot, we were using Vanilla JS for DOM Manipulation. Bigfoot uses jQuery for DOM manipulation, so we must transition our approach to align with this framework. Our goal is to improve performance, particularly on content-heavy pages that generate and manipulate footnotes dynamically.
Decision Drivers
Considered Options
Performance Concerns: jQuery introduces some overhead compared to vanilla JavaScript. However, this is minimal for the scope of Bigfoot.js, where simplicity, rapid development, and cross-browser compatibility are higher priorities.We will need to monitor the impact of jQuery’s use on the application’s performance and consider optimizations where necessary (e.g., minimizing DOM reflows and repaint cycles).
Library Size: jQuery adds a non-trivial amount of JavaScript to the project (~90KB minified, ~30KB gzipped). To mitigate this, we will include it via a CDN or load it conditionally for application parts requiring heavy DOM manipulation.
Maintainability: To avoid common pitfalls of jQuery, such as code lacking structure, we will implement best practices for modularization. We will encapsulate jQuery logic within reusable functions and avoid scattering DOM manipulation code across various parts of the application.
Pros and Cons of Other Options
Vanilla Java Script:
Modern Front-End Frameworks (React, Vue):
Consequences
Decision Outcome
Chosen option: We will incorporate jQuery for DOM manipulation into Bigfoot.js to improve the ease of manipulating the DOM, handling events, and handling cross-browser. The use of jQuery will support the project's goal for being simple, maintainable, and scalable
Confirmed By: