The Motivation behind Introducing Fusion.js
With the evolution of the web industry, Uber wanted to upgrade its old monolithic web framework to one that could face the challenges of the present technologically advanced world. Although the already existent solutions did address these issues it was necessary to glue a library on the framework to bring about changes in multiple files that were not related. The aim was to let engineers maintain compatibility with Uber’s plugin infrastructure besides using React and Redux. The following points were addressed in the core framework.
The Interconnected and compound layout of multiple tools was required for code splitting, server-side rendering, and hot module reloading.
Reduce brittleness from tight code coupling found at different locations
The Absence of a good concept for executing and sharing features involving the various aspects of React applications that were server rendered.
Side effects causing testing difficulties.
Monolithic framework lacking in flexibility
Benefits of Using Fusion.js
Fusion.js offers several benefits for its users
Fusion.js offers a flexible plugin making it suitable for creating single page apps and web apps with complex layers to meet the high-quality requirements.
Fusion.js has a single entry point file allowing it to reuse code for both the server and browser. This helps developers to locate code snippets in the library they relate to.
The plugins make use of dependency injection to reveal well-defined APIs to serve other plugins.
Koa is used by Uber as a middleware management providing a unit context based and friendly API. The concept of upstream and downstream is used for lightweight abstraction and lifetime management.
Besides supporting testing tools like Jest, Puppeteer and Enzyme Fusion.js offers other testing tools for developers to test plugins.