In world wide web client applications, the markup language for each document is typically sent down the client with each new request. Each document may share similar markup for common user interface elements. For example, the markup for a button or a table may be similar among a collection of similar markup language pages.
The following presents a simplified summary of the disclosure in order to provide a basic understanding to the reader. This summary is not an extensive overview of the disclosure and it does not identify key/critical elements of the invention or delineate the scope of the invention. Its sole purpose is to present some concepts disclosed herein in a simplified form as a prelude to the more detailed description that is presented later.
The present example provides a system and methods for embedded markup language resources in design templates, source code files, and the like. The markup language resources include portions of markup language code that may be copied or cloned into markup language object model fragments before being inserted into the markup language document object model. A client rendering the markup language document may call a lookup function to return the markup language fragment.
Many of the attendant features will be more readily appreciated as the same becomes better understood by reference to the following detailed description considered in connection with the accompanying drawings.
The present description will be better understood from the following detailed description read in light of the accompanying drawings, wherein:
Like reference numerals are used to designate like parts in the accompanying drawings.
The detailed description provided below in connection with the appended drawings is intended as a description of the present examples and is not intended to represent the only forms in which the present example may be constructed or utilized. The description sets forth the functions of the example and the sequence of steps for constructing and operating the example. However, the same or equivalent functions and sequences may be accomplished by different examples.
Although the present examples are described and illustrated herein as being implemented in an embedded markup language resource system, the system described is provided as an example and not a limitation. As those skilled in the art will appreciate, the present examples are suitable for application in a variety of different types of embedded markup language resource systems.
Although not required, embodiments of the invention will be described in the general context of “computer readable instructions” being executed by one or more computing devices. Computer readable instructions may be distributed via computer readable media (discussed below). Computer readable instructions may be implemented as program modules, such as functions, objects, Application Programming Interfaces (APIs), data structures, and the like, that perform particular tasks or implement particular abstract data types. Typically, the functionality of the computer readable instructions may be combined or distributed as desired in various environments.
In other embodiments, device 100 may include additional features and/or functionality. For example, device 100 may also include additional storage (e.g., removable and/or non-removable) including, but not limited to, magnetic storage, optical storage, and the like. Such additional storage is illustrated in
The term “computer readable media” as used herein includes computer storage media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions or other data. Memory 104 and storage 108 are examples of computer storage media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by device 100. Any such computer storage media may be part of device 100.
Device 100 may also include communication connection(s) 112 that allow device 100 to communicate with other devices. Communication connection(s) 112 may include, but is not limited to, a modem, a Network Interface Card (NIC), or other interfaces for connecting computing device 100 to other computing devices. Communication connection(s) 112 may include a wired connection or a wireless connection. Communication connection(s) 112 may transmit and/or receive communication media.
Communication media typically embodies computer readable instructions or other data in a “modulated data signal” such as a carrier wave or other transport mechanism and includes any information delivery media. The term “computer readable media” may include communication media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, radio frequency, infrared, and other wireless media.
Device 100 may include input device(s) 114 such as keyboard, mouse, pen, voice input device, touch input device, infra-red cameras, video input devices, and/or any other input device. Output device(s) 116 such as one or more displays, speakers, printers, and/or any other output device may also be included in device 100. Input device(s) 114 and output device(s) 116 may be connected to device 100 via a wired connection, wireless connection, or any combination thereof. In one embodiment, an input device or an output device from another computing device may be used as input device(s) 114 or output device(s) 116 for computing device 100.
Components of computing device 100 may be connected by various interconnects, such as a bus. Such interconnects may include a Peripheral Component Interconnect (PCI), such as PCI Express, a Universal Serial Bus (USB), firewire (IEEE 1394), an optical bus structure, and the like. In another embodiment, components of computing device 100 may be interconnected by a network. For example, memory 104 may be comprised of multiple physical memory units located in different physical locations interconnected by a network.
Those skilled in the art will realize that storage devices utilized to store computer readable instructions may be distributed across a network. For example, a computing device 130 accessible via network 120 may store computer readable instructions to implement one or more embodiments of the invention. Computing device 100 may access computing device 130 and download a part or all of the computer readable instructions for execution. Alternatively, computing device 100 may download pieces of the computer readable instructions, as needed, or some instructions may be executed at computing device 100 and some at computing device 130. Those skilled in the art will also realize that all or a portion of the computer readable instructions may be carried out by a dedicated circuit, such as a Digital Signal Processor (DSP), programmable logic array, and the like.
The client 204 includes a world wide web document rendering component 214, a markup language document 216, and the design template 210. The markup language document 216 includes the markup insertion method 208. The client 204 is communicatively coupled to the server 202 by a network 120 (from
The server side page creation and world wide web server component 206 functions to receives requests for markup language documents, dynamically generate markup language documents such as hypertext markup language (HTML) documents, and send the generated markup language documents. For example, the server side page creation and world wide web server component 206 may be comprised of Microsoft® Internet Information Server (IIS) and Active Server Pages (ASP) and/or Active Server Pages for the .Net Runtime (ASP.NET).
The server side page creation and world wide web server component 206 stores the markup insertion method 208 and the design template 210. The server side page creation and world wide web server component 206 may include the markup insertion method 208 in a dynamically generated markup language document if the source markup language document includes a reference to the markup insertion method 208. The design template 210 includes one or more markup language resources indexed by unique identifier. Such markup language resources are reusable portions of markup language code that may be downloaded to the client 204 and located by the markup insertion method 208 during rendering of the markup language document 216. The server side page creation and world wide web server component 206 may send the design template 210 to the client 204.
On the client 204, the world wide web document rendering component 214 parses and renders the markup language document 216 for display on a display device attached to the client 204. For example, the world wide web document rendering component 214 may execute on the computing device 100 (from
The world wide web document rendering component 214 may produce a document object model (DOM) corresponding to the markup language document 216. The document object model is a hierarchical representation of the markup language elements included in the markup language document 216. The world wide web document rendering component 214 may traverse such a document object model adding, deleting, modifying elements or nodes within the document object model. For example, a document object model fragment may be created and inserted into the document object model.
When the markup language document 216 is rendered by the world wide web document rendering component 214, the world wide web document rendering component 214 may encounter and execute the markup insertion method 208. The markup insertion method 208 may be a function written in any computer programming language, for example, a runtime scripting language such as Javascript, VBScript, or the like.
The markup insertion method 208 may request a markup language resource from the design template 210. Once the markup language resource has been retrieved, the markup insertion method 208 may create a document object model (DOM) node or fragment including markup language code included in the markup language resource. The markup insertion method 208 may then insert the document object model node or fragment into the document object model corresponding to the markup language document 216.
Turning now to
The resource identifier is a valid ID name for a markup element, for example, any token, number, letters, combination of letter and numbers, and the like. The markup language code string 306 includes a string of markup language code. The markup language code may be any markup language such as hypertext markup language (HTML), extensible markup language (XHTML), extensible markup language (XML), and the like.
The markup language code 306 may include markup language code to render a user interface element on a world wide web browser or the like. For example, the markup language code 306 may include HTML to render a table, a button, or the like. The markup language code 306 may further include identifiers and links to data sources such that the user interface controls are “databound” to a data source. The user interface elements may then reflect the data stored in the data source when rendered.
For example,
The HTML <table> includes a number of child elements, for example an HTML table row “<tr>” element, which further includes a number of HTML table cell “<td>” elements. The first HTML table cell “<td>” element includes an HTML division “<div>” element that further includes an HTML “id” attribute. Such an identifier attribute may refer to another markup language fragment located in a design template. Similarly, the second HTML table cell “<td>” element includes an HTML “id” attribute that may refer to another markup language fragment location in a design template.
Turning now to
Block 504 refers to a determination whether or not the markup language code associated with the markup language resource requested at block 502 is loaded in memory. In response to a negative determination, flow continues on to block 506. In response to a positive determination, flow continues on to block 510.
Block 506 refers to an operation in which a new markup language document fragment is created. Flow continues on to block 508, where the markup language code associated with the markup language resource requested at block 502 is inserted into the document fragment created at block 506.
Block 510 refers to an operation to locate the markup language document fragment associated with the identifier received at block 502. Once the markup language document fragment associated with the identifier received at block 502 has been located, flow continues to block 512.
Block 512 refers to an operation in which the markup language document fragment located at block 510 is “cloned” or copied. Block 514 refers to an operation in which the cloned markup language document fragment is inserted into the appropriate location in the original markup language document.