The system and method interface and separate formatted content and program code in connection with a content server system. The system includes a document preprocessor, a compiler, and an execution context manager. The document preprocessor parses and analyzes a formatted content document that contains program invocations and translates the program invocations into a procedure having program code suitable for compilation or intepretation. The preprocessor also encodes designated segments of the content document as subprocedures which are invoked within a context managed by the execution context manager. The execution context manager allows values to be mapped to named parameters so that the values are available to the invoked procedures and programs. As a result, the content server system provides separation between the formatted content and program code.
|
1. A method including:
a server processing a hypertext document containing formatting instructions and instructions to invoke program code, and in response to a request from a user, executing the program code, storing values resulting from the program code execution, and using the formatting instructions to deliver the stored values to the user in a desired format. 18. A method including processing a hypertext document with formatting instructions and instructions to invoke program code, wherein in response to a user request, the program code is executed to produce values for display, and the formatting instructions format the values for display, wherein the program code does not include formatting instructions so that the formatting instructions can be changed without changing the program code.
14. A system including:
a preprocessor for processing a hypertext document that has formatting instructions and instructions to invoke program code; and a request handler and execution context manager, responsive to a request from a user, for executing the program code, storing values resulting from the program code execution, and causing the formatting instructions to use the stored values to deliver to the user in a desired format.
28. A system including:
program code which, when executed, generates values for one or more parameters; a first hypertext document with static and dynamic content and including a program code invocation directive for identifying the program code; and a table for storing the values for the one or more parameters; formatting instructions for displaying the one or more parameters; wherein the formatting instructions are separate from the program code, such that the formatting instructions can be changed without altering the program code.
19. A method including:
processing a first hypertext document in response to a request from a user, the processing including identifying static content and dynamic content, the dynamic content being associated with program code; executing the program code to obtain dynamic content values; storing values resulting from the program code execution; and using formatting instructions not included in the program code to deliver to the user the stored values in a desired format, thereby separating the program code from the formatting instructions and allowing the formatting instructions to be changed without changing the program code used to obtain the values.
5. The method of
6. The method of
7. The method of
8. The method of
9. The method of
10. The method of
11. The method of
12. The method of
13. The method of
15. The system of
16. The system of
17. The system of
20. The method of
21. The method of
22. The method of
23. The method of
24. The method of
25. The method of
26. The method of
27. The method of
29. The system of
30. The system of
31. The system of
32. The system of
|
The present invention relates to the field of computer systems, and in particular to systems which serve content over a network.
When a user requests infromation from a content server system 10, an example of which is shown in
In one example, a web server with an application for displaying a stock quote in response to a request from a user dynamically generates a HyperText Markup Language (HTML) page by executing a source code program that looks up the price of the stock and properly formats the information into valid HTML. A box or line for displaying the stock quote may be static content that is the same regardless of which stock quote is entered.
A common technique for generating properly formatted content is to embed HTML formatting directives (tags) directly into the source program code. For example, the following Java code fragment might display a single quote:
out.println("<B>"+getCompanyName( )+"</B>");
out.println("<I>"+getCompanySymbol( )+"</I>");
out.println("$"+getFormattedPrice( ));
In the above example, the text contained between the "<" and ">" characters are HTML tags that produce the desired formatting, while the program code performs the operation of looking up the price and the company name for a stock symbol. When executed, the above program code might yield the following HTML for the fictitious company "Acme Widgets":
<B>Acme Widgets, Inc.</B> <I>ACMW</I> $42 1/8 |
When viewed in an HTML browser, the browser would interpret the tags <B> and <I> as bolding and italic directives yielding the following rendition:
Acme Widgets, Inc. ACMW $42⅛
As a further example, it may be desirable to modify the above formatting so that the price is bolded and the company name is not. Such a modification to the formatting would require that a programmer modify the Java source code as follows:
out.println(getCompanyName( ));
out.println("<I>"+getCompanySymbol( )+"</I>");
out.println("<B>$"+getFormattedPrice( )+"</B>");
The resulting rendered HTML would appear as follows:
Acme Widgets, Inc. ACMW $42⅛
This technique of embedding the content formatting directives, such as HTML tags, directly within source program code means that even the simplest change to the desired formatting of the content requires modification, compilation, and testing of the source program code. Furthermore, it is difficult to reuse the source program code in different applications as the generated formatting tags may conflict with the desired format of the new application. Moreover, the generated content is generally embedded within a considerable amount of static content such as page headers, paragraph titles, and layout directives, and such static content must interact cooperatively with the generated content in order for the entire page to be generated correctly. These issues increase the cost of development and maintenance of such applications.
A system and method for interfacing and separating formatted content and program code enables modifications to the formatted content to be made independently of the program code and provides greater reusability of the program code. The system and method have particular application to implementing servers for dynamic web content and applications.
The system and method interface and separate formatted content and program code in connection with a content server system. The system includes a document preprocessor, a compiler, and an execution context manager. The document preprocessor parses and analyzes a formatted content document that contains program invocations and translates the program invocations into a procedure having program code suitable for compilation or intepretation. The preprocessor also encodes designated segments of the content document as subprocedures which are invoked within a context managed by the execution context manager. The execution context manager allows values of parameters to be mapped to named parameters so that the values are available to the invoked procedures and programs. As a result, the content server system provides separation between the formatted content and program code.
The modifications to the formatting of dynamically generated content can thus be separated from the program code that executes the functional logic underlying the generation, such that no formatting directives are embedded into the program code. Such separation enables formatting modifications to be made independently of the program code and allows the code to be reused in different content documents with different formatting requirements. Other features and advantages will be apparent from the following detailed description, drawings, and claims.
A system and method for interfacing and separating formatted content and program code enables modifications to the formatted content to be made independently of the program code and provides greater reusability of the program code. The system and method have particular application to implementing servers for dynamic web content and applications. In the following description for purposes of explanation, specific numbers, materials, and configurations are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that the present invention may be practiced without the specific details.
Referring to
Compiler 28 is a standard component of Sun Microsystems, Inc.'s commercially available Java Development Kit software, and the storage device and network systems are standard components of any common computer and operating system such as a Sun Microsystems server running the SUN SOLARIS operating system or an IBM PC compatible computer running the Microsoft WINDOWS NT operating system (SUN SOLARIS and WINDOWS NT are registered trademarks of Sun Microsystems, Inc. and Microsoft Corp., respectively).
Except for the manner they are used to practice the present invention, the compiler, the storage device, and the network, are intended to represent a broad category of these elements found in many computer systems. The constitutions and basic functions of these elements are well known and will not be further described here.
Referring to
Lexical analyzer and parser 36 examines the entire content document, dividing the content into four categories: static content, context display directives, program invocation directives, and procedural parameter directives. This division of the content is performed using well-known parsing and analysis techniques. Static content is sent to static content encoder 38, context display directives are sent to context display encoder 40, program invocation directives are sent to program invocation encoder 42, and procedural parameter directives are sent to procedural parameter encoder 44.
All four encoders produce program code. The static content encoder transforms the static content into instructions that output the verbatim content when executed. The context display encoder emits instructions that looks up and outputs the value of a named context parameter. The program invocation encoder emits instructions that sets up an execution context and invokes a program code module. The procedural parameter encoder emits instructions that bind a context parameter to a program code procedure that is itself generated by the document preprocessor. The document preprocessor also encapsulates the processed content within any necessary program code required to create a valid compilation module
In the invention's preferred embodiment, the content formatting language is HTML (HyperText Markup Language), and the directives described above are designated by special HTML-style tags. More specifically, context display directives are designated by the "<VALUEOF>" tag, program code invocation directives are designated by the "<DROPLET>" tag, and procedural parameter directives are designated by the "<OPARAM>" tag.
Consider the following HTML and special tags:
<H1>Your Quote</H1> | |
<DROPLET name="stockQuote"> | |
<OPARAM name="output"> | |
<B> <VALUEOF name="company"></VALUEOF> </B> | |
<I> <VALUEOF name="symbol"></VALUEOF> </I> | |
$ <VALUEOF name="price"></VALUEOF> | |
</OPARAM> | |
</DROPLET> | |
The text from the beginning up to the <DROPLET> tag is standard static HTML and would be encoded by the static content encoder as instructions to emit the text verbatim--in this case, to output a heading labeled "Your Quote". The <DROPLET> tag is the program code invocation directive indicating the invocation of a program component named "stockQuote". The <OPARAM> tag is the procedural parameter directive indicating that the program code generated by processing the enclosed text before the <OPARAM> tag is a procedure bound to the name "output".
Thus the <DROPLET> and <OPARAM> tags above are encoded as instructions to call the execution context manager to bind the "output" parameter, and to invoke the program component "stockQuote." The text enclosed within the <OPARAM> tag is processed in the same manner as any other content text, i.e., it is parsed, analyzed, and sent to the same encoders, and may itself contain static content, context display, program invocation, and procedural parameter directives.
The <VALUEOF> tags are context display directives and are encoded as instructions to lookup the variables "company", "symbol", and "price" within the current execution context and output them.
In order for the above example to render the desired quote, the stockQuote program component is programmed to work cooperatively with the execution context manager to create additional bindings for the "company", "symbol", and "price" parameters and to execute the "output" procedural parameter.
An exemplary implementation of a stockQuote program is shown below (not a complete code example):
request.setParameter("company", getCompanyName( ));
request.setParameter("symbol", getCompanySymbol( ));
request.setParameter("price", getFormattedPrice( ));
request.serviceParameter("output", request, response);
The first three lines of the above program compute the company name, symbol, and price and bind these values to the "company", "symbol", and "price" context parameters. The final line calls the execution context manager to invoke the program code bound to the "output" context parameter. This code, generated as described above, outputs the information with the desired format.
Referring to
Procedure invoker 48 invokes a procedure by creating a new context parameter frame and pushing the frame with the request on top of context frame stack 52. Parameter manager 50 adds parameter name/value pairs to the topmost context parameter frame and the procedure is invoked. In the example in the background above, context parameter frame will have the entries as shown in FIG. 4.
The procedure can execute instructions to call parameter manager 50 to add new context parameter values and to look up parameter values. Parameter manager 50 always adds new values to the topmost context parameter frame, but when called to look up a value, manager 50 searches each from the top of stack 52 downwards and returns the first value found. When the procedure returns, the pointer to the frame is popped from the top of the stack, and the frame is discarded, thus restoring the stack to its original state.
Referring to
When a user requests the document (106), the request handler invokes the procedure previously generated and compiled (108). This procedure calls the execution context manager to add the procedural parameter to the current context (110), and invokes the program indicated by the program invocation directive (112). The invoked program in turn calls the request context manager to add further context parameters (114) and invokes the procedural parameter added in the previous step (116). This procedure, which was generated from the procedural parameter directive within the original content document, then has access to all of the parameters added to the execution context in the previous steps.
Thus in the exemplary code fragment in the background above, the program code (whether in Java, Visual Basic, or some other language or script) retrieves the stock price and symbol from the appropriate data source and formats the output according to the tags embedded within the code fragment. To change the format, the code must be changed.
In the system of the present invention, however, the program code retrieves the company name, symbol, and price and then puts those values in the context parameter frame. These values from the context parameter frame are then used by the HTML as set out above (beginning with <H1>) to format the output. As a result, the format of the output can be changed in the HTML only without requiring that the program code be modified and recompiled.
The present invention also allows program code to be more easily reused. The same program code can be used with multiple different HTML formatting directives, such that stock quotes can be delievered to different parties with a different format. In this case, the HTML is different while the program code is the same.
While the present invention has been described in terms of presently preferred and alternate embodiments, those skilled in the art will recognize that the invention is not limited to the embodiments described. The system and method of the present invention can be practiced with modification and alteration within the spirit and scope of the appended claims. The description is thus to be regarded as illustrative instead of limiting on the present invention. For example, the target program language can be either interpreted (e.g., Visual Basic) or compiled (Java). The generated program code and the program being invoked may, but need not be, in the same language. The present invention has been described in conjunction with the example of a stock quote program, but the system and method of the present invention can be used with other types of content providing that includes executing a program, such as any access to a database in response to a request, e.g., a server for providing white pages information or maps, or a server for providing movie listings that are local to the user, or for requesting information about the weather in any specified location. The present invention is thus useful in many contexts.
Abramson, Nathan, Vroom, Jeffrey J.
Patent | Priority | Assignee | Title |
10348702, | Nov 16 2016 | Amazon Technologies, Inc. | Command parameter resolution for command invocations |
6715102, | Feb 19 1999 | Romwin Limited Company | Operation input processing apparatus and method |
6839891, | Apr 25 2000 | KINZAN COM | Method and apparatus for a web-related state machine |
6938241, | Dec 10 2001 | AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD | Compiler independent bit-field macros |
6986129, | May 16 2001 | Oracle America, Inc | System and method for java preprocessor |
7073167, | Jan 29 1999 | Fujitsu Limited | Compiler system compiling method, and storage medium for storing compiling program |
7188339, | Oct 24 2003 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | ACPI preprocessor |
7197746, | Jun 12 2003 | Oracle America, Inc | Multipurpose lexical analyzer |
7412689, | Jun 25 2004 | Oracle America, Inc | Method and apparatus for creating a hierarchical model to facilitate identifying components in a programming language file |
Patent | Priority | Assignee | Title |
5572643, | Oct 19 1995 | INTERNETAD SYSTEMS LLC | Web browser with dynamic display of information objects during linking |
5623656, | Dec 15 1994 | THE CHASE MANHATTAN BANK, AS COLLATERAL AGENT | Script-based data communication system and method utilizing state memory |
5649186, | Aug 07 1995 | Open Invention Network, LLC | System and method for a computer-based dynamic information clipping service |
5659729, | Feb 01 1996 | Oracle America, Inc | Method and system for implementing hypertext scroll attributes |
5710887, | Aug 29 1995 | Broadvision | Computer system and method for electronic commerce |
5745360, | Aug 14 1995 | International Business Machines Corp.; IBM Corporation | Dynamic hypertext link converter system and process |
5781914, | Jun 30 1995 | Ricoh Corporation | Converting documents, with links to other electronic information, between hardcopy and electronic formats |
5809250, | Oct 23 1996 | Intel Corporation | Methods for creating and sharing replayable modules representive of Web browsing session |
5958013, | Sep 11 1997 | International Business Machines Corporation | Apparatus, methods and computer program products for conducting a persistent session with a host-based application |
5987482, | Sep 08 1997 | International Business Machines Corporation | Computer system and method of displaying hypertext documents with internal hypertext link definitions |
6061695, | Dec 06 1996 | Microsoft Technology Licensing, LLC | Operating system shell having a windowing graphical user interface with a desktop displayed as a hypertext multimedia document |
6070176, | Jan 30 1997 | Intel Corporation | Method and apparatus for graphically representing portions of the world wide web |
6230318, | Feb 24 1998 | Microsoft Technology Licensing, LLC | Application programs constructed entirely from autonomous component objects |
6253228, | Mar 31 1997 | Apple Inc | Method and apparatus for updating and synchronizing information between a client and a server |
6272673, | Nov 25 1997 | International Business Machines Corporation | Mechanism for automatically establishing connections between executable components of a hypertext-based application |
6314439, | Feb 06 1998 | International Business Machines Corporation | Computer system, program product and method of creating aliases and accessing storage locations in a computer system with same |
6405564, | Oct 06 1997 | Asahi Glass Company Ltd. | Vacuum degassing apparatus for molten glass |
6463442, | Jun 30 1998 | Microsoft Technology Licensing, LLC | Container independent data binding system |
EP774722, | |||
WO9804985, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Dec 10 1998 | Art Technology Group, Inc. | (assignment on the face of the patent) | / | |||
Dec 10 1998 | ABRAMSON, NATHAN | ART TECHNOLOGY GROUP, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 009640 | /0989 | |
Dec 10 1998 | VROOM, JEFFREY I | ART TECHNOLOGY GROUP, INC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 009640 | /0989 | |
Jan 31 2004 | ART TECHNOLOGY GROUP, INC | SILICON VALLEY BANK DBA SILICON VALLEY EAST | SECURITY AGREEMENT | 014420 | /0610 | |
Feb 10 2006 | Silicon Valley Bank | ART TECHNOLOGY GROUP, INC | SECURITY AGREEMENT | 017286 | /0281 | |
Feb 09 2010 | Silicon Valley Bank | ART TECHNOLOGY GROUP INC | RELEASE | 023937 | /0412 | |
Mar 28 2012 | ART TECHNOLOGY GROUP, LLC | Oracle OTC Subsidiary LLC | MERGER SEE DOCUMENT FOR DETAILS | 028880 | /0986 |
Date | Maintenance Fee Events |
Dec 04 2006 | M2551: Payment of Maintenance Fee, 4th Yr, Small Entity. |
Mar 02 2009 | STOL: Pat Hldr no Longer Claims Small Ent Stat |
Oct 29 2010 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Nov 05 2014 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
Jun 03 2006 | 4 years fee payment window open |
Dec 03 2006 | 6 months grace period start (w surcharge) |
Jun 03 2007 | patent expiry (for year 4) |
Jun 03 2009 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jun 03 2010 | 8 years fee payment window open |
Dec 03 2010 | 6 months grace period start (w surcharge) |
Jun 03 2011 | patent expiry (for year 8) |
Jun 03 2013 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jun 03 2014 | 12 years fee payment window open |
Dec 03 2014 | 6 months grace period start (w surcharge) |
Jun 03 2015 | patent expiry (for year 12) |
Jun 03 2017 | 2 years to revive unintentionally abandoned end. (for year 12) |