JavaScript Data Formatting Decoupling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing approach to embedding dynamic content on web pages using JavaScript libraries lacks flexibility in formatting, requiring multiple variations to be maintained, and each new format must interface with the back-end system, making updates and maintenance cumbersome.
Innovation Solution
Separating data from formatting by generating dynamic JavaScript objects without HTML formatting, allowing static JavaScript functions to format these objects, enabling greater flexibility and decoupling the data and formatting sources, so that dynamically generated objects can be obtained from one server and formatting functions from another.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If multiple variations of dynamically generated JavaScript libraries are created for various formats, then formatting flexibility is improved, but maintenance complexity and difficulty increase
Solution Approach 1:
The patent segments the JavaScript library into two distinct components: a data generation module that creates dynamically generated content, and a separate formatting module that applies different formats. This segmentation allows each component to be independently maintained and updated, resolving the contradiction by enabling formatting flexibility through modular formatting functions while reducing maintenance complexity through clear separation of concerns.
Solution Approach 2:
The patent extracts the formatting logic from the dynamically generated JavaScript library and places it into separate, standalone formatting functions. This extraction allows the core data generation library to remain simple and stable, while formatting variations can be added or modified without affecting the core library, thus improving formatting flexibility while reducing maintenance burden.
2Adaptability or versatility
If each new format establishes a connection with the back-end system, then data access capability is improved, but system complexity and overhead increase
Solution Approach 1:
The patent implements a universal data access interface in the dynamically generated JavaScript library that can serve multiple formatting functions. Instead of each format having its own back-end connection, a single data generation module provides data to multiple formatting functions, reducing system complexity while maintaining data access capability across all formats.
Solution Approach 2:
The patent introduces an intermediary data structure that sits between the back-end system and various formatting functions. The dynamically generated JavaScript library acts as this intermediary, fetching data from the back-end once and making it available to multiple formatting functions, thereby reducing the number of back-end connections needed while maintaining full data access capability.
3Ease of operation
If dynamically generated JavaScript libraries are used for content embedding, then integration simplicity is improved, but formatting control and flexibility worsen
Solution Approach 1:
The patent segments the JavaScript library functionality into data generation and formatting components. This allows web page developers to maintain the simple integration approach by including the core data generation library, while gaining enhanced formatting control through separate formatting functions that can be applied to the generated data without complicating the integration process.
Data Source
AI summary
The present invention provides an approach and corresponding framework that separates data from its formatting/view by generating the dynamic JavaScript (data) as a set (e.g., at least one) of JavaScript (data) objects, without any HTML formatting. Then, a set of JavaScript functions can be created that takes the set of JavaScript objects as a parameter, and outputs all or a subset of this data object in a format determined by this JavaScript function. In general, these formatting functions can be static, rather than dynamic, JavaScript. This approach has the advantage of providing a much greater degree of formatting flexibility, without the need for each new format to establish a connection with the back-end system providing the data.


