Shyam-Sundar-Bharathi / cse210-tinyfoot-team14

MIT License
0 stars 0 forks source link

003-ADR-Handling-DOM-Manipulation-in-Bigfoot #3

Closed shouhardik closed 1 month ago

shouhardik commented 1 month ago

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

Pros and Cons of Other Options

  1. Vanilla Java Script:

    • Pros: No external dependency, better performance.
    • Cons: Requires more code, manual handing of cross-browser issues, more effort needed for handling and animations For Bigfoot.j's purposes, it is more crucial for simplicity over the benefits of Vanilla JavaScript.
  2. Modern Front-End Frameworks (React, Vue):

    • Pros: Virtual DOM for more efficient building and scalability
    • Cons: It might be an overkill for just the purposes of Bigfoot.js. It also requires a lot of

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:

rashi-bhansali commented 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.

philemonputra commented 1 month ago

Sorry we are still writing the ADR

philemonputra commented 1 month ago

Should be up to date now

jet0612 commented 1 month ago

Since littlefoot does not require jQuery, could we already obviously observe the effect of its not using jQuery and how littlefoot handle it?

philemonputra commented 1 month ago

One concern discussed is that implementing ADR 2 with ES6 JS could conflict with jQuery as mentioned in this ADR

Shyam-Sundar-Bharathi commented 1 month ago

This ADR was rejected due to conflicts with ADR02 - which was eventually extended into ADR05 and implemented.