System and method for extending an application with user-defined content
Methods and systems that provide the tools and flexibility to build views that meet a user's needs by eliminating arbitrary limitations that are imposed by entrenched resource concepts that currently exist.
1 . A computer-implemented method comprising:
retrieving, by a processor, a definition of a context;
creating, by the processor, an execution engine that executes within a canvas sandboxed iframe hosted by a host application;
applying, by the processor, an HTML layout;
generating, by the processor, one or more components;
addressing, by the processor, the context;
displaying, by the processor, a canvas via the canvas sandboxed Iframe;
generating, by the processor, one or more data sources;
addressing, by the processor, one or more events from a host via an API Client Proxy and Host Event Handlers over an event bus that does not give direct access to the host application;
disposing, by the processor, the canvas by closing the canvas sandboxed iframe and cleaning up the canvas.
2 . The computer-implemented method of claim 1 , wherein the canvas comprises:
a layout definition;
one or more component definitions;
state information;
one or more server side expressions;
one or more event handler definitions; and
one or more data source references.
3 . The computer-implemented method of claim 1 , wherein:
the execution engine is a JavaScript Engine; and
the one or more components are React Components.
4 . The computer-implemented method of claim 1 , wherein addressing the context comprises handling, by the processor, a context event associated with the context.
5 . The computer-implemented method of claim 1 , wherein the one or more events is:
an exhibition event, an API-Client response, or a close event.
6 . The computer-implemented method of claim 5 , wherein the one or more events is the exhibition event, and addressing the one or more events comprises:
executing, by the processor, a component handler for the exhibition event;
updating, by the processor, a state;
notifying, by the processor, each component listening to the state that the state has been updated;
where there is no error, sending, by the processor, the exhibition event and the updated state to the host; and
where there is an error, disposing, by the processor, the canvas.
7 . The computer-implemented method of claim 5 , wherein the one or more events is the API Client Response, and addressing the one or more events comprises:
updating, by the processor, a state;
notifying, by the processor, each component listening to the state that the state has been updated;
where there is no error, sending, by the processor, the exhibition event and the updated state to the host; and
where there is an error, disposing, by the processor, the canvas.
8 . The computer-implemented method of claim 5 , wherein the one or more events is the close event, and addressing the one or more events comprises:
disposing, by the processor, the canvas.
9 . A computing apparatus comprising:
a processor; and
a memory storing instructions that, when executed by the processor, configure the apparatus to:
retrieve, by the processor, a definition of a context;
create, by the processor, an execution engine that executes within a canvas sandboxed Iframe hosted by a host application;
apply, by the processor, an HTML layout;
generate, by the processor, one or more components;
address, by the processor, the context;
display, by the processor, a canvas via the canvas sandboxed iframe;
generate, by the processor, one or more data sources;
address, by the processor, one or more events from a host via an API Client Proxy and Host Event Handlers over an event bus that does not give direct access to the host application; and
dispose, by the processor, the canvas by closing the canvas sandboxed Iframe and cleaning up the canvas.
10 . The computing apparatus of claim 9 , wherein the canvas comprises:
a layout definition;
one or more component definitions;
state information;
one or more server-side expressions;
one or more event handler definitions; and
one or more data source references.
11 . The computing apparatus of claim 9 , wherein:
the execution engine is a JavaScript Engine; and
the one or more components are React Components.
12 . The computing apparatus of claim 9 , wherein addressing the context comprises handling, by the processor, a context event associated with the context.
13 . The computing apparatus of claim 9 , wherein the one or more events is:
an exhibition event, an API-Client response, or a close event.
14 . The computing apparatus of claim 13 , wherein the one or more events is the exhibition event, and when addressing the one or more events, the apparatus is further configured to:
execute, by the processor, a component handler for the exhibition event;
update, by the processor, a state;
notify, by the processor, each component listening to the state that the state has been updated;
where there is no error, send, by the processor, the exhibition event and the updated state to the host; and
where there is an error, dispose, by the processor, the canvas.
15 . The computing apparatus of claim 13 , wherein the one or more events is the API Client Response, and when addressing the one or more events, the apparatus is further configured to:
update, by the processor, a state;
notify, by the processor, each component listening to the state that the state has been updated;
where there is no error, send, by the processor, the exhibition event and the updated state to the host; and
where there is an error, dispose, by the processor, the canvas.
16 . The computing apparatus of claim 13 , wherein the one or more events is the close event, and when addressing the one or more events, the apparatus is further configured to:
dispose, by the processor, the canvas.
17 . A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to:
retrieve, by a processor, a definition of a context;
create, by the processor, an execution engine that executes within a canvas sandboxed iframe hosted by a host application;
apply, by the processor, an HTML layout;
generate, by the processor, one or more components;
address, by the processor, the context;
display, by the processor, a canvas via the canvas sandboxed iframe;
generate, by the processor, one or more data sources;
address, by the processor, one or more events from a host via an API Client Proxy and Host Event Handlers over an event bus that does not give direct access to the host application; and
dispose, by the processor, the canvas by closing the canvas sandboxed Iframe and cleaning up the canvas.
18 . The non-transitory computer-readable storage medium of claim 17 , wherein the canvas comprises:
a layout definition;
one or more component definitions;
state information;
one or more server-side expressions;
one or more event handler definitions; and
one or more data source references.
19 . The non-transitory computer-readable storage medium of claim 17 , wherein:
the execution engine is a JavaScript Engine; and
the one or more components are React Components.
20 . The non-transitory computer-readable storage medium of claim 17 , wherein addressing the context comprises:
handle, by the processor, a context event associated with the context.
21 . The computer-readable storage medium of claim 17 , wherein the one or more events is:
an exhibition event, an API Client Response, or a close event.
22 . The computer-readable storage medium of claim 21 , wherein the one or more events is the exhibition event, and when addressing the one or more events, the computer-readable storage medium including instructions that when executed by the computer, further cause the computer to:
execute, by the processor, a component handler for the exhibition event;
update, by the processor, a state;
notify, by the processor, each component listening to the state that the state has been updated;
where there is no error, send, by the processor, the exhibition event and the updated state to the host; and
where there is an error, dispose, by the processor, the canvas.
23 . The computer-readable storage medium of claim 21 , wherein the one or more events is the API Client Response, and when addressing the one or more events, the computer-readable storage medium including instructions that when executed by the computer, further cause the computer to:
update, by the processor, a state;
notify, by the processor, each component listening to the state that the state has been updated;
where there is no error, send, by the processor, the exhibition event and the updated state to the host; and
where there is an error, dispose, by the processor, the canvas.
24 . The computer-readable storage medium of claim 21 , wherein the one or more events is the close event, and when addressing the one or more events, the computer-readable storage medium including instructions that when executed by the computer, further cause the computer to:
dispose, by the processor, the canvas.