CottageLabs / edges

Data query, manipulation, search and visualisation front-end library
MIT License
8 stars 7 forks source link

Edges inside React #39

Open richard-jones opened 2 months ago

richard-jones commented 2 months ago
varadekd commented 1 month ago

@richard-jones

"Embed into Invenio with React + Semantic UI" does this mean, I need to work on Invenio project and plug edges inside the already existing code base? If so can you point me to the correct repo in which we need to build this.

varadekd commented 5 days ago

@richard-jones

The current library is built using a class-based approach, which makes integration with modern JavaScript frameworks like React and Vue difficult. These frameworks support a module-based approach, which is different from our current structure. While the existing library works well with Vanilla JS, to ensure compatibility with both Vanilla JS and modern JavaScript frameworks, we need to refactor it to use a module-based approach.


Approaches for Refactoring the Library

1. Incremental Refactoring (Patchwork Approach)

Description: This approach involves gradually converting the library to a module-based structure piece by piece without making significant architectural changes.

Pros:

Cons:

2. Comprehensive Refactoring (Architectural Redesign)

Description: This approach involves planning and redesigning the library’s architecture before making any code changes.

Pros:

Cons:

Summary

Approach 1: Faster, more flexible, but may lead to technical debt and inconsistencies. Approach 2: Slower, ensures consistency and maintainability, but requires more initial investment in planning and design.

We can discuss this over a call or on chat.