US20080228809A1 - Method and apparatus for generatng a dynamic web page - Google Patents

Method and apparatus for generatng a dynamic web page Download PDF

Info

Publication number
US20080228809A1
US20080228809A1 US12/129,028 US12902808A US2008228809A1 US 20080228809 A1 US20080228809 A1 US 20080228809A1 US 12902808 A US12902808 A US 12902808A US 2008228809 A1 US2008228809 A1 US 2008228809A1
Authority
US
United States
Prior art keywords
template
dynamic
dynamic data
web page
data item
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
US12/129,028
Inventor
Jian Hong Shan
Shao Yang Yu
Zhong Yan Lu
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to US12/129,028 priority Critical patent/US20080228809A1/en
Publication of US20080228809A1 publication Critical patent/US20080228809A1/en
Abandoned legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Definitions

  • the present invention relates to information processing technology, and more particularly relates to generating a dynamic web page.
  • any browser-based architecture no matter what presentation techniques and architecture designs are employed at the back-end server side, it must finally return to a browser markup language that can be recognized by the browser, such as HTML (Hyper Text Markup Language), XML (eXtensible Markup Language), WML (Wireless Markup Language), etc.
  • HTML Hyper Text Markup Language
  • XML eXtensible Markup Language
  • WML Wireless Markup Language
  • the design template is, for example, an HTML design template.
  • a web page designer e.g., art designer
  • web page design related skills for example, only understands the HTML language
  • non-web page design related skills such as understanding the java language.
  • a developer can utilize, for example, Perl, Tcl, Java, Python, ASP and many other languages and tools to populate the template in order to realize generation of dynamic data.
  • Servlet+JSP JavaServer Page
  • JSP TagLibs Velocity
  • XMLC eXtensible Markup Language Complier
  • the present methods all require web page designers and developers to cooperatively develop the same template file. For example, first the web page designer finishes the template file (based on a markup language that can be recognized by a standard browser, such as HTML or WML), and then the developer modifies this file and populates program codes that can only be understood by the developer. This inevitably destroys the standard property of the original template file, and possibly causing the modified template to not be recognized by the standard browser.
  • a Servlet is a kind of Java application running on a web server or application server and is used to provide a server side process, such as accessing a database, etc.
  • the Servlet couples presentation markup content with business logic processes.
  • the development flow using the Servlet technique is as follows: the web page designer writes a standard template file (such as an HTML file), then the developer writes servlet code that contains all the templates, with these codes being embedded standard java logic code to display dynamic data.
  • a standard template file such as an HTML file
  • servlet code that contains all the templates, with these codes being embedded standard java logic code to display dynamic data.
  • the disadvantage of servlet technology is obvious: it is very hard to split presentation markup content and business logic processes. And for further maintenance it is a disaster because any display related data modification (such as changing the font, layout, etc.) requires direct modification of java code, and therefore the whole servlet code needs to be re-compiled and re-deployed.
  • JSP is an extension to servlet technology, which allows HTML and Java to be incorporated within the same page file, for example, inserting Java into a markup page to produce dynamic content, with Java providing business logic processes, and HTML providing the page that is presented in a web page browser.
  • a JSP file accesses JavaBean or other components that can send generated dynamic content to a browser.
  • a web server receives a JSP file request, it sends the request to an application server (such as IBM WebSphere).
  • the application server parses the JSP file and generates a Java source file (which is compiled and run as a Servlet). Unless the original JSP file has been updated, the generation and compilation of the JSP source file do not happen until the first invocation of the Servlet. In this case, the application server will detect the update that was made and re-generate and compile the Servlet before executing it.
  • Velocity is a Java-based template engine, which permits anyone to use simple and powerful template language to reference objects defined in Java code. Web designers can work in parallel with Java programmers to develop web pages according to Model/View/Controller (MVC) architecture, meaning that web page designers can focus solely on designing web pages, and programmers can focus solely on writing codes.
  • MVC Model/View/Controller
  • Velocity template language is very similar to a Java program in JSP.
  • a lot of business logic or other language that cannot be understood are embedded in the template file.
  • VTL Velocity Template Language
  • a template which has VTL added into it could not be recognized by a standard HTML editor.
  • Velocity's Merge Engine is centered on a template, i.e., it first reads a template, then compiles the template file and at the same time interprets the VTL embedded in the template, with the VTL accessing Data Context so as to perform dynamic data replacement.
  • Velocity's context is just a data storage center, and there is only data in it without any presentation related information (how to present the data is interpreted by VTL in the template). For example, if there are 10 records to be displayed in a page while there are 20 pieces of data returned by business logic, Velocity's context will put in the 20 pieces of data, then 1-10 will be displayed in cycle by VTL in the template, that is, the display is controlled by the template. All of which have demanded higher requirements for developers.
  • the XMLC method is to compile a markup language page (such as HTML, XML, or WML) to generate a corresponding Java class.
  • This Java class contains the page's complete DOM (Document Object Model) tree structure and its operation method, so that it can process any content and its attribute on the page.
  • dynamic content is cleverly associated with the ID attribute in HTML and corresponding operation methods are generated in the Java class, for example, change attribute of text content, etc.
  • XMLC does not introduce any extra HTML/XML tag attribute, but just reuses the ID attribute. Therefore, actually XMLC can process any markup language, not only XML, HTML, and WML.
  • XMLC processes a markup language page via 3 steps, the work flow of which is as follows.
  • a Java method that handles dynamic content is generated.
  • the dynamic content only needs to be marked with ID.
  • XMLC uses standard HTML as the template and uses the ID attribute of HTML as keyword or locating
  • XMLC requires using its compile tool at the development stage for pre-compiling and compiling the template file into a stack of Java classes.
  • Each Java class encapsulates therein attribute and operation method of the corresponding node in the template, then a programmer introduces these classes in business logic, and assigns values to these nodes through an API (Application programming interface). Finally, the Java program is run to output HTML content.
  • XMLC do not have the concept of Merge Engine and at the same time, the template file is only valid during development, and what is used during runtime is the compiled Java class.
  • XMLC In contrast to Servlet, JSP, and Velocity, XMLC is quite simple for page designers (it is based on a pure HTML template), but more complex for business developers, because when a page (template) changes a little, they have to re-compile the HTML template into a DOM tree, and fix the compile errors (for example ⁇ TR> . . . ⁇ TR> should be ⁇ TR> . . . ⁇ /TR>)
  • the present invention provides a method for generating a dynamic web page and an apparatus for generating a dynamic web page.
  • a method for generating a dynamic web page According to the method, a structured data context is generated based on the result of a business logic process performed in response to a request from a browser, and a template associated with the request is loaded.
  • the structured data context includes at least one dynamic data item for the dynamic web page.
  • the template is able to be browsed by the browser and contains associated information that corresponds to the at least one dynamic data item of the structured data context.
  • the at least one dynamic data item of the structured data context is merged into the template so as to produce the dynamic web page.
  • an apparatus for generating a dynamic web page includes a business logic processing unit configured to generate a structured data context based on the result of a business logic process performed in response to a request from a browser, and a template loading unit configured to load a template associated with the request.
  • the structured data context includes at least one dynamic data item for the dynamic web page.
  • the template is able to be browsed by the browser and contains associated information that corresponds to the at least one dynamic data item of the structured data context.
  • the apparatus also includes a merging unit configured to merge the at least one dynamic data item of the structured data context into the template so as to produce the dynamic web page.
  • FIG. 1 is a flowchart of a method for generating a dynamic web page according to one embodiment of the present invention
  • FIG. 2 is a diagram of corresponding relationships between a data context and a pure HTML template according to one embodiment of the present invention.
  • FIG. 3 is a block diagram of an apparatus for generating a dynamic web page according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a method for generating a dynamic web page according to one embodiment of the present invention.
  • the result of a business logic process is obtained based on a request from a browser, and a structured data context is generated from the business logic process result, with the data context comprising one or more dynamic data items for dynamic web pages.
  • the request from the browser comprises any web request (for example, a user request that queries the balance at an online bank, a request to perform authentication when a user logs into an account, a request to perform searching based on certain keywords, etc.).
  • the present invention is not limited to any specific requests.
  • the present invention focuses on how to present a business logic process result to the browser; how to obtain the result of the business logic process based on a request from the browser can employ any process.
  • step 101 The business logic process performed in step 101 will be described in detail in the following through two examples.
  • the first example is a request to query balance.
  • a user inputs the account number via a user interface (UI) (or a counter system's fat client based system, or a browser page of an online bank used by an ordinary bank customer), then presses the submit button.
  • UI user interface
  • a counter system's fat client based system or a browser page of an online bank used by an ordinary bank customer
  • this request to query balance is sent to a back-end server, and this request is accepted by a certain application at the back-end.
  • the application extracts the parameter (here, the account number input by the user) from the request and hands it off to one or more subprograms for processing to obtain the balance corresponding to that account.
  • the “one or more subprograms” is the so-called “business logic”.
  • business logic There are various implementations of business logic, which are realized solely by the system's own design and code. For example, here it can be an ordinary class to directly query a database to obtain the balance information. Alternatively, it can be handed off to a remote application for processing via EJB (Enterprise JavaBeans), with the account parameter being equal to one input of the remote application and being handled by that remote application to obtain the balance information.
  • EJB Enterprise JavaBeans
  • this account parameter may be handed off to a component of the Enterprise Service Bus (ESB) so as to enter a flow to access a host via a connector of JCA (Java Connector Architecture).
  • ESA Service-Oriented Architecture
  • JCA Java Connector Architecture
  • the account balance is obtained after the business logic process. That account balance is the result of the business logic process, and the account balance needs to be returned to the user interface (i.e., dynamic web pages that request response). So the process result contains one or more dynamic data items for generating the dynamic web pages that request response.
  • the business logic process result is generated into a structured data context.
  • the second example is a request to perform authentication. First, a user inputs a user name and a password, and then submits the request.
  • the request is sent to a back-end server and a corresponding application program is started to acquire the user name and password from the request.
  • the acquired user name and password are sent to corresponding business logic to authenticate if the user name and password are correct.
  • This business logic can be direct access to a database to compare the user name/password, or handed off to a remote application service such as EJB, SOA or LDAP (Lightweight Directory Access Protocol), which the user name/password being used as the input of the remote application.
  • the business logic will return an output that is the business logic process result obtained in step 101 , and the business logic process result is used for the dynamic web pages that request response (for example, prompting that the user name/password is incorrect, or giving a signal indicating that the authentication passed).
  • the business logic ends. Since the process result contains one or more dynamic data items for generating the dynamic web pages that request response, in step 101 the business logic process result will be generated into a structured data context.
  • the structured process may be understood as generating a specific data structure or data class, etc. to facilitate subsequent processing.
  • the box on the left in FIG. 2 shows an example of a structured data context generated in step 101 , with the structured data context containing one or more dynamic data items for dynamic web pages.
  • the structured data context containing one or more dynamic data items for dynamic web pages.
  • AccountId, CustomerId, and Balance are data of basic type
  • AccountList is an Array List that is used to store a plurality of data structures with each line within the Array List being another data context (that is, an AccountInfo class that is used to store any data, for example, dynamic data items of AccountNumber, AccountType and AccountBalance).
  • business logic is a very generalized expression representing real business process logic code and not having any relationship with any specific technique or algorithm implementation. In this step, it is only important to obtain the process result of business logic, while how to process business logic is unimportant (i.e., it can be processed in any way). How to use the structured data context generated in step 101 and the dynamic data items contained in the data context will be described in detail with reference to the following step.
  • a template associated with the request from the browser is loaded, with the template being capable of being browsed by a browser and containing associated information corresponding to one or more dynamic data items in the data context.
  • the template is the working result of the web page designer.
  • the development procedure of a conventional general dynamic web site is: first the web page designer develops static web page (e.g., pure HTML), then hands it to the developer. The business developer modifies this static web page and embeds therein business logic or display logic, so that this web page can display dynamic data. At this point, this modified web page is the so-called “template” of the conventional development procedure.
  • These templates are stored at the application server side and an application program is responsible for reading and interpreting them based on different requests.
  • These template files are finally compiled and run as marks (such as HTML) that can be recognized by a standard browser, which are returned to the client request to be displayed at the client side.
  • the association of a template with a request is determined by the client's application program.
  • a template file is directly associated with a request. For example, if the URL (Uniform Resource Locator) requested by a user is “http://www.sample.com/myweb/account.jsp”, then a template file named “account.jsp” is directly called.
  • URL Uniform Resource Locator
  • the conventional template is not a template represented by pure markup language. That is, it must be compiled and run before it can be browsed by a browser.
  • embodiments of the present invention employ a template represented by pure markup language.
  • This template represented by pure markup language is a template represented by a markup language that can be directly interpreted by a browser (e.g., a browser used by the web page designer). For example, if the IE browser can interpret HTML and the WIN WAP browser can interpret WML, then a pure HTML template is a template represented by pure markup language, and a pure WML template is also a template represented by pure markup language.
  • the markup language that generates the template can include, for example, HTML, XML, WML, etc., and any other existing or future developed markup language.
  • the present invention is not limited to any specific markup language.
  • the associated information contained in the template that corresponds to the one or more dynamic data items in the data context is recorded in attributes of tags within the template.
  • the attributes can be, for example, ID (identifier) attributes or other attributes in an HTML, XML, WML, etc. template, as long as they can associate dynamic data items in the data context with dynamic content in the template.
  • a pure HTML template can be browsed by a typical browser, for example, the IE browser.
  • the pure HTML template is written by the web page designer in advance and is stored on a server.
  • the box on the right in FIG. 2 is one example of a pure HTML template that does not have any non-HTML standard mark and can be directly displayed in the IE browser. It is displayed in the browser as the following two tables.
  • the pure HTML template in the box on the right of FIG. 2 take one or more tags' ID attribute as the associated information corresponding to the one or more dynamic data items in the data context, for example, containing AccountId, CustomerId, Balance, and AccountList (with AccountList being an Array List and containing a plurality of records therein, with each record being another sub data context (AccountInfo class), and the AccountInfo class in turn containing ID attributes AccountNumber, AccountType and AccountBalance).
  • the marked content corresponding to these ID attributes can be replaced by dynamic data in the data context within the box on the left of FIG. 2 .
  • FIG. 2 shows the corresponding relationship between the data context on the left and the template on the right.
  • the template on the right of FIG. 2 is a template associated with the request from the browser.
  • the pure HTML template and its ID attributes are shown for illustrative purpose only, and the present invention is applicable to other markup languages (e.g., XML, WML, etc.) and their attributes.
  • the structure of the data context should correspond to display logic, and the attribute name and hierarchy location in the generated structured data must correspond to respective ID attributes defined in the pure HTML template.
  • step 103 one or more dynamic data items in the data context are merged into the template.
  • the method for merging the one or more dynamic data items into the template can be any known method, which includes but is not limited to the following: traversing each data item in the generated data context; and placing the data items in corresponding locations in the template if associated information corresponding to the data item is found in the template.
  • each dynamic data item in the generated data context is traversed, and the dynamic data items are placed into corresponding locations in the pure HTML template if the ID attribute corresponding to the dynamic data items is found in the pure HTML template.
  • error information is reported when there is no ID attribute corresponding to the dynamic data items in the generated data context within the pure HTML template.
  • error information is reported when there is a value of an ID attribute in the pure HTML template that is not replaced by corresponding dynamic data after the traverse is completed.
  • the traversal method and error reporting method can utilize any known method. For example, character string lookup matching, encoding occurrence location of ID attributes or splitting a template into DOM nodes etc. can be used.
  • the present invention is not limited to any specific method and methods are not described in detail for brevity.
  • the process can include checking syntax of the template to find any written errors therein before step 103 , and checking syntax of generated web pages after merging so as to find any errors produced during merging after step 103 .
  • the method for checking syntax can utilize any known method, for example, mark match principle check, site location check etc. The present invention is not limited to any specific method and method are not described for brevity.
  • the method for generating a dynamic web page of this embodiment of the present invention utilizes a template represented by pure markup language and does not need to compile the template with an additional compiler, so as to simplify the process for generating dynamic web pages.
  • the template represented by pure markup language web pages can be designed by employing any existing markup language design tools, so that no other technical requirement is required for a web page designer.
  • the web page's entire development process and the implementation of dynamic features are all based on markup language, and no script or labels that are not in markup language are introduced, so that relations between web page designers and developers are made simple.
  • the method of this embodiment does not need to perform any pre-processing on the template, what is needed is performing corresponding replacement on dynamic data items therein during runtime, so it is a simple and effective method for generating web pages.
  • FIG. 3 is a block diagram of an apparatus for generating a dynamic web page according to an embodiment of the present invention. For parts that are the same as in the above embodiment, a detailed description is omitted.
  • the apparatus 300 for generating a dynamic web page comprises a business logic processing unit 301 configured to generate a structured data context based on the result of a business logic process obtained in response to a browser's request, with the data context comprising at least one dynamic data item for the dynamic web page.
  • the apparatus 300 also comprises a template loading unit 302 configured to load a template associated with the request, with the template able to be browsed by a browser and containing associated information corresponding to the at least one dynamic data item in the data context; and a merging unit 303 configured to merge the at least one dynamic data item in the data context into the template.
  • the request from the browser received by business logic processing unit 301 comprises any known web request, for example, a user request that queries the balance at an online bank, a request to perform authentication when a user logs into an account, a request to perform searching based on certain keywords, etc.
  • the present invention is not limited to any specific request.
  • business (transaction) performed based on the input parameter is the so-called “business logic”.
  • business logic processing unit 301 For an example that describes the type of business logic that can be performed by business logic processing unit 301 , see the example above relating to the method for generating a dynamic web page. It will not be described again for brevity.
  • business logic is a very generalized expression representing real business process logic code and not having any relationship with any specific technique or algorithm implementation.
  • the data context generated by business logic processing unit 301 and the dynamic data contained in the data context will be described in detail in the following.
  • a template associated with the request from the browser received by business logic processing unit 301 is loaded by template loading unit 302 , with the template being able to be browsed by a browser and containing associated information corresponding to one or more dynamic data items in the data context.
  • the template loaded by template loading unit 302 is a template represented by a markup language that can be interpreted by a browser (for example, a browser used by the web page designer).
  • the markup language can include, for example, HTML, XML, XML, etc., and any other existing or future developed markup language.
  • the present invention is not limited to any specific markup language.
  • the associated information contained in the template corresponding to the one or more dynamic data items in the data context are recorded in attributes of tags within the template.
  • the attributes can be, for example, ID (identifier) attributes or other attributes in an HTML, XML, or WML template, as long as they can associate dynamic data items in the data context with dynamic content in the template.
  • the merging unit 303 merges the one or more dynamic data items in the data context generated by the business logic processing unit 301 into the template loaded by the template loading unit 302 .
  • the merging unit 303 that merges the one or more dynamic data items into the template can be any known unit, which includes but is not limited to a unit that includes: a traversing unit for traversing each data item in the generated data context, and a placing unit for placing the data items in corresponding locations in the template if associated information corresponding to the data item is found in the template.
  • the traversing unit traverses each dynamic data item in the generated data context, and the placing unit places the dynamic data items in corresponding locations in the pure HTML template if ID attributes corresponding to the dynamic data items are found in the pure HTML template.
  • the merging unit 303 further comprises an error reporting unit. When there is no ID attribute corresponding to the dynamic data items in the generated data context within the pure HTML template, the error reporting unit reports that error information. In addition, when there is a value of ID attributes in the pure HTML template that is not replaced by corresponding dynamic data after the traverse is completed, the error reporting unit reports that error information.
  • the traversing unit, placing unit, and error reporting unit can be any known unit.
  • a character string lookup matching unit for encoding occurrence locations of ID attributes or a unit for splitting a template into DOM nodes etc.
  • an encoding unit for encoding occurrence locations of ID attributes or a unit for splitting a template into DOM nodes etc.
  • the present invention is not limited to any specific unit and specific units are not described for brevity.
  • the apparatus 300 for generating a dynamic web page of this embodiment further comprises a syntax checking unit, which checks syntax of the template to find any errors therein before merging unit 303 performs the merging, and checks syntax of the generated web pages to find any errors produced during merging after merging unit 303 performs the merging.
  • the syntax checking unit can be any known unit, for example, a mark match principle checking unit, a site location checking unit etc. The present invention is not limited to any specific unit and specific units are not described for brevity.
  • the apparatus for generating a dynamic web page of this embodiment of the present invention utilizes a template represented by pure markup language and does not need to compile the template with an additional compiler, so as to simplify the process for generating dynamic web pages.
  • the template represented by pure markup language web pages can be designed by employing any existing markup language design tools, so that no other technical requirement is required for a web page designer.
  • the web page's entire development process and implementation of dynamic features are all based on markup language, and no script or labels that are not in markup language are introduced, so that relations between web page designers and developers are made simple.
  • the apparatus of this embodiment does not need to perform any pre-processing on the template, what is needed is performing corresponding replacement on dynamic data items therein during runtime, so it is a simple and effective apparatus for generating web pages.
  • the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment containing both hardware and software elements.
  • the present invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc.
  • the present invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system.
  • a computer-usable or computer-readable medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
  • the medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium.
  • Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk, and an optical disk.
  • Current examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-R/W), and DVD.
  • a data processing system suitable for storing and/or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus.
  • the memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.
  • I/O devices including but not limited to keyboards, displays, pointing devices, etc.
  • I/O controllers can be coupled to the system either directly or through intervening I/O controllers.
  • Network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks.
  • Modems, cable modems, and Ethernet cards are just a few of the currently available types of network adapters.

Abstract

A method and apparatus are provided for generating a dynamic web page. A structured data context is generated based on the result of a business logic process performed in response to a request from a browser, and a template associated with the request is loaded. The structured data context includes at least one dynamic data item for the dynamic web page. The template is able to be browsed by the browser and contains associated information that corresponds to the at least one dynamic data item of the structured data context. The at least one dynamic data item of the structured data context is merged into the template so as to produce the dynamic web page.

Description

    CROSS-REFERENCE TO RELATED APPLICATIONS
  • This application is based upon and claims priority from Chinese Patent Application No. 2006101235774.0, filed Oct. 19, 2006, the entire disclosure of which is herein incorporated by reference.
  • FIELD OF THE INVENTION
  • The present invention relates to information processing technology, and more particularly relates to generating a dynamic web page.
  • BACKGROUND OF THE INVENTION
  • In any browser-based architecture, no matter what presentation techniques and architecture designs are employed at the back-end server side, it must finally return to a browser markup language that can be recognized by the browser, such as HTML (Hyper Text Markup Language), XML (eXtensible Markup Language), WML (Wireless Markup Language), etc.
  • When generating a dynamic web page, usually web page designers (e.g., art designers) will first design a template, and then the template is populated by developers to realize various dynamic functions (such as dynamic data presentation). The design template is, for example, an HTML design template. Generally, a web page designer (e.g., art designer) only has web page design related skills (for example, only understands the HTML language), and does not have any non-web page design related skills (such as understanding the java language). During development of dynamic web pages, a developer that has no or only a small amount of web page design related skills is responsible for back-end program encoding and dynamic data generating, but not responsible for controlling presentation style of the web page. A developer can utilize, for example, Perl, Tcl, Java, Python, ASP and many other languages and tools to populate the template in order to realize generation of dynamic data.
  • There are many popular methods for presenting dynamic data of web pages, for example, Servlet+JSP (JavaServer Page) (or with JSP TagLibs), Velocity, XMLC (eXtensible Markup Language Complier), etc. However, the present methods all require web page designers and developers to cooperatively develop the same template file. For example, first the web page designer finishes the template file (based on a markup language that can be recognized by a standard browser, such as HTML or WML), and then the developer modifies this file and populates program codes that can only be understood by the developer. This inevitably destroys the standard property of the original template file, and possibly causing the modified template to not be recognized by the standard browser. This presents a great challenge for subsequent maintenance by the web page designer, because a lot of program languages that cannot be understood by the web page designer are added into the template, so that the web page designer can no longer perform maintenance with the original web page editor. This will be further described in the following, by taking part of the typical existing techniques as an example.
  • A Servlet is a kind of Java application running on a web server or application server and is used to provide a server side process, such as accessing a database, etc. The Servlet couples presentation markup content with business logic processes.
  • The following is a sample snippet of a Servlet.
  • response.setBufferSize (“8*1024”);
    response.setContentSize (“text/html”);
    PrintWriter out = response.getWriter ( );
    out.printIn (“<HTML>”);
    out.printIn (“<HEAD> <TITLE> Servlet Output</TITLE> </HEAD>”);
    out.printIn (“<BODY>”);
    out.printIn (“<P> Welcome To this World </P>”);
    out.printIn (“</BODY>”);
    printIn (“</HTML>”);
  • Usually, the development flow using the Servlet technique is as follows: the web page designer writes a standard template file (such as an HTML file), then the developer writes servlet code that contains all the templates, with these codes being embedded standard java logic code to display dynamic data. However, the disadvantage of servlet technology is obvious: it is very hard to split presentation markup content and business logic processes. And for further maintenance it is a disaster because any display related data modification (such as changing the font, layout, etc.) requires direct modification of java code, and therefore the whole servlet code needs to be re-compiled and re-deployed.
  • JSP is an extension to servlet technology, which allows HTML and Java to be incorporated within the same page file, for example, inserting Java into a markup page to produce dynamic content, with Java providing business logic processes, and HTML providing the page that is presented in a web page browser.
  • A JSP file accesses JavaBean or other components that can send generated dynamic content to a browser. When a web server receives a JSP file request, it sends the request to an application server (such as IBM WebSphere). The application server parses the JSP file and generates a Java source file (which is compiled and run as a Servlet). Unless the original JSP file has been updated, the generation and compilation of the JSP source file do not happen until the first invocation of the Servlet. In this case, the application server will detect the update that was made and re-generate and compile the Servlet before executing it.
  • The following is a sample snippet of JSP.
  • <% @ page import = “java.util.Date, java.text.DateFormat” %>
    <HTML>
    <BODY>
    <P> Welcome to JSP development where the time is: <% =
    DateFormat.getTimeInstance ( ) .format((new Data( ))) %>
    </BODY>
    </HTML>
  • Although it is not necessary to write presentation markup in programming for JSP, the web page designer and developer must be able to handle/understand the Java program and business logic embedded in the page, which is very difficult for a web page designer because a web page designer can only understand standard HTML and cannot understand any Java program embedded in the HTML. There is great difficulty if it is required at this time for the web page designer to make a post page style modification. A lot of non-HTML standard marked codes are added into the template file at this time, and page edit tools will become unavailable.
  • Velocity is a Java-based template engine, which permits anyone to use simple and powerful template language to reference objects defined in Java code. Web designers can work in parallel with Java programmers to develop web pages according to Model/View/Controller (MVC) architecture, meaning that web page designers can focus solely on designing web pages, and programmers can focus solely on writing codes.
  • The following is a sample snippet of Velocity.
  • <HTML>
    <BODY>
    Hello $customer.Name!
    <TABLE>
    #foreach($mud in $mudsOnSpecial)
    #if($customer.hasPurchased($mud))
    <TR>
    <TD>
    $flogger.getPromo($mud)
    </TD>
    </TR>
    #end
    #end
    </TABLE>
    </BODY>
    </HTML>
  • But actually, Velocity template language is very similar to a Java program in JSP. For web page designers, a lot of business logic or other language that cannot be understood are embedded in the template file. Moreover, within a Velocity template, it is required to use its customized VTL (Velocity Template Language). After VTL is added, this template is no longer pure HTML, which also requires that the page developer have certain front-end programming skill. A template which has VTL added into it could not be recognized by a standard HTML editor. Furthermore, Velocity's Merge Engine is centered on a template, i.e., it first reads a template, then compiles the template file and at the same time interprets the VTL embedded in the template, with the VTL accessing Data Context so as to perform dynamic data replacement. Velocity's context is just a data storage center, and there is only data in it without any presentation related information (how to present the data is interpreted by VTL in the template). For example, if there are 10 records to be displayed in a page while there are 20 pieces of data returned by business logic, Velocity's context will put in the 20 pieces of data, then 1-10 will be displayed in cycle by VTL in the template, that is, the display is controlled by the template. All of which have demanded higher requirements for developers.
  • The XMLC method is to compile a markup language page (such as HTML, XML, or WML) to generate a corresponding Java class. This Java class contains the page's complete DOM (Document Object Model) tree structure and its operation method, so that it can process any content and its attribute on the page. More importantly, in XMLC, dynamic content is cleverly associated with the ID attribute in HTML and corresponding operation methods are generated in the Java class, for example, change attribute of text content, etc. Unlike JSP, XMLC does not introduce any extra HTML/XML tag attribute, but just reuses the ID attribute. Therefore, actually XMLC can process any markup language, not only XML, HTML, and WML.
  • XMLC processes a markup language page via 3 steps, the work flow of which is as follows.
  • 1. Check whether the input document (HTML, XML, WML, etc.) is valid and whether the tag is legal and complete.
  • 2. Generate a set of Java classes which represents the input document (page) as related DOM tree in development phase. In practice, an instance of such class is created, and the DOM tree of the page can be manipulated by using an instance of this class.
  • 3. A Java method that handles dynamic content is generated. The dynamic content only needs to be marked with ID.
  • It can be seen that this method has significantly reduced the Java developer's workload on processing a page's dynamic content.
  • Although XMLC uses standard HTML as the template and uses the ID attribute of HTML as keyword or locating, XMLC requires using its compile tool at the development stage for pre-compiling and compiling the template file into a stack of Java classes. Each Java class encapsulates therein attribute and operation method of the corresponding node in the template, then a programmer introduces these classes in business logic, and assigns values to these nodes through an API (Application programming interface). Finally, the Java program is run to output HTML content. XMLC do not have the concept of Merge Engine and at the same time, the template file is only valid during development, and what is used during runtime is the compiled Java class.
  • In contrast to Servlet, JSP, and Velocity, XMLC is quite simple for page designers (it is based on a pure HTML template), but more complex for business developers, because when a page (template) changes a little, they have to re-compile the HTML template into a DOM tree, and fix the compile errors (for example <TR> . . . <TR> should be <TR> . . . </TR>)
  • Therefore, there is a need for a technique to generate dynamic web pages based on a template that can be browsed (interpreted) by a browser, so that it is simple for both page designers and developers and makes the relation between them simple, such that either can easily read and understand a modification made by the other.
  • SUMMARY OF THE INVENTION
  • To solve the above problems, the present invention provides a method for generating a dynamic web page and an apparatus for generating a dynamic web page.
  • According to one aspect of the present invention, there is provided a method for generating a dynamic web page. According to the method, a structured data context is generated based on the result of a business logic process performed in response to a request from a browser, and a template associated with the request is loaded. The structured data context includes at least one dynamic data item for the dynamic web page. The template is able to be browsed by the browser and contains associated information that corresponds to the at least one dynamic data item of the structured data context. The at least one dynamic data item of the structured data context is merged into the template so as to produce the dynamic web page.
  • According to another aspect of the present invention, there is provided an apparatus for generating a dynamic web page. The apparatus includes a business logic processing unit configured to generate a structured data context based on the result of a business logic process performed in response to a request from a browser, and a template loading unit configured to load a template associated with the request. The structured data context includes at least one dynamic data item for the dynamic web page. The template is able to be browsed by the browser and contains associated information that corresponds to the at least one dynamic data item of the structured data context. The apparatus also includes a merging unit configured to merge the at least one dynamic data item of the structured data context into the template so as to produce the dynamic web page.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • It is believed that the above and other features, advantages and objects of the present invention will be better understood from the description of the detailed implementation of the present invention in conjunction with accompany drawings, in which:
  • FIG. 1 is a flowchart of a method for generating a dynamic web page according to one embodiment of the present invention;
  • FIG. 2 is a diagram of corresponding relationships between a data context and a pure HTML template according to one embodiment of the present invention; and
  • FIG. 3 is a block diagram of an apparatus for generating a dynamic web page according to an embodiment of the present invention.
  • DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
  • Various embodiments of the present invention will now be described in detail in conjunction with the accompany drawings.
  • FIG. 1 is a flowchart of a method for generating a dynamic web page according to one embodiment of the present invention. In FIG. 1, first at step 101, the result of a business logic process is obtained based on a request from a browser, and a structured data context is generated from the business logic process result, with the data context comprising one or more dynamic data items for dynamic web pages.
  • In particular, the request from the browser comprises any web request (for example, a user request that queries the balance at an online bank, a request to perform authentication when a user logs into an account, a request to perform searching based on certain keywords, etc.). The present invention is not limited to any specific requests. The present invention focuses on how to present a business logic process result to the browser; how to obtain the result of the business logic process based on a request from the browser can employ any process.
  • The term “business logic” in step 101, and more generally in the context of the present invention, refers more to a semantic term, rather than a technical term. Any code regarding a business process can be called “business logic”. That is, it relates to any system whose purpose is: accept input parameter from user==> perform business (transaction) based on the input parameter==> return display result. Whatever the system, they are all based on this basic flow. Here, the business (transaction) performed based on the input parameter is the so-called “business logic”.
  • The business logic process performed in step 101 will be described in detail in the following through two examples.
  • The first example is a request to query balance. First, a user inputs the account number via a user interface (UI) (or a counter system's fat client based system, or a browser page of an online bank used by an ordinary bank customer), then presses the submit button.
  • Next, this request to query balance is sent to a back-end server, and this request is accepted by a certain application at the back-end.
  • Next, the application extracts the parameter (here, the account number input by the user) from the request and hands it off to one or more subprograms for processing to obtain the balance corresponding to that account. Here, the “one or more subprograms” is the so-called “business logic”. There are various implementations of business logic, which are realized solely by the system's own design and code. For example, here it can be an ordinary class to directly query a database to obtain the balance information. Alternatively, it can be handed off to a remote application for processing via EJB (Enterprise JavaBeans), with the account parameter being equal to one input of the remote application and being handled by that remote application to obtain the balance information. Alternatively, based on an SOA (Service-Oriented Architecture) architecture, this account parameter may be handed off to a component of the Enterprise Service Bus (ESB) so as to enter a flow to access a host via a connector of JCA (Java Connector Architecture). No matter how this procedure is designed (simple or complex), the purpose of it is to obtain the user's balance based on the account information that was input, and this procedure can be called “business logic”.
  • The account balance is obtained after the business logic process. That account balance is the result of the business logic process, and the account balance needs to be returned to the user interface (i.e., dynamic web pages that request response). So the process result contains one or more dynamic data items for generating the dynamic web pages that request response. In step 101, the business logic process result is generated into a structured data context.
  • The second example is a request to perform authentication. First, a user inputs a user name and a password, and then submits the request.
  • Next, the request is sent to a back-end server and a corresponding application program is started to acquire the user name and password from the request.
  • Next, the acquired user name and password are sent to corresponding business logic to authenticate if the user name and password are correct. This business logic can be direct access to a database to compare the user name/password, or handed off to a remote application service such as EJB, SOA or LDAP (Lightweight Directory Access Protocol), which the user name/password being used as the input of the remote application.
  • Next, the business logic will return an output that is the business logic process result obtained in step 101, and the business logic process result is used for the dynamic web pages that request response (for example, prompting that the user name/password is incorrect, or giving a signal indicating that the authentication passed). At this time, the business logic ends. Since the process result contains one or more dynamic data items for generating the dynamic web pages that request response, in step 101 the business logic process result will be generated into a structured data context. Here, the structured process may be understood as generating a specific data structure or data class, etc. to facilitate subsequent processing.
  • The box on the left in FIG. 2 shows an example of a structured data context generated in step 101, with the structured data context containing one or more dynamic data items for dynamic web pages. In this example of the data context, AccountId, CustomerId, and Balance are data of basic type, while AccountList is an Array List that is used to store a plurality of data structures with each line within the Array List being another data context (that is, an AccountInfo class that is used to store any data, for example, dynamic data items of AccountNumber, AccountType and AccountBalance).
  • In summary, “business logic” is a very generalized expression representing real business process logic code and not having any relationship with any specific technique or algorithm implementation. In this step, it is only important to obtain the process result of business logic, while how to process business logic is unimportant (i.e., it can be processed in any way). How to use the structured data context generated in step 101 and the dynamic data items contained in the data context will be described in detail with reference to the following step.
  • Next, at step 102, a template associated with the request from the browser is loaded, with the template being capable of being browsed by a browser and containing associated information corresponding to one or more dynamic data items in the data context.
  • The template is the working result of the web page designer. The development procedure of a conventional general dynamic web site is: first the web page designer develops static web page (e.g., pure HTML), then hands it to the developer. The business developer modifies this static web page and embeds therein business logic or display logic, so that this web page can display dynamic data. At this point, this modified web page is the so-called “template” of the conventional development procedure. These templates are stored at the application server side and an application program is responsible for reading and interpreting them based on different requests. These template files are finally compiled and run as marks (such as HTML) that can be recognized by a standard browser, which are returned to the client request to be displayed at the client side. The association of a template with a request is determined by the client's application program. One common implementation is: a template file is directly associated with a request. For example, if the URL (Uniform Resource Locator) requested by a user is “http://www.sample.com/myweb/account.jsp”, then a template file named “account.jsp” is directly called.
  • The conventional template is not a template represented by pure markup language. That is, it must be compiled and run before it can be browsed by a browser. On the other hand, embodiments of the present invention employ a template represented by pure markup language. This template represented by pure markup language is a template represented by a markup language that can be directly interpreted by a browser (e.g., a browser used by the web page designer). For example, if the IE browser can interpret HTML and the WIN WAP browser can interpret WML, then a pure HTML template is a template represented by pure markup language, and a pure WML template is also a template represented by pure markup language. The markup language that generates the template can include, for example, HTML, XML, WML, etc., and any other existing or future developed markup language. The present invention is not limited to any specific markup language. When performing the request response's browser presentation with a template represented by pure markup language, there is no need for a web page designer to understand program language, and there is no need to re-compile the code.
  • Additionally, the associated information contained in the template that corresponds to the one or more dynamic data items in the data context is recorded in attributes of tags within the template. The attributes can be, for example, ID (identifier) attributes or other attributes in an HTML, XML, WML, etc. template, as long as they can associate dynamic data items in the data context with dynamic content in the template.
  • This exemplary embodiment of the present invention will now be described by taking a pure HTML template formed by pure HTML tags as an example. A pure HTML template can be browsed by a typical browser, for example, the IE browser. The pure HTML template is written by the web page designer in advance and is stored on a server.
  • An example of pure HTML is as follows.
  • <input type = “input” name = “userName” value = “my name” id =
    “userName”>

    All the information contained therein is standard HTML syntax and there does not appear any non-HTML syntax, so it is called “pure HTML”.
  • The following example is not pure HTML.
  • <input type = “input” name = “userName” value =
    “<%=formBean.getUserName( )%>”>

    Note that “<%=formBean.getUserName( ) %>” is not standard HTML syntax, but is java logical code that cannot be directly recognized by a browser. So, it is not called “pure HTML”.
  • The box on the right in FIG. 2 is one example of a pure HTML template that does not have any non-HTML standard mark and can be directly displayed in the IE browser. It is displayed in the browser as the following two tables.
  • AccountId 123-456-789 CustomerId X00192810281
    Balance 2234332.00
  • AccountNumber AccountType AccountBalance
    01010-202920-1929192 Credit 10000.00
  • For the pure HTML template in the box on the right of FIG. 2, take one or more tags' ID attribute as the associated information corresponding to the one or more dynamic data items in the data context, for example, containing AccountId, CustomerId, Balance, and AccountList (with AccountList being an Array List and containing a plurality of records therein, with each record being another sub data context (AccountInfo class), and the AccountInfo class in turn containing ID attributes AccountNumber, AccountType and AccountBalance). The marked content corresponding to these ID attributes can be replaced by dynamic data in the data context within the box on the left of FIG. 2. FIG. 2 shows the corresponding relationship between the data context on the left and the template on the right. The template on the right of FIG. 2 is a template associated with the request from the browser. The pure HTML template and its ID attributes are shown for illustrative purpose only, and the present invention is applicable to other markup languages (e.g., XML, WML, etc.) and their attributes.
  • The structure of the data context should correspond to display logic, and the attribute name and hierarchy location in the generated structured data must correspond to respective ID attributes defined in the pure HTML template.
  • Next, at step 103, one or more dynamic data items in the data context are merged into the template.
  • Specifically, the method for merging the one or more dynamic data items into the template can be any known method, which includes but is not limited to the following: traversing each data item in the generated data context; and placing the data items in corresponding locations in the template if associated information corresponding to the data item is found in the template.
  • For example, for the pure HTML template, each dynamic data item in the generated data context is traversed, and the dynamic data items are placed into corresponding locations in the pure HTML template if the ID attribute corresponding to the dynamic data items is found in the pure HTML template. Furthermore, error information is reported when there is no ID attribute corresponding to the dynamic data items in the generated data context within the pure HTML template. In addition, error information is reported when there is a value of an ID attribute in the pure HTML template that is not replaced by corresponding dynamic data after the traverse is completed. The traversal method and error reporting method can utilize any known method. For example, character string lookup matching, encoding occurrence location of ID attributes or splitting a template into DOM nodes etc. can be used. The present invention is not limited to any specific method and methods are not described in detail for brevity.
  • In addition, the process can include checking syntax of the template to find any written errors therein before step 103, and checking syntax of generated web pages after merging so as to find any errors produced during merging after step 103. The method for checking syntax can utilize any known method, for example, mark match principle check, site location check etc. The present invention is not limited to any specific method and method are not described for brevity.
  • Accordingly, the method for generating a dynamic web page of this embodiment of the present invention utilizes a template represented by pure markup language and does not need to compile the template with an additional compiler, so as to simplify the process for generating dynamic web pages. By using the template represented by pure markup language, web pages can be designed by employing any existing markup language design tools, so that no other technical requirement is required for a web page designer. In addition, the web page's entire development process and the implementation of dynamic features are all based on markup language, and no script or labels that are not in markup language are introduced, so that relations between web page designers and developers are made simple. Moreover, the method of this embodiment does not need to perform any pre-processing on the template, what is needed is performing corresponding replacement on dynamic data items therein during runtime, so it is a simple and effective method for generating web pages.
  • FIG. 3 is a block diagram of an apparatus for generating a dynamic web page according to an embodiment of the present invention. For parts that are the same as in the above embodiment, a detailed description is omitted.
  • In FIG. 3, the apparatus 300 for generating a dynamic web page comprises a business logic processing unit 301 configured to generate a structured data context based on the result of a business logic process obtained in response to a browser's request, with the data context comprising at least one dynamic data item for the dynamic web page. The apparatus 300 also comprises a template loading unit 302 configured to load a template associated with the request, with the template able to be browsed by a browser and containing associated information corresponding to the at least one dynamic data item in the data context; and a merging unit 303 configured to merge the at least one dynamic data item in the data context into the template.
  • In particular, the request from the browser received by business logic processing unit 301 comprises any known web request, for example, a user request that queries the balance at an online bank, a request to perform authentication when a user logs into an account, a request to perform searching based on certain keywords, etc. The present invention is not limited to any specific request.
  • As explained above, the “business logic” performed by business logic processing unit 301 refers more to a semantic term, rather than a technical term. Any code regarding a business process can be called “business logic”. That is, it relates to a system whose purpose is: accept input parameter from user==> perform business (transaction) based on the input parameter==> return display result. Whatever the system, they all based on this basic flow. Here, the business (transaction) performed based on the input parameter is the so-called “business logic”.
  • For an example that describes the type of business logic that can be performed by business logic processing unit 301, see the example above relating to the method for generating a dynamic web page. It will not be described again for brevity.
  • In summary, “business logic” is a very generalized expression representing real business process logic code and not having any relationship with any specific technique or algorithm implementation. The data context generated by business logic processing unit 301 and the dynamic data contained in the data context will be described in detail in the following.
  • A template associated with the request from the browser received by business logic processing unit 301 is loaded by template loading unit 302, with the template being able to be browsed by a browser and containing associated information corresponding to one or more dynamic data items in the data context.
  • Specifically, the template loaded by template loading unit 302 is a template represented by a markup language that can be interpreted by a browser (for example, a browser used by the web page designer). The markup language can include, for example, HTML, XML, XML, etc., and any other existing or future developed markup language. The present invention is not limited to any specific markup language.
  • The associated information contained in the template corresponding to the one or more dynamic data items in the data context are recorded in attributes of tags within the template. The attributes can be, for example, ID (identifier) attributes or other attributes in an HTML, XML, or WML template, as long as they can associate dynamic data items in the data context with dynamic content in the template.
  • For the example of a pure HTML template formed by pure HTML tags, see the example above relating to the method for generating a dynamic web page. It will not be described again for brevity.
  • The merging unit 303 merges the one or more dynamic data items in the data context generated by the business logic processing unit 301 into the template loaded by the template loading unit 302.
  • The merging unit 303 that merges the one or more dynamic data items into the template can be any known unit, which includes but is not limited to a unit that includes: a traversing unit for traversing each data item in the generated data context, and a placing unit for placing the data items in corresponding locations in the template if associated information corresponding to the data item is found in the template.
  • For example, for the pure HTML template, the traversing unit traverses each dynamic data item in the generated data context, and the placing unit places the dynamic data items in corresponding locations in the pure HTML template if ID attributes corresponding to the dynamic data items are found in the pure HTML template. Furthermore, the merging unit 303 further comprises an error reporting unit. When there is no ID attribute corresponding to the dynamic data items in the generated data context within the pure HTML template, the error reporting unit reports that error information. In addition, when there is a value of ID attributes in the pure HTML template that is not replaced by corresponding dynamic data after the traverse is completed, the error reporting unit reports that error information. The traversing unit, placing unit, and error reporting unit can be any known unit. For example, a character string lookup matching unit, an encoding unit for encoding occurrence locations of ID attributes or a unit for splitting a template into DOM nodes etc. can be used. The present invention is not limited to any specific unit and specific units are not described for brevity.
  • In addition, the apparatus 300 for generating a dynamic web page of this embodiment further comprises a syntax checking unit, which checks syntax of the template to find any errors therein before merging unit 303 performs the merging, and checks syntax of the generated web pages to find any errors produced during merging after merging unit 303 performs the merging. The syntax checking unit can be any known unit, for example, a mark match principle checking unit, a site location checking unit etc. The present invention is not limited to any specific unit and specific units are not described for brevity.
  • Accordingly, the apparatus for generating a dynamic web page of this embodiment of the present invention utilizes a template represented by pure markup language and does not need to compile the template with an additional compiler, so as to simplify the process for generating dynamic web pages. By using the template represented by pure markup language, web pages can be designed by employing any existing markup language design tools, so that no other technical requirement is required for a web page designer. In addition, the web page's entire development process and implementation of dynamic features are all based on markup language, and no script or labels that are not in markup language are introduced, so that relations between web page designers and developers are made simple. Moreover, the apparatus of this embodiment does not need to perform any pre-processing on the template, what is needed is performing corresponding replacement on dynamic data items therein during runtime, so it is a simple and effective apparatus for generating web pages.
  • The present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment containing both hardware and software elements. In a preferred embodiment, the present invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc.
  • Furthermore, the present invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer-usable or computer-readable medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
  • The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk, and an optical disk. Current examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-R/W), and DVD.
  • A data processing system suitable for storing and/or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.
  • Input/output or I/O devices (including but not limited to keyboards, displays, pointing devices, etc.) can be coupled to the system either directly or through intervening I/O controllers.
  • Network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modems, and Ethernet cards are just a few of the currently available types of network adapters.
  • Although a method for generating a dynamic web page according to the present invention and an apparatus for generating a dynamic web page according to the present invention have been described in detail through some exemplary embodiments, these embodiments are not meant to be exhaustive. Various variations and modifications can be made therein by those of ordinary skill in the art without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to these embodiments, but its scope is only defined by the accompany claims.

Claims (20)

1. A method for generating a dynamic web page, the method comprising the steps of:
generating a structured data context based on a result of a business logic process performed in response to a request from a browser, the structured data context including at least one dynamic data item for the dynamic web page;
loading a template associated with the request, the template being able to be browsed by the browser and containing associated information that corresponds to the at least one dynamic data item of the structured data context; and
merging the at least one dynamic data item of the structured data context into the template so as to produce the dynamic web page.
2. The method according to claim 1, wherein the merging step comprises:
traversing each of the dynamic data items of the structured data context that was generated; and
placing that dynamic data item into a corresponding location in the template if the associated information that corresponds to the dynamic data item is found in the template.
3. The method according to claim 2, wherein the merging step further comprises:
reporting error information when the template does not contain associated information that corresponds to the dynamic data item of the structured data context that was generated.
4. The method according to claim 2, wherein the merging step further comprises:
reporting error information when, after the traversing is completed, there is associated information in the template that is not replaced by one of the dynamic data items.
5. The method according to claim 1, further comprising the step of checking syntax of the template before the merging step.
6. The method according to claim 1, further comprising the step of:
after the merging step, checking syntax of the dynamic web page that is produced.
7. The method according to claim 1,
wherein the template is represented by a markup language, and
the associated information contained in the template that corresponds to the at least one dynamic data item of the structured data context is recorded in an attribute of a tag in the template.
8. The method according to claim 7, wherein the template is represented by HTML, XML, or WML.
9. The method according to claim 8, wherein the associated information contained in the template that corresponds to the at least one dynamic data items of the structured data context is recorded in an ID attribute of the tag in the template.
10. A computer-readable medium encoded with a program for generating a dynamic web page, the program comprising instructions for performing the steps of:
generating a structured data context based on a result of a business logic process performed in response to a request from a browser, the structured data context including at least one dynamic data item for the dynamic web page;
loading a template associated with the request, the template being able to be browsed by the browser and containing associated information that corresponds to the at least one dynamic data item of the structured data context; and
merging the at least one dynamic data item of the structured data context into the template so as to produce the dynamic web page.
11. The computer-readable medium according to claim 10, wherein the merging step comprises:
traversing each of the dynamic data items of the structured data context that was generated; and
placing that dynamic data item into a corresponding location in the template if the associated information that corresponds to the dynamic data item is found in the template.
12. The computer-readable medium according to claim 11, wherein the merging step further comprises:
reporting error information when the template does not contain associated information that corresponds to the dynamic data item of the structured data context that was generated.
13. The computer-readable medium according to claim 11, wherein the merging step further comprises:
reporting error information when, after the traversing is completed, there is associated information in the template that is not replaced by one of the dynamic data items.
14. The computer-readable medium according to claim 10, wherein the program further comprises instructions for performing the step of checking syntax of the template before the merging step.
15. The computer-readable medium according to claim 10,
wherein the template is represented by a markup language, and
the associated information contained in the template that corresponds to the at least one dynamic data item of the structured data context is recorded in an ID attribute of a tag in the template.
16. An apparatus for generating a dynamic web page, the apparatus comprising:
a business logic processing unit configured to generate a structured data context based on a result of a business logic process performed in response to a request from a browser, the structured data context including at least one dynamic data item for the dynamic web page;
a template loading unit configured to load a template associated with the request, the template being able to be browsed by the browser and containing associated information that corresponds to the at least one dynamic data item of the structured data context; and
a merging unit configured to merge the at least one dynamic data item of the structured data context into the template so as to produce the dynamic web page.
17. The apparatus according to claim 16, wherein the merging unit comprises:
a traversing unit configured to traverse each of the dynamic data items in the structured data context that was generated; and
a placing unit configured to place said that dynamic data item into a corresponding location in the template if the associated information that corresponds to the dynamic data item is found in the template.
18. The apparatus according to claim 17, wherein the merging unit further comprises an error reporting unit configured to report error information when the template does not contain associated information that corresponds to the dynamic data item of the structured data context that was generated.
19. The apparatus according to claim 17, wherein the merging unit further comprises an error reporting unit configured to report error information when, after the traversing by the traversing unit is completed, there is associated information in the template that is not replaced by one of the dynamic data items.
20. The apparatus according to claim 16,
wherein the template is represented by a markup language, and
the associated information contained in the template that corresponds to the at least one dynamic data item of the structured data context is recorded in an ID attribute of a tag in the template.
US12/129,028 2006-10-19 2008-05-29 Method and apparatus for generatng a dynamic web page Abandoned US20080228809A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US12/129,028 US20080228809A1 (en) 2006-10-19 2008-05-29 Method and apparatus for generatng a dynamic web page

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
CNA2006101357740A CN101165685A (en) 2006-10-19 2006-10-19 Dynamic web page generation method and system
CNCN920060059US1 2006-10-19
CN2006101235774.0 2006-10-19
US11/863,860 US8126901B2 (en) 2006-10-19 2007-09-28 Method and apparatus for generating a dynamic web page
US12/129,028 US20080228809A1 (en) 2006-10-19 2008-05-29 Method and apparatus for generatng a dynamic web page

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US11/863,860 Continuation US8126901B2 (en) 2006-10-19 2007-09-28 Method and apparatus for generating a dynamic web page

Publications (1)

Publication Number Publication Date
US20080228809A1 true US20080228809A1 (en) 2008-09-18

Family

ID=39334384

Family Applications (2)

Application Number Title Priority Date Filing Date
US11/863,860 Expired - Fee Related US8126901B2 (en) 2006-10-19 2007-09-28 Method and apparatus for generating a dynamic web page
US12/129,028 Abandoned US20080228809A1 (en) 2006-10-19 2008-05-29 Method and apparatus for generatng a dynamic web page

Family Applications Before (1)

Application Number Title Priority Date Filing Date
US11/863,860 Expired - Fee Related US8126901B2 (en) 2006-10-19 2007-09-28 Method and apparatus for generating a dynamic web page

Country Status (2)

Country Link
US (2) US8126901B2 (en)
CN (1) CN101165685A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080098028A1 (en) * 2006-10-19 2008-04-24 International Business Machines Corporation Method and apparatus for generating a dynamic web page
US7770122B1 (en) 2010-04-29 2010-08-03 Cheman Shaik Codeless dynamic websites including general facilities
US20110161991A1 (en) * 2009-12-31 2011-06-30 Cbs Interactive, Inc. Controller and method to build a combined web page using data retrieved from multiple apis
WO2011156112A3 (en) * 2010-06-08 2012-02-23 Microsoft Corporation Web site implementation by mapping expression evaluation
CN107391169A (en) * 2017-06-09 2017-11-24 口碑控股有限公司 The dynamic updating method and device of the Android page
CN107506193A (en) * 2017-08-18 2017-12-22 平安科技(深圳)有限公司 A kind of development approach of subsystem page, storage medium and server
CN108874381A (en) * 2017-05-09 2018-11-23 武汉斗鱼网络科技有限公司 A kind of method, apparatus and electronic equipment exporting page view controller
CN109165016A (en) * 2018-08-29 2019-01-08 郑州悉知信息科技股份有限公司 Webpage construction method and device

Families Citing this family (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
USRE47735E1 (en) 2001-04-20 2019-11-19 Progme Corporation Audio/video program-related hyperlink printer
KR20110068550A (en) * 2009-12-16 2011-06-22 삼성전자주식회사 Image forming apparatus and method for providing local user interface thereof
CN102193933A (en) * 2010-03-10 2011-09-21 北大方正集团有限公司 Method and system for webpage editing
CN102760127B (en) * 2011-04-26 2017-11-03 北京百度网讯科技有限公司 Method, device and the equipment of resource type are determined based on expanded text information
US10534830B2 (en) 2011-06-23 2020-01-14 Microsoft Technology Licensing, Llc Dynamically updating a running page
US10540416B2 (en) 2011-06-23 2020-01-21 Microsoft Technology Licensing, Llc Linking source code to running element
US9507871B2 (en) 2011-08-29 2016-11-29 The Boeing Company Methods and systems for a state-based web framework architecture
US9135364B1 (en) 2011-11-10 2015-09-15 Google Inc. Delivery of web pages with markup for speed
CN102521352A (en) * 2011-12-12 2012-06-27 中国建设银行股份有限公司 Method and device for generating page
CN102567057A (en) * 2011-12-26 2012-07-11 山东浪潮齐鲁软件产业股份有限公司 Fast classpath positioning method under tobacco industry cloud SPRING framework
CN102968307B (en) * 2012-11-29 2016-02-24 中国传媒大学 A kind of web based on java develops middleware
CN103870254B (en) * 2012-12-12 2018-10-09 腾讯科技(深圳)有限公司 A kind of implementation method of dynamic list, client and server
US20140281876A1 (en) * 2013-03-15 2014-09-18 Meteor Development Group, Inc. Document element mapping
CN103294788A (en) * 2013-05-20 2013-09-11 广州迅睿网络科技有限公司 Universal background processing method and system for websites
CN103605543B (en) * 2013-11-19 2017-06-06 北京国双科技有限公司 Checking attribute conversion method and device
CN105005568B (en) * 2014-04-22 2019-10-01 中国银联股份有限公司 Web page front end processing device and method based on template
EP3215952A4 (en) 2014-11-04 2018-05-16 Hewlett-Packard Enterprise Development LP Web services generation based on client-side code
CN104933589B (en) * 2015-07-07 2018-07-03 北京齐尔布莱特科技有限公司 A kind of order generating system and method
US9794280B2 (en) * 2015-08-31 2017-10-17 Linkedin Corporation Verifying templates for dynamically generated web pages
US11677809B2 (en) * 2015-10-15 2023-06-13 Usablenet Inc. Methods for transforming a server side template into a client side template and devices thereof
CN106936727A (en) * 2015-12-30 2017-07-07 中国移动通信集团云南有限公司 A kind of Webpage display process and device
CN105893627A (en) * 2016-05-16 2016-08-24 天津慧涛科技股份有限公司 Smart website information arrangement management system
CN105955759A (en) * 2016-05-26 2016-09-21 浪潮(苏州)金融技术服务有限公司 Template engine realization method used for Web development
CN107798023A (en) * 2016-09-07 2018-03-13 广州市动景计算机科技有限公司 Web page resources loading method and web page resources loading device
CN108664535B (en) * 2017-04-01 2022-08-12 北京京东尚科信息技术有限公司 Information output method and device
CN107515771A (en) * 2017-09-07 2017-12-26 蓝海天网科技有限公司 API document structure tree method and system based on SpringMVC
CN107798119A (en) * 2017-11-09 2018-03-13 北京易信掌中云科技有限公司 A kind of enterprise's official website management method and system based on cloud computing
US10783316B2 (en) 2018-02-26 2020-09-22 Servicenow, Inc. Bundled scripts for web content delivery
US10824791B2 (en) * 2018-02-26 2020-11-03 Servicenow, Inc. System for building and modeling web pages
US11385867B1 (en) 2019-05-03 2022-07-12 Progress Software Corporation Bi-directional design-to-code
CN110347403A (en) * 2019-06-28 2019-10-18 北京你财富计算机科技有限公司 A kind of program switch control method, device, electronic equipment
CN111273964B (en) * 2020-02-14 2024-03-08 抖音视界有限公司 Data loading method and device
US11570182B1 (en) * 2020-03-30 2023-01-31 Amazon Technologies, Inc. Compute-less authorization
US11562043B1 (en) * 2021-10-29 2023-01-24 Shopify Inc. System and method for rendering webpage code to dynamically disable an element of template code

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5835712A (en) * 1996-05-03 1998-11-10 Webmate Technologies, Inc. Client-server system using embedded hypertext tags for application and database development
US20030226110A1 (en) * 2002-05-29 2003-12-04 Christian Scheering Method for dynamically generating structured documents
US20040015476A1 (en) * 2000-09-01 2004-01-22 Twaddle Graham Kennedy Method and system for dynamic web-page generation, and computer-readable storage
US6714928B1 (en) * 1999-03-19 2004-03-30 Sybase, Inc. Development system providing HTML database control object
US20040225633A1 (en) * 2003-05-08 2004-11-11 Taiwan Semiconductor Manufacturing Co. Using pure HTML to access database without refreshing page
US7111231B1 (en) * 1999-02-24 2006-09-19 Intellisync Corporation System and methodology for dynamic application environment employing runtime execution templates
US7117436B1 (en) * 2000-08-31 2006-10-03 Oracle Corporation Generating a Web page by replacing identifiers in a preconstructed Web page
US20080098028A1 (en) * 2006-10-19 2008-04-24 International Business Machines Corporation Method and apparatus for generating a dynamic web page

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001125855A (en) 1999-10-26 2001-05-11 Twin Communication Inc Dynamic web page generation program

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5835712A (en) * 1996-05-03 1998-11-10 Webmate Technologies, Inc. Client-server system using embedded hypertext tags for application and database development
US7111231B1 (en) * 1999-02-24 2006-09-19 Intellisync Corporation System and methodology for dynamic application environment employing runtime execution templates
US6714928B1 (en) * 1999-03-19 2004-03-30 Sybase, Inc. Development system providing HTML database control object
US7117436B1 (en) * 2000-08-31 2006-10-03 Oracle Corporation Generating a Web page by replacing identifiers in a preconstructed Web page
US20040015476A1 (en) * 2000-09-01 2004-01-22 Twaddle Graham Kennedy Method and system for dynamic web-page generation, and computer-readable storage
US20030226110A1 (en) * 2002-05-29 2003-12-04 Christian Scheering Method for dynamically generating structured documents
US20040225633A1 (en) * 2003-05-08 2004-11-11 Taiwan Semiconductor Manufacturing Co. Using pure HTML to access database without refreshing page
US20080098028A1 (en) * 2006-10-19 2008-04-24 International Business Machines Corporation Method and apparatus for generating a dynamic web page

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080098028A1 (en) * 2006-10-19 2008-04-24 International Business Machines Corporation Method and apparatus for generating a dynamic web page
US8126901B2 (en) 2006-10-19 2012-02-28 International Business Machines Corporation Method and apparatus for generating a dynamic web page
US20140344836A1 (en) * 2009-12-31 2014-11-20 Cbs Interactive Inc. Controller and method to build a combined web page using data retrieved from multiple apis
US20110161991A1 (en) * 2009-12-31 2011-06-30 Cbs Interactive, Inc. Controller and method to build a combined web page using data retrieved from multiple apis
US9075890B2 (en) * 2009-12-31 2015-07-07 Cbs Interactive Inc. Controller and method to build a combined web page using data retrieved from multiple APIs
US8745639B2 (en) * 2009-12-31 2014-06-03 Cbs Interactive Inc. Controller and method to build a combined web page using data retrieved from multiple APIS
US7770122B1 (en) 2010-04-29 2010-08-03 Cheman Shaik Codeless dynamic websites including general facilities
WO2011156112A3 (en) * 2010-06-08 2012-02-23 Microsoft Corporation Web site implementation by mapping expression evaluation
US8645490B2 (en) 2010-06-08 2014-02-04 Microsoft Corporation Web site implementation by mapping expression evaluation
CN108874381A (en) * 2017-05-09 2018-11-23 武汉斗鱼网络科技有限公司 A kind of method, apparatus and electronic equipment exporting page view controller
CN107391169A (en) * 2017-06-09 2017-11-24 口碑控股有限公司 The dynamic updating method and device of the Android page
CN107506193A (en) * 2017-08-18 2017-12-22 平安科技(深圳)有限公司 A kind of development approach of subsystem page, storage medium and server
WO2019033520A1 (en) * 2017-08-18 2019-02-21 平安科技(深圳)有限公司 Subsystem page development method, storage medium and server
CN109165016A (en) * 2018-08-29 2019-01-08 郑州悉知信息科技股份有限公司 Webpage construction method and device

Also Published As

Publication number Publication date
CN101165685A (en) 2008-04-23
US8126901B2 (en) 2012-02-28
US20080098028A1 (en) 2008-04-24

Similar Documents

Publication Publication Date Title
US8126901B2 (en) Method and apparatus for generating a dynamic web page
Nentwich et al. Flexible consistency checking
KR100661393B1 (en) Web site management system and method applying web programming environment
Ceri et al. Morgan Kaufmann series in data management systems: Designing data-intensive Web applications
US8402427B2 (en) Web application generator
RU2287181C2 (en) System and method for mutual transformation of program objects and documents based on elements of structured language
Williams et al. Web Database Applications with PHP and MySQL: Building Effective Database-Driven Web Sites
US8024703B2 (en) Building an open model driven architecture pattern based on exemplars
US6990653B1 (en) Server-side code generation from a dynamic web page content file
US6675354B1 (en) Case-insensitive custom tag recognition and handling
Syme et al. Expert F♯
KR100692172B1 (en) Universal string analyzer and method thereof
Fu et al. Model checking XML manipulating software
GB2359157A (en) Extensible Markup Language (XML) server pages having custom Document Object Model (DOM) tags
US20070113221A1 (en) XML compiler that generates an application specific XML parser at runtime and consumes multiple schemas
US20110239200A1 (en) Method for compiling a computer program
US20150261507A1 (en) Validating sql queries in a report
Syme et al. Expert F♯ 2.0
McArthur Pro PHP: Patterns, Frameworks, Testing and More
US11550556B1 (en) Efficient semantic analysis of program code
Thangarathinam PROFESSIONAL ASP. NET 2.0 XML
Microservices et al. Spring REST
Staron et al. Implementing UML model transformations for MDA
Hertel Aspects of AJAX
Tribolet Development of CMS-based Web Applications with a Multi-Language Model-Driven Approach

Legal Events

Date Code Title Description
STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION