Various embodiments of the present disclosure relate generally to methods and systems to bridge platforms and, more specifically, to a bridge that enables rendering components using a first library within a second library's framework.
Legacy code libraries are often incompatible with newer code libraries such that components available via newer code libraries are often unable to be rendered using legacy code libraries. This incompatibility results in requiring costly updates to legacy code libraries and corresponding frameworks. The incompatibility further limits the capability of frameworks built around legacy code libraries.
The background description provided herein is for the purpose of generally presenting the context of the disclosure. Unless otherwise indicated herein, the materials described in this section are not prior art to the claims in this application and are not admitted to be prior art, or suggestions of the prior art, by inclusion in this section.
According to certain aspects of the disclosure, systems, methods, are disclosed for bridging platforms. According to an aspect, a method may include initiating a first library within a first framework, the first framework comprising first library code; calling a bridge using the first library code, the bridge comprising bridge code to call second library components from a second library, wherein the bridge code to call the second library components is incompatible with the first library; initiating runtime integration of the first library within the first framework, the runtime integration comprising compiling the first library code and the bridge code to call the second library components of the second library; and rendering first library components and the second library components within the first framework.
According to another aspect, a system may include at least one memory storing instructions; and at least one processor executing the instructions to perform operations, the operations comprising: initiating a first library within a first framework, the first framework comprising first library code; calling a bridge using the first library code, the bridge comprising bridge code to call second library components from a second library, wherein the bridge code to call the second library components is incompatible with the first library; initiating runtime integration of the first library within the first framework, the runtime integration comprising compiling the first library code and the bridge code to call the second library components of the second library; and rendering first library components and the second library components within the first framework.
According to another aspect, a method may include initiating a Mojo library within a Mojo framework, the Mojo framework comprising Mojo library code; calling a bridge using the Mojo library code, the bridge comprising bridge code to call React library components from a React library, wherein the bridge code to call the React library components is incompatible with the Mojo library; initiating runtime integration of the Mojo library within the Mojo framework, the runtime integration comprising compiling the Mojo library code and the bridge code to call the React library components of the React library; and rendering Mojo library components and the React library components within the Mojo framework.
Additional objects and advantages of the disclosed embodiments will be set forth in part in the description that follows, and in part will be apparent from the description, or may be learned by practice of the disclosed embodiments.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosed embodiments, as claimed.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate various exemplary embodiments and together with the description, serve to explain the principles of the disclosed embodiments.
Various embodiments of the present disclosure relate generally to methods and systems for integrating non-legacy library components in a legacy library framework using a bridge.
In general, the present disclosure is directed to improving technology used to render components in a framework. Techniques disclosed herein allow integration of non-legacy library components within a legacy library framework. A bridge disclosed herein may be used to integrate non-legacy library components within the legacy library framework. The bridge may be a programing language function which encapsulates all related logic for a legacy framework to render non-legacy library components. Accordingly, the bridge may be used to render components from an incompatible library (e.g., a non-legacy library) by calling the bridge functions. The bridge may be created via an Application Programming Interface (API). The bridge may be used to update a legacy framework such that the legacy framework can be implemented using non-legacy library components. Accordingly, the functionality of a given legacy framework may be improved, increased, made faster, and/or modified to improve storage requirements.
As applied herein, a CPU may include one or more processors and/or may drive components of an electronic system to perform commands (e.g., based on bridge components, user input, code, etc.). One or more CPUs may be connected to motherboards. A CPU may switch back and forth between various tasks to augment multitasking. This may increase the effective processor speed of the CPU. A given CPU may operate in accordance with an operating system (e.g., an operating system running on a VM). A multi-core CPU may include more than one component. A bus interface component may transfer data to and from the CPU and/or one or more components. A server CPU may provide enterprise level scalability and performance.
As disclosed herein, a memory may include a device or system that is used to store information for immediate use in a computer or related computer hardware and digital electronic devices. Memory may operate at a high speed compared to storage, as applied herein. Storage may provide slower access to data in comparison to memory. Contents of memory can be transferred to storage (e.g., via virtual memory). Memory may be implemented as semiconductor memory, where data is stored within memory cells built from MOS transistors on an integrated circuit. Semiconductor memory may include volatile and/or non-volatile memory. Examples of non-volatile memory include flash memory and read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) memory, and the like. Examples of volatile memory include primary memory such as dynamic random-access memory (DRAM) and fast CPU cache memory such as static random-access memory (SRAM).
As disclosed herein, a legacy library may be a code library that can be used to compile using a coding language (e.g., JavaScript, C++, HTML, CSS, Python, Java, Swift, C #, R., etc.). The legacy library may include a set of routines for a particular operating system or coding language. Depending on the environment or framework, a legacy library may be or include source code, in an intermediate language, or in executable form. A legacy library may correspond to a traditional library that has since been replaced or modified by one or more non-legacy libraries.
As disclosed herein, a non-legacy may be a code library that can be used to compile using a coding language e.g., JavaScript, C++, HTML, CSS, Python, Java, Swift, C #, R., etc.). The non-legacy library may include a set of routines for a particular operating system or coding language. Depending on the environment or framework, a non-legacy library may be or include source code, in an intermediate language, or in executable form. A non-legacy library may be an updated or newer library in comparison to a legacy library and may include or provide components that provide additional or improved functionality in comparison to a legacy library. As disclosed herein, a legacy library may be any first library and a non-legacy library may be any second library.
As disclosed herein, a framework may be a programming tool that provides ready-made components or solutions that are customized in order to speed up development. A framework may include a library or may be implemented using a library (e.g., a legacy or non-legacy library). A framework may provide support for a programing structure. The framework may be implemented by calling available and/or custom pieces of code (e.g., associated with one or more libraries). A framework may include support programs, compilers, code libraries, toolsets, and APIs to develop software and/or render systems. A user may be able to interact with a framework that is based on one or more libraries.
As disclosed herein, a call may refer to one or more function calls or remote procedure calls. A call may causes code for a given function to be executed by a processor. A call may follow a call convention that may be specific to a language, platform, or framework. The call convention may provide low-level details for how code parameters are passed to a function (e.g., to register, stack or heap), how the function passes the result back to the calling component (e.g., a framework), and/or technical details such as how a frame pointer is adjusted. A call may trigger a function on a local or remote component (e.g., a computer or processor).
This disclosure includes discussion of a plurality of legacy and non-legacy libraries. It will be understood that although a given legacy (e.g., Mojo) or non-legacy (React) may generally be discussed herein, the embodiments of the disclosed subject matter apply to any applicable library. Such libraries include, but are not limited to, Mojo libraries, React libraries, JQuery libraries, Backbone libraries, C libraries, diagnostics libraries, general utilities libraries, templates, logback libraries, log libraries, or the like. A legacy library may be a legacy library relative to a non-legacy library. For example, a React library may be a non-legacy library relative to a Mojo library. The relativity between libraries may be based on the functionality, components, and/or attributes associated with respective libraries.
According to embodiments of the disclosed subject matter, a legacy library may be called using a legacy framework. The legacy framework may be any applicable framework that utilizes the legacy library to generate, render, and/or provide one or more components. The legacy framework may additionally utilize one or more other libraries (e.g., legacy or non-legacy libraries) to generate, render and/or provide the one or more components.
The legacy library may be called based on an initiation of an operating system, a program, a platform, or the like. The initiation may be based on activating a device. Activating the device may include turning on the device from an off state or waking the device from a sleep state. The legacy library may be incompatible with a non-legacy library. For example, legacy code based on the legacy library may not be configured to render components of the non-legacy library.
According to embodiments of the disclosed subject matter, a bridge may be accessible by the legacy library. For example, legacy library code may include a pointer to the bridge such that the bridge may be called via the legacy library code in the legacy framework. The legacy library code may be used to call the bridge by identifying one or more of a bridge name, bridge location, bridge pointer, or the like. The legacy library code may call the bridge based predetermined code or based on a user request or input to retrieve one or more non-legacy components.
The bridge may be a function that include bridge code that is non-legacy library code. The bridge code may be used to render non-legacy components. The bridge may further call a bridge API, according to an implementation. The bridge code may correspond to non-legacy library code that calls one or more components from the non-legacy library. In addition to the bridge code, the bridge API may be used to to pull the one or more components from the non-legacy library that are provided in the bridge code. According to an embodiment, a portion of a bridge code may be triggered by a legacy library code such that the portion may indicate which non-legacy components to pull via the bridge and corresponding bridge code. According to another embodiment, a legacy library code may call a bridge such that the full bridge code within the bridge is used to pull one or more components. According to this embodiment, the legacy library code may call one or more bridges from a plurality of bridges, where each bridge may be configured to pull different non-legacy components. For simplicity, this disclosure discusses a “bridge” though it will be understood that a bridge may correspond to one or more other bridges. Accordingly, the bridge and bridge API may allow the non-legacy components to be called via the legacy library code.
According to an embodiment of the disclosed subject matter, a host adapter may be configured to leverage bridge APIs to render and/or destroy non-legacy components automatically at an applicable time by connecting into lifecycles of legacy code. Accordingly, a host adapter may automatically communicate with a bridge API to render and/or destroy non-legacy components based on applicable legacy code (e.g., without accessing a bridge via the legacy code each time a component is to be rendered and/or destroyed). A destroyed component may be one that is no longer rendered or activated within a legacy framework.
First framework 102 may be a legacy framework rendered using, for example, first library 104 components and/or code. First library 104 code may point to bridge 106, as disclosed herein. Bridge 106 may include second library 108 code such that triggering bridge 106 may result in pulling second library 108 components, as disclosed herein. First framework 102, first library 104, bridge 106, and/or second library 108 may be accessed and/or stored in memory 116 and/or storage 118 via CPUs 114 over server 125. First library 104 and/or second library 108 components may be rendered via display 127. User input 130 may be received over network 120 and may be used to trigger first library 104 code or components and/or second library 108 code or components (e.g., via bridge 106, a host adapter, etc.).
The first library code may include a pointer location to a bridge. A bridge may include or have access to non-legacy components and may include a plurality of bridges, as disclosed herein. The bridge may include or call a bridge API to access the non-legacy components. A bridge API may be globally exposed for legacy code to invoke a bridge and/or manage non-legacy components. The bridge may be a sub-project within a legacy framework. At 404, the bridge may be called using the first library code. The bridge may include bridge code to call second library components from a second library, as disclosed herein. The first library code may be used to call the bridge using the pointer location to the bridge. The second library may be a React library or any other non-legacy library.
At 406, runtime integration of the first library within the first framework may be initiated. During runtime integration, the first code and the bridge code may be compiled to call first library components and second library components. Initiating runtime integration may include compiling the first code and the bridge code using JavaScript. Initiating runtime integration may further include triggering a bridge API such that the bridge code calls the second library components using the bridge API.
At 408, first library components and second library components may be rendered within the first framework. Rendering the first library components and the second library components may be based on rendering the first code using a coding language (e.g., JavaScript) and rendering the second code using the same coding language. Accordingly, legacy components (e.g., first library components) and non-legacy components (e.g., second library components) may both be rendered within the first framework (e.g., a legacy framework). A non-legacy component called using a bridge may be called a first time, and may be used within a non-legacy framework thereafter (e.g., without accessing the bridge).
According to embodiments of the disclosed subject matter, user inputs may be received. The user inputs may be based on user interaction with second library components. For example, a user may provide one or more user inputs using a user device (e.g., a keyboard, mouse, touch screen, joystick, haptic control, etc.). The user inputs may be processed (e.g., by a processor) using the bridge code and/or the second library (e.g., via the bridge code). A user input result may be rendered based on processing the user inputs. The user input results may be generated using the bridge code and/or the second library (e.g., via the bridge code).
The Mojo library code may include a pointer location to a bridge. At 504, the bridge may be called using the Mojo library code. The bridge may include bridge code to call React library components from a React library, as disclosed herein. The Mojo library code may be used to call the bridge using the pointer location to the bridge.
At 506, runtime integration of the Mojo library within the Mojo framework may be initiated. During runtime integration, the Mojo code and the bridge code may be compiled to call Mojo library components and React library components. Initiating runtime integration may include compiling the Mojo code and the bridge code using JavaScript. Initiating runtime integration may further include triggering a bridge API such that the bridge code calls React library components using the bridge API.
At 508, Mojo library components React second library components may be rendered within the Mojo framework. Rendering the Mojo library components and the React library components may be based on rendering the Mojo code using a coding language (e.g., JavaScript) and rendering the React code using the same coding language. Accordingly, legacy components (e.g., first library components) and non-legacy components (e.g., second library components) may both be rendered within the first framework (e.g., a legacy framework).
The host adapter may be a declarative legacy widget that provides a container for one or more non-legacy components. Legacy components may be imperative but may provide a declarative way (e.g., simpler code syntax) to render UI components (e.g., without a gap). In this manner, imperative code may be kept behind an API, thus concealing imperative logic from the programmer and increasing the intuitive nature of the source code. A host adapter may automatically communicate with a bridge API and/or a Bridge to render and/or destroy non-legacy components based on applicable legacy events (e.g., without accessing a bridge via the legacy code each time a component is to be rendered and/or destroyed). A destroyed component may be one that is no longer rendered or activated within a legacy framework. Example code 600 includes calls to specific bridge code directly using the host adapter, without calling the entire bridge code.
In general, any process or operation discussed in this disclosure that is understood to be computer-implementable, such as the flows and/or process illustrated in
The general discussion of this disclosure provides a brief, general description of a suitable computing environment in which the present disclosure may be implemented. In one embodiment, any of the disclosed systems, methods, and/or graphical user interfaces may be executed by or implemented by a computing system consistent with or similar to that depicted and/or explained in this disclosure. Although not required, aspects of the present disclosure are described in the context of computer-executable instructions, such as routines executed by a data processing device, e.g., a server computer, wireless device, and/or personal computer. Those skilled in the relevant art will appreciate that aspects of the present disclosure can be practiced with other communications, data processing, or computer system configurations, including: Internet appliances, hand-held devices (including personal digital assistants (“PDAs”)), wearable computers, all manner of cellular or mobile phones (including Voice over IP (“VoIP”) phones), dumb terminals, media players, gaming devices, virtual reality devices, multi-processor systems, microprocessor-based or programmable consumer electronics, set-top boxes, network PCs, mini-computers, mainframe computers, and the like. Indeed, the terms “computer,” “server,” and the like, are generally used interchangeably herein, and refer to any of the above devices and systems, as well as any data processor.
Aspects of the present disclosure may be embodied in a special purpose computer and/or data processor that is specifically programmed, configured, and/or constructed to perform one or more of the computer-executable instructions explained in detail herein. While aspects of the present disclosure, such as certain functions, are described as being performed exclusively on a single device, the present disclosure may also be practiced in distributed environments where functions or modules are shared among disparate processing devices, which are linked through a communications network, such as a Local Area Network (“LAN”), Wide Area Network (“WAN”), and/or the Internet. Similarly, techniques presented herein as involving multiple devices may be implemented in a single device. In a distributed computing environment, program modules may be located in both local and/or remote memory storage devices.
Aspects of the present disclosure may be stored and/or distributed on non-transitory computer-readable media, including magnetically or optically readable computer discs, hard-wired or preprogrammed chips (e.g., EEPROM semiconductor chips), nanotechnology memory, biological memory, or other data storage media. Alternatively, computer implemented instructions, data structures, screen displays, and other data under aspects of the present disclosure may be distributed over the Internet and/or over other networks (including wireless networks), on a propagated signal on a propagation medium (e.g., an electromagnetic wave(s), a sound wave, etc.) over a period of time, and/or they may be provided on any analog or digital network (packet switched, circuit switched, or other scheme).
Program aspects of the technology may be thought of as “products” or “articles of manufacture” typically in the form of executable code and/or associated data that is carried on or embodied in a type of machine-readable medium. “Storage” type media include any or all of the tangible memory of the computers, processors or the like, or associated modules thereof, such as various semiconductor memories, tape drives, disk drives and the like, which may provide non-transitory storage at any time for the software programming. All or portions of the software may at times be communicated through the Internet or various other telecommunication networks. Such communications, for example, may enable loading of the software from one computer or processor into another, for example, from a management server or host computer of the mobile communication network into the computer platform of a server and/or from a server to the mobile device. Thus, another type of media that may bear the software elements includes optical, electrical and electromagnetic waves, such as used across physical interfaces between local devices, through wired and optical landline networks and over various air-links. The physical elements that carry such waves, such as wired or wireless links, optical links, or the like, also may be considered as media bearing the software. As used herein, unless restricted to non-transitory, tangible “storage” media, terms such as computer or machine “readable medium” refer to any medium that participates in providing instructions to a processor for execution.
The terminology used above may be interpreted in its broadest reasonable manner, even though it is being used in conjunction with a detailed description of certain specific examples of the present disclosure. Indeed, certain terms may even be emphasized above; however, any terminology intended to be interpreted in any restricted manner will be overtly and specifically defined as such in this Detailed Description section. Both the foregoing general description and the detailed description are exemplary and explanatory only and are not restrictive of the features, as claimed.
As used herein, the terms “comprises,” “comprising,” “having,” including,” or other variations thereof, are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements, but may include other elements not expressly listed or inherent to such a process, method, article, or apparatus.
In this disclosure, relative terms, such as, for example, “about,” “substantially,” “generally,” and “approximately” are used to indicate a possible variation of ±10% in a stated value.
The term “exemplary” is used in the sense of “example” rather than “ideal.” As used herein, the singular forms “a,” “an,” and “the” include plural reference unless the context dictates otherwise.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.