Framework for dependency management and automatic file load in a network environment
First Claim
1. A method, comprising:
- intercepting, at a client during execution of an application at a browser on the client, a JavaScript call, wherein a source code of the application indicates a timed sequence of execution of JavaScript files, wherein the JavaScript files comprise a first JavaScript file loaded into the client'"'"'s memory element simultaneously with loading the application, a second JavaScript file having a dependency on the first JavaScript file and called during the timed sequence after the first JavaScript file is called, and a third JavaScript file not called after a certain duration of the timed sequence;
accessing, by the client, a map file stored at a server upon intercepting the JavaScript call, wherein the map file is generated automatically at the server before execution of the application on the client, wherein the map file includes a dependency tree comprising the JavaScript files used in the source code, wherein the first JavaScript file is specified in an exclusion file, wherein the map file maps the second JavaScript file for lazy loading, wherein the map file maps Cascading Style Sheets (CSS) files with related map for class names to be used on the application;
reverse mapping from the map file, at the client during runtime of the application, particular JavaScript files corresponding the JavaScript call, wherein the reverse mapping comprises checking the JavaScript call for dependency resolution according to the map file, wherein a resolution scope of lazily loaded files ends with first-level dependencies of such files, wherein the particular JavaScript files are selected for loading according to the dependency resolution;
loading the particular JavaScript files from the server into the client'"'"'s memory element according to the exclusion file and the map file, wherein the loading comprises loading the first JavaScript file according to the exclusion file, lazy loading the second JavaScript file asynchronously with timestamp according to the map file, and reverse mapping relevant CSS files in the loaded files using related class names from the map file; and
deleting, during application execution, the third JavaScript file from the client'"'"'s memory element after the certain duration of the timed sequence.
1 Assignment
0 Petitions
Accused Products
Abstract
An example method for facilitating a framework for dependency management and automatic file load in a network environment is provided and includes deriving dependencies and loading methods of JavaScript files and Cascading Style Sheets (CSS) files referenced by an application source code executing at a browser on a client in a network environment, where the dependencies and loading methods are derived according to a map file accessed from a server, and automatically loading the JavaScript files and CSS files according to the dependencies and loading methods. In a specific embodiment, the map file comprises an Extensible Markup Language (XML) configuration file, which is generated by parsing each JavaScript file for the dependencies and the loading methods. In another embodiment, the map file comprises a JavaScript Object Notation (JSON) file, which is generated by parsing each JavaScript file and CSS file for methods and class names, respectively.
36 Citations
19 Claims
-
1. A method, comprising:
-
intercepting, at a client during execution of an application at a browser on the client, a JavaScript call, wherein a source code of the application indicates a timed sequence of execution of JavaScript files, wherein the JavaScript files comprise a first JavaScript file loaded into the client'"'"'s memory element simultaneously with loading the application, a second JavaScript file having a dependency on the first JavaScript file and called during the timed sequence after the first JavaScript file is called, and a third JavaScript file not called after a certain duration of the timed sequence; accessing, by the client, a map file stored at a server upon intercepting the JavaScript call, wherein the map file is generated automatically at the server before execution of the application on the client, wherein the map file includes a dependency tree comprising the JavaScript files used in the source code, wherein the first JavaScript file is specified in an exclusion file, wherein the map file maps the second JavaScript file for lazy loading, wherein the map file maps Cascading Style Sheets (CSS) files with related map for class names to be used on the application; reverse mapping from the map file, at the client during runtime of the application, particular JavaScript files corresponding the JavaScript call, wherein the reverse mapping comprises checking the JavaScript call for dependency resolution according to the map file, wherein a resolution scope of lazily loaded files ends with first-level dependencies of such files, wherein the particular JavaScript files are selected for loading according to the dependency resolution; loading the particular JavaScript files from the server into the client'"'"'s memory element according to the exclusion file and the map file, wherein the loading comprises loading the first JavaScript file according to the exclusion file, lazy loading the second JavaScript file asynchronously with timestamp according to the map file, and reverse mapping relevant CSS files in the loaded files using related class names from the map file; and deleting, during application execution, the third JavaScript file from the client'"'"'s memory element after the certain duration of the timed sequence. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. Non-transitory media encoded in logic that includes instructions for execution that when executed by a processor, is operable to perform operations comprising:
-
intercepting, at a client during execution of an application at a browser on the client, a JavaScript call, wherein a source code of the application indicates a timed sequence of execution of JavaScript files, wherein the JavaScript files comprise a first JavaScript file loaded into the client'"'"'s memory element simultaneously with loading the application, a second JavaScript file having a dependency on the first JavaScript file and called during the timed sequence after the first JavaScript file is called, and a third JavaScript file not called after a certain duration of the timed sequence; accessing, by the client, a map file stored at a server upon intercepting the JavaScript call, wherein the map file is generated automatically at the server before execution of the application on the client, wherein the map file includes a dependency tree comprising the JavaScript files used in the source code, wherein the first JavaScript file is specified in an exclusion file, wherein the map file maps the second JavaScript file for lazy loading, wherein the map file maps Cascading Style Sheets (CSS) files with related map for class names to be used on the application; reverse mapping from the map file, at the client during runtime of the application, particular JavaScript files corresponding to the JavaScript call, wherein the reverse mapping comprises checking the JavaScript call for dependency resolution according to the map file, wherein a resolution scope of lazily loaded files ends with first-level dependencies of such files, wherein the particular JavaScript files are selected for loading according to the dependency resolution; loading the particular JavaScript files from the server into the client'"'"'s memory element according to the exclusion file and the map file, wherein the loading comprises loading the first JavaScript file according to the exclusion file, lazy loading the second JavaScript file asynchronously with timestamp according to the map file, and reverse mapping relevant CSS files in the loaded files using related class names from the map file; and deleting, during application execution, the third JavaScript file from the client'"'"'s memory element after the certain duration of the timed sequence. - View Dependent Claims (11, 12, 13, 14)
-
-
15. An apparatus, comprising:
-
a browser; a memory element for storing data; and a processor that executes instructions associated with the data, wherein the processor and the memory element cooperate such that the apparatus is configured as a client for; intercepting, at the client during execution of an application at the browser, a JavaScript call, wherein a source code of the application indicates a timed sequence of execution of JavaScript files, wherein the JavaScript files comprise a first JavaScript file loaded into the client'"'"'s memory element simultaneously with loading the application, a second JavaScript file having a dependency on the first JavaScript file and called during the timed sequence after the first JavaScript file is called, and a third JavaScript file not called after a certain duration of the timed sequence; accessing, by the client, a map file stored at a server upon intercepting the JavaScript call, wherein the map file is generated automatically at the server before execution of the application on the client, wherein the map file includes a dependency tree comprising the JavaScript files used in the source code, wherein the first JavaScript file is specified in an exclusion file, wherein the map file maps the second JavaScript file for lazy loading, wherein the map file maps Cascading Style Sheets (CSS) files with related map for class names to be used on the application; reverse mapping from the map file, at the client during runtime of the application, particular JavaScript files corresponding to the JavaScript call, wherein the reverse mapping comprises checking the JavaScript call for dependency resolution according to the map file, wherein a resolution scope of lazily loaded files ends with first-level dependencies of such files, wherein the particular JavaScript files are selected for loading according to the dependency resolution; loading the particular JavaScript files from the server into the client'"'"'s memory element according to the exclusion file and the map file, wherein the loading comprises loading the first JavaScript file according to the exclusion file, lazy loading the second JavaScript file asynchronously with timestamp according to the map file, and reverse mapping relevant CSS files in the loaded files using related class names from the map file; and deleting, during application execution, the third JavaScript file from the client'"'"'s memory element after the certain duration of the timed sequence. - View Dependent Claims (16, 17, 18, 19)
-
Specification