Client-side generation of preliminary version of network page

Disclosed are various embodiments that facilitate client-side network page generation. A request for a network page is obtained from a client computing device in one or more computing devices. Network page generation code for generating the network page is sent to the client computing device in response to the request and in place of the network page. The network page generation code is executable within a local application that is executed in the client computing device. The network page generation code includes code that obtains multiple data elements from the one or more computing devices. The network page generation code also includes code that generates a network page. The data elements are included within the network page.

BACKGROUND

Although network pages, such as web pages, may be maintained as static files in a data store, network pages are now almost exclusively generated dynamically. Data from potentially many sources are aggregated together by an application that generates network pages. Dynamic network page generation may allow for greater flexibility for the developers of a network site and may deliver a customized experience for end users. However, hardware requirements for network page servers have increased commensurately with the increased processing demands associated with dynamically generated network pages.

DETAILED DESCRIPTION

The present disclosure relates to facilitating the generation of network pages on the client side. Dynamically generated network pages have become increasingly complex, thereby placing significant resource demands on network page servers. Often, a network page generation application that executes on a server must gather data elements from a variety of sources and concatenate those data elements together with hypertext markup language (HTML) and/or other data to generate the network page. Although server-side caching may be employed, often the network page is regenerated for each request. Various embodiments of the present disclosure provide a more scalable architecture by off-loading network page generation functions to clients. In many instances, client devices may have substantial available resources to perform such processing as network page generation. Along with reducing load on servers, client-side network page generation may also result in reduced network bandwidth consumption. In the following discussion, a general description of the system and its components is provided, followed by a discussion of the operation of the same.

With reference toFIG. 1, shown is a networked environment100according to various embodiments. The networked environment100includes one or more computing devices103in data communication with one or more clients106by way of a network109. The network109includes, for example, the Internet, intranets, extranets, wide area networks (WANs), local area networks (LANs), wired networks, wireless networks, or other suitable networks, etc., or any combination of two or more such networks.

The computing device103may comprise, for example, a server computer or any other system providing computing capability. Alternatively, a plurality of computing devices103may be employed that are arranged, for example, in one or more server banks or computer banks or other arrangements. For example, a plurality of computing devices103together may comprise a cloud computing resource, a grid computing resource, and/or any other distributed computing arrangement. Such computing devices103may be located in a single installation or may be distributed among many different geographical locations. For purposes of convenience, the computing device103is referred to herein in the singular. Even though the computing device103is referred to in the singular, it is understood that a plurality of computing devices103may be employed in the various arrangements as described above.

Various applications and/or other functionality may be executed in the computing device103according to various embodiments. Also, various data is stored in a data store112that is accessible to the computing device103. The data store112may be representative of a plurality of data stores112as can be appreciated. The data stored in the data store112, for example, is associated with the operation of the various applications and/or functional entities described below.

The components executed on the computing device103, for example, include a network data server application115, a network page generation application118, and other applications, services, processes, systems, engines, or functionality not discussed in detail herein. The network data server application115is executed to receive requests for data from a client106and to respond by returning the requested data from the data store112. The requested data is sent to the client106as network data121over the network109. In various embodiments, the network data server application115may comprise a commercially available hypertext transfer protocol (HTTP) server application such as, for example, Apache® HTTP Server, Apache® Tomcat®, Microsoft® Internet Information Services (IIS), and others.

The network page generation application118is executed to generate network pages, such as web pages, that are not configured to be generated in a client106. Such network pages may correspond to those that are, for example, compatible with caching, updated relatively infrequently, not customer dependent, or otherwise benefit less from client-side generation. The network data server application115, which may include caching functionality for such network pages, may be configured to send the network pages that have been generated by the network page generation application118to the client106.

The data stored in the data store112includes, for example, network page data124, network page generation code127, data processing code130, and potentially other data. The network page data124may include static network pages, data used in generating dynamic network pages, templates, graphics, images, audio, video, multimedia, animations, and/or other data related to network pages. The network page generation code127includes code that is configured to generate network pages in a client106. To this end, the network page generation code127may include JavaScript, VBScript, ActiveX controls, Java, and/or other code that may be executed in a client106.

The network pages that are generated may include, for example, extensible markup language, HTML, and/or other markup. The network page generation code127may be configured to generate network pages that include HTML5 and/or other versions. Such network pages may include HTML5 features such as video, local storage, web workers, offline web applications, geolocation, HTML5 input types, placeholder text, form autofocus, microdata, and/or other features.

The data processing code130includes code that processes data for inclusion in a network page by the network page generation code127. In addition, the data processing code130may be configured to transform data supplied by a user for transmission to the network data server application115. The data processing code130may facilitate encryption and/or decryption of data, encoding of data, image manipulation and generation, and/or any other processing or transformation that may be applied to data related to network pages. The data processing code130may further include business logic, business rules, workflows, and/or other code that handles data exchange between the data store112and a user interface.

The client106is representative of a plurality of client devices that may be coupled to the network109. The client106may comprise, for example, a processor-based system such as a computer system. Such a computer system may be embodied in the form of a desktop computer, a laptop computer, a personal digital assistant, a cellular telephone, smart phones, set-top boxes, music players, web pads, tablet computer systems, game consoles, electronic book readers, or other devices with like capability. The client106may include a display133. The display133may comprise, for example, one or more devices such as cathode ray tubes (CRTs), liquid crystal display (LCD) screens, gas plasma-based flat panel displays, LCD projectors or other types of display devices, etc.

The client106may be configured to execute various applications such as a browser136and/or other applications. The browser136may be executed in a client106, for example, to access and render network pages, such as web pages, or other network content served up by the computing device103and/or other servers. The browser136may be further configured to obtain the network page generation code139and data processing code142from the network data server application115executed on the computing devices103. The browser136may further be configured to execute the network page generation code139and/or the data processing code142to generate rendered network pages145to be shown on the display133. The client106may be configured to execute applications beyond the browser136such as, for example, email applications, instant message applications, and/or other applications.

Next, a general description of the operation of the various components of the networked environment100is provided. To begin, a user at a client106enters a uniform resource locator (URL) into a browser136. Alternatively, the user may select a link within a rendered network page145. Accordingly, a request for a network page may be sent over the network109to the network data server application115.

The network data server application115determines whether the request can be satisfied from a static network page stored in the network page data124in the data store112. If the request may be satisfied by returning a static network page, the static network page is returned as the network data121by the network data server application115. Additionally, the network data server application115determines whether the request may be satisfied by a network page generated on the computing device103. As non-limiting examples, the network page generation application118may be configured to generate network pages that, for example, are rather simple, do not involve high resource demands on the computing device103, etc. If the network page generation application118is configured to generate the network page, the network data server application115obtains the generated network page from the network page generation application118and returns the network page as the network data121over the network109to the client106.

Where the requested network page is a dynamic network page and generating the dynamic network page is resource intensive for the computing device103, the network data server application115may be configured to return network page generation code127in place of a network page. The network page generation code127may then be executed in the browser136in the client106as the network page generation code139. The network page generation code139may be configured to obtain one or more data elements from the network data server application115in order to generate the rendered network page145.

Such data elements may include, for example, text strings, graphics, images, audio, video, multimedia, and/or any other data element that may be used in forming a rendered network page145. The network page generation code139obtains the data elements as network data121over the network109. To this end, the network data121may include the data elements encoded in a serialization format. Non-limiting examples of serialization formats may include, for example, extensible markup language (XML), JavaScript object notation (JSON), yet another markup language (YAML), and/or other serialization formats.

Upon receiving the network data121, including the data elements for use in generating the rendered network page145, the network page generation code139proceeds to generate the rendered network page145by processing the data elements. Such processing may involve concatenating HTML and/or other markup code with the data elements. In some cases, data processing code142may be invoked to further process one or more of the data elements before they are used in generating the rendered network page145. As a non-limiting example, a data element may be encrypted for transmission over the network109. Accordingly, the data processing code142may be invoked to decrypt the data element to place it in an appropriate format for inclusion within the rendered network page145. As a non-limiting example, multiple data elements may be used as inputs to the data processing code142, which may, in some cases, output a different number of data elements.

As a non-limiting example, the data processing code142may correspond to code for performing any resource intensive processing on data elements for use in generating rendered network pages145. However, it may be desirable not to send certain data processing code142to a client106. For example, certain data processing code142may correspond to proprietary code, secured code, and/or any other code that the operator of the computing device103may not wish to release to the public. In such an example, the network page generation application118on the computing device103may be employed to perform the required transformations and/or processing of data elements.

In various embodiments, the client106may correspond to a mobile computing device. Such a device may include, for example, a smart phone, a personal digital assistant, an electronic book reader, or any other type of mobile computing device. Client-side network page generation may offer several advantages for mobile computing devices. For example, connectivity to the network109may be more likely to be interrupted on a mobile computing device than for clients106that are associated with fixed locations and/or wired network109connections. Thus, it may be advantageous for the network page generation code139on a client106that corresponds to a mobile computing device to be capable of generating preliminary versions of rendered network pages145while waiting for the data elements that are required to generate the rendered network pages145.

For example, after the network page generation code139is obtained, the connectivity between the client106and the computing device103may be interrupted. Consequently, it may be the case that not all of the required data elements have been obtained for generating the rendered network page145. In such a case, the network page generation code139may generate a preliminary version of the rendered network page145. The network page generation code139may employ HTML5 features such as, for example, offline web applications and/or other features to handle interrupted connectivity. After connectivity through the network109is restored, the network page generation code139may be configured to update the rendered network page145to another intermediate version or to the final version.

In addition, the network page generation code139may be configured to generate the rendered network page145in a special format for characteristics of the client106. For example, when the client106corresponds to a mobile computing device, the display133may have a smaller size than a display133typically associated with a client106maintained in a fixed location. Further, the input devices associated with such a client106may be limited relative to other types of clients106. As a non-limiting example, the client106may have a touch screen as a display133but not a standard keyboard or mouse. The network page generation code139may be configured to format the rendered network page145considering some or all of these characteristics.

Various embodiments of the network page generation code139may be cached in the browser136. For example, the network page generation code139may comprise a browser136plug-in that is permanently or temporarily installed in the browser136. Accordingly, the network page generation code139may be used to regenerate the same rendered network page145or to generate multiple different rendered network pages145depending upon data elements that are obtained from the network data server application115. As a non-limiting example, one instance of network page generation code139may correspond to all of the network page generation code139necessary to generate rendered network pages145for a network site.

Referring next toFIG. 2, shown is a flowchart that provides one example of the operation of a portion of the network data server application115according to various embodiments. It is understood that the flowchart ofFIG. 2provides merely an example of the many different types of functional arrangements that may be employed to implement the operation of the portion of the network data server application115as described herein. As an alternative, the flowchart ofFIG. 2may be viewed as depicting an example method implemented in the computing device103(FIG. 1) according to one or more embodiments.

Beginning with box203, the network data server application115obtains a request for a network page from a client106(FIG. 1). In box206, the network data server application115determines whether the requested network page is to be generated on the server, i.e., the computing device103. If the network page is to be generated on the computing device103, the network data server application115moves to box209and generates the network page and sends the generated network page to the client106.

In one non-limiting example, the network data server application115may obtain a generated network page from the network page generation application118(FIG. 1). In another non-limiting example, the network data server application115may simply read a static network page from the data store112(FIG. 1). In any event, the network page is sent to the client106for rendering. Thereafter, the portion of the network data server application115ends.

If the network data server application115instead determines in box206that the network page that is requested is not to be generated on the computing device103, the network data server application115proceeds to box212and sends applicable network page generation code127(FIG. 1) to the client106. Where the network page generation code127is currently cached in the client106as network page generation code139(FIG. 1), the network data server application115may be configured not to resend the network page generation code127. In various embodiments, the network data server application115may also be configured to send data processing code142(FIG. 1) to the client106such as cryptographic code, business logic, etc.

Subsequently, in box215, the network data server application115obtains a request for network page data124(FIG. 1) corresponding to one or more data elements to be used in generating a rendered network page145(FIG. 1). The request is obtained from the client106which is executing the network page generation code139. Next, in box218, the network data server application115sends the applicable network page data124to the client106as network data121(FIG. 1). Thereafter, the portion of the network data server application115ends.

Moving on toFIG. 3, shown is a flowchart that provides one example of the operation of a portion of the browser136in implementing an executable portion of a network page according to various embodiments. It is understood that the flowchart ofFIG. 3provides merely an example of the many different types of functional arrangements that may be employed to implement the operation of the portion of the browser136as described herein. As an alternative, the flowchart ofFIG. 3may be viewed as depicting an example method implemented in the computing device103(FIG. 1) according to one or more embodiments.

Beginning with box303, the browser136sends a request for a network page to the network data server application115(FIG. 1) executed in the computing device103. In box306, the browser136determines whether a network page has been obtained in the network data121(FIG. 1) from the computing device103in response to the request. If the browser136determines in box306that a network page has been obtained, the browser136renders the network page for display in box309as a rendered network page145(FIG. 1). Thereafter, the portion of the browser136ends.

If, instead, in box306, the browser136determines that a network page has not been obtained in the network data121, the browser136proceeds to box312. In box312, the browser136determines whether the network page generation code139(FIG. 1) associated with the requested network page has been cached in the browser136. If the browser136determines in box312that the network page generation code139has been cached, the browser136transitions to box315and loads the network page generation code139for generating network pages from the cache. Thereafter, the browser136proceeds to box318. If, instead, the browser136determines in box312that the network page generation code139is not cached in the client106, the browser136moves to box321and obtains the network page generation code139for generating the network pages from the network data server application115. The browser136may also obtain data processing code142(FIG. 1) along with the network page generation code139in some embodiments.

Next, the browser136proceeds to box318. In box318, the browser136begins executing the network page generation code139. In box322, the browser136attempts to obtain the network page data124(FIG. 1) from the network data server application115executed in the computing device103. In box324, the browser136determines whether the network109(FIG. 1) is down or whether the connection through the network109has been interrupted in any way while attempting to obtain the network page data124. If the browser136determines in box324that the network109is down, the browser136proceeds to box327and generates a preliminary version of the network page using the network page generation code139. In box330, the browser136renders the network page for display as the rendered network page145. Subsequently, the browser136returns to box322and again attempts to obtain the rest of the network page data124from the network data server application115.

If, in box324, the browser136determines that the network109has not gone down and the network page data124has been obtained, the browser136transitions to box333and generates the network page from the obtained network page data124using the network page generation code139. The browser136may also execute the data processing code142to execute cryptographic functions, business logic, business rules, workflows, etc. In box336, the browser136renders the network page for display as the rendered network page145. Thereafter, the portion of the browser136ends.

With reference toFIG. 4, shown is a schematic block diagram of the computing device103according to an embodiment of the present disclosure. The computing device103includes at least one processor circuit, for example, having a processor403and a memory406, both of which are coupled to a local interface409. To this end, the computing device103may comprise, for example, at least one server computer or like device. The local interface409may comprise, for example, a data bus with an accompanying address/control bus or other bus structure as can be appreciated.

Stored in the memory406are both data and several components that are executable by the processor403. In particular, stored in the memory406and executable by the processor403are the network data server application115, the network page generation application118, and potentially other applications. Also stored in the memory406may be a data store112and other data. In addition, an operating system may be stored in the memory406and executable by the processor403.

Referring next toFIG. 5, shown is a schematic block diagram of the client106according to an embodiment of the present disclosure. The client106includes at least one processor circuit, for example, having a processor503and a memory506, and a display133, which are all coupled to a local interface509. The local interface509may comprise, for example, a data bus with an accompanying address/control bus or other bus structure as can be appreciated. The client106may also include various peripheral devices coupled to the local interface509. In particular, peripheral devices may include input devices, for example, a keyboard, keypad, touch pad, touch screen, microphone, scanner, mouse, joystick, or one or more push buttons, etc. The peripheral devices may also include indicator lights, speakers, printers, etc.

Stored in the memory506are both data and several components that are executable by the processor503. In particular, stored in the memory506and executable by the processor503are the browser136, the network page generation code139, the data processing code142, and potentially other applications. In addition, an operating system may be stored in the memory406and executable by the processor403.

Referring now to bothFIGS. 4 and 5, it is understood that there may be other applications that are stored in the memories406,506and are executable by the processors403,503as can be appreciated. Where any component discussed herein is implemented in the form of software, any one of a number of programming languages may be employed such as, for example, C, C++, C#, Objective C, Java, JavaScript, Perl, PHP, Visual Basic, Python, Ruby, Delphi, Flash, or other programming languages.

A number of software components are stored in the memories406,506and are executable by the respective processors403,503. In this respect, the term “executable” means a program file that is in a form that can ultimately be run by the processors403,503. Examples of executable programs may be, for example, a compiled program that can be translated into machine code in a format that can be loaded into a random access portion of the memories406,506and run by the respective processors403,503, source code that may be expressed in proper format such as object code that is capable of being loaded into a random access portion of the memories406,506and executed by the respective processors403,503, or source code that may be interpreted by another executable program to generate instructions in a random access portion of the memories406,506to be executed by the respective processors403,503, etc. An executable program may be stored in any portion or component of the memories406,506including, for example, random access memory (RAM), read-only memory (ROM), hard drive, solid-state drive, USB flash drive, memory card, optical disc such as compact disc (CD) or digital versatile disc (DVD), floppy disk, magnetic tape, or other memory components.

Also, each processor403,503may represent multiple processors403,503and each memory406,506may represent multiple memories406,506that operate in parallel processing circuits, respectively. In such a case, the respective local interface409,509may be an appropriate network109(FIG. 1) that facilitates communication between any two of the multiple processors403,503, between any processor403,503and any of the respective memories406,506, or between any two of the respective memories406,506, etc. The local interfaces409,509may comprise additional systems designed to coordinate this communication, including, for example, performing load balancing. The processors403,503may be of electrical or of some other available construction.

The flowcharts ofFIGS. 2 and 3show the functionality and operation of an implementation of portions of the network data server application115and the browser136. If embodied in software, each block may represent a module, segment, or portion of code that comprises program instructions to implement the specified logical function(s). The program instructions may be embodied in the form of source code that comprises human-readable statements written in a programming language or machine code that comprises numerical instructions recognizable by a suitable execution system such as a processor403,503in a computer system or other system. The machine code may be converted from the source code, etc. If embodied in hardware, each block may represent a circuit or a number of interconnected circuits to implement the specified logical function(s).