System and method for tagging code to determine where the code runs
First Claim
Patent Images
1. A method for tagging to code to determine a run location, the method comprising:
- writing a code for a Web application;
grouping the code according to an area of functionality;
identifying a plurality of sections of the code having one or more functions required to be run on either or both of a client and a server; and
tagging each of the plurality of sections of the code with a runat attribute that denotes whether a respective section of code will run on either or both of the client and the server when the code is executed, wherein the tagging comprises add the runat attribute to each of the identified plurality of sections of the code, and wherein a runat attribute specifying functions running on the client only will not run on the server, a runat attribute specifying functions running on the server only are not directly callable by the client but can be called by the client during callback processing by other server functions, and a runat attribute specifying functions running on both the client and server will run on both the client and server;
automatically stripping functions from data sent to the client if the runat attribute specifies the functions run on the server only;
wherein a plurality of script blocks are contained in a single file, and the runat attribute for each script block may be modified by a special function object property that overrides a runat attribute section for a function to prevent the need to separate script blocks into separate files to facilitate different runat targets within the single file.
4 Assignments
0 Petitions
Accused Products
Abstract
A method, system, Web-environment and computer program product for tagging to code to determine a run location. The present includes identifying a plurality of sections of a code, according to runat attributes. Each of the sections of the code is tagged with a runat attribute according to where the section of the code should run. The code can run on the client-side, the server-side or both. The invention preferably operates with a system that allows for JavaScript to be utilized on the server-side.
261 Citations
18 Claims
-
1. A method for tagging to code to determine a run location, the method comprising:
-
writing a code for a Web application; grouping the code according to an area of functionality; identifying a plurality of sections of the code having one or more functions required to be run on either or both of a client and a server; and tagging each of the plurality of sections of the code with a runat attribute that denotes whether a respective section of code will run on either or both of the client and the server when the code is executed, wherein the tagging comprises add the runat attribute to each of the identified plurality of sections of the code, and wherein a runat attribute specifying functions running on the client only will not run on the server, a runat attribute specifying functions running on the server only are not directly callable by the client but can be called by the client during callback processing by other server functions, and a runat attribute specifying functions running on both the client and server will run on both the client and server; automatically stripping functions from data sent to the client if the runat attribute specifies the functions run on the server only; wherein a plurality of script blocks are contained in a single file, and the runat attribute for each script block may be modified by a special function object property that overrides a runat attribute section for a function to prevent the need to separate script blocks into separate files to facilitate different runat targets within the single file. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system for tagging to code to determine a run location, the system comprising:
-
a server comprising a memory and a processor; a client; a code written in a scripting language, the code having a plurality of sections each having one or more functions required to be run on either or both of a client and a server; a tag for each of the plurality of sections of the code with a runat attribute that denotes whether a respective section of code will run on either or both of the client and the server when the code is executed, and wherein a runat attribute specifying functions running on the client only will not run on the server, a runat attribute specifying functions running on the server only are not directly callable by the client but can be called by the client during callback processing by other server functions, and a runat attribute specifying functions running on both the client and server will run on both the client and server; and further wherein the server is configured to strip each of the identified plurality of sections of code; wherein functions are automatically stripped from data sent to the client if the runat attribute specifies the functions run on the server only and a plurality of script blocks are contained in a single file, and the runat attribute for each script block may be modified by a special function object property that overrides a runat attribute section for a function to prevent the need to separate script blocks into separate files to facilitate different runat targets within the single file. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. A computer program product for creating a Web application embodied on a non-transitory computer storage readable medium, the computer program product, when executed by a server-computer, causing the server-computer to carry out the steps of:
-
receiving code written in a scripting language; identifying a plurality of sections of the code having one or more functions required to be run on either or both of a client and a server; and tagging each of the plurality of sections of the code with a runat attribute that denotes whether a respective section of code will run on either or both of the client and the server when the code is executed, wherein the tagging comprises add the runat attribute to each of the identified plurality of sections of the code, and wherein a runat attribute specifying functions running on the client only will not run on the server, a runat attribute specifying functions running on the server only are not directly callable by the client but can be called by the client during callback processing by other server functions, and a runat attribute specifying functions running on both the client and server will run on both the client and server; automatically stripping functions from data sent to the client if the runat attribute specifies the functions run on the server only; wherein a plurality of script blocks are contained in a single file and the runat attribute for each script block may be modified by a special function object property that overrides a runat attribute section for a function to prevent the need to separate script blocks into separate files to facilitate different runat targets within the single file. - View Dependent Claims (15, 16, 17, 18)
-
Specification