Historically, markup was used to refer to the process of marking manuscript copy for typesetting with directions for formatting such as use of type fonts and sizes, spacing, indentation, etc. In today's digital age, markup refers to electronic markup, i.e., the internal and sometimes invisible codes in an electronic document that describe the formatting of the document. Generally, a user can view the markup of an electronic document by looking at the source code of the document with the browser displaying the electronic document. The electronic markup of a document generally provides encoding of text as well as details about the structure, appearance and presentation of the text and content in the document.
The markup of an electronic document usually is programmed using a markup language. A markup language provides syntax and procedures for embedding in a document tags that control the formatting of the text when the document is viewed by a special application such as a Web browser. Commonly used electronic markup languages include HTML, XML, and ASP.NET. Traditionally, markup languages are used to design the content and appearance of a static document.
However, for an interactive application such as a Web application, the content and/or presentation of a document such as a Web page may change, for example, based on user input. The markup of the document thus needs to be accompanied by information governing the behavior of the document. Traditionally, document behavior has been implemented procedurally in a script. To provide dynamic document behavior, a markup of the document may call on methods in the script at the appropriate time. The intermingling of markup and calls to script methods thus makes it difficult to independently design the markup for a document. Meanwhile, because a script language traditionally has been procedural and imperative, a user of a document usually cannot use the script language to design a specific behavior for the document.
While specific disadvantages of existing systems have been illustrated and described in this Background Section, those skilled in the art and others will recognize that the subject matter claimed herein is not limited to any specific implementation for solving any or all of the described disadvantages.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This summary is not intended to identify key features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
Aspects of the invention make available a script markup language that provides a declarative mechanism for defining script-based interactive behavior and application logic associated with a document. Aspects of the invention also enable the interactive behavior and application logic associated with a document to be defined as an independent layer of the document (“script markup”), separated from markup concerning the content and presentation of the document (“general markup”).
One aspect of the invention employs a script markup language to program script markup for a document to define the behavior of the document. The script markup may be included or referenced in a markup document containing markup information for displaying a document. The markup document may further include a general markup portion including one or more general markup elements defining the content and/or the appearance of the document to be displayed. The general markup portion and the script markup portion are separated from each other in the markup document, though the script markup portion may define behaviors of the general markup elements in the general markup portion.
In accordance with another aspect of the invention, the script markup portion includes one or more script markup elements. For example, the script markup elements may include a script element that contains a reference element and a components element. The reference element may include one or more references to script files used by the script markup portion. The components element may define one or more script objects for controlling the behavior of the document to be displayed.
In accordance with yet another aspect of the invention, a script object may contain one or more attributes such as a property attribute, a method attribute, an event attribute, or a reference to another element in the markup document. For example, a script object may reference a general markup element in the general markup portion so the script object can control the behavior of the general markup element. A script object may also reference another script object defined or referenced by the script markup portion. A script object may also contain one or more sub-script objects such as an event object, a binding object, and an action object. An event handler may be provided for an event object. The event handler may connect the script markup with developer-defined code.
In accordance with a further aspect of the invention, a script object may communicate with another script object. For example, a binding object associated with a script object may bind a property of the script object with the property of another script object. In addition, an action object associated with a script object may perform a specific action upon the occurrence of a specific event. The specific action may be to execute a method associated with another script object or to configure a property associated with another script object.
The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated as the same become better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein:
The following text illustrates and describes exemplary embodiments of the invention. However, those of ordinary skill in the art will appreciate that various changes can be made therein without departing from the spirit and scope of the invention.
In embodiments of the invention, upon receiving the markup document 108, the browser 106 parses and interprets the markup document 108 to display the requested document according to the definitions provided in the markup document 108.
In exemplary embodiments of the invention, the markup document 108 for a document such as a Web page provides general markup that defines the content and/or presentation of the document. The markup document 108 further includes or references script markup that defines the behavior of the document.
The general markup portion 202 defines the formatting of the content and/or the overall appearance of the document to be displayed. The general markup portion 202 may define one or more general markup elements. For example,
On the other hand, content of the script markup portion 204 defines interactive behavior and application logic associated with the document to be displayed. In embodiments of the invention, the content of the script markup portion 204 defines or references one or more script objects, and instantiates the script objects along with attributes defining the states, property values of the script objects. As shown in
In an exemplary embodiment of the invention, the script element 210 defines the overall scope of the script markup portion 204. All other elements in the script markup portion 204, such as the reference element 212 and the components element 214, are contained within the script element 210. Referring back to
In embodiments of the invention, the reference element 212 references script files external to the markup documents 108 that are used by markup elements in the markup documents 108. The external script files may detail dependency information that the markup elements may use. Preferably, the external script files may also provide implementation details of script markup elements defined or referenced in the script markup portion 204.
The components element 214 contains one or more script object definitions that actually define the behavior of the document to be displayed. In exemplary embodiments of the invention, one or more of the script objects defined in the components element 214 may reference and hence define behaviors of one or more of the general markup elements included in the general markup portion 202.
The exemplary markup document 108 shown in
Lines 3-34 illustrate an exemplary script markup portion 204 that specifies the behavior of the two counters defined in lines 1-2. Specifically, line 3 signals the beginning of a definition for an exemplary script element 210 and line 34 signals the end of the definition. The exemplary script element 210 includes an exemplary reference element 212 (lines 5-8) that links In two JavaScript markup language script files-AtlasUI.js and AtlasControls.js. Lines 9-32 illustrate an exemplary components element 214 that defines a plurality of script objects. For example, line 10 defines a script object Counter 302 that is identified as “counter1,” while line 11 defines a script object Counter 304 that is identified as “counter2” and has a value of “10000.” The code between lines 12-16 and lines 17-21 each defines a script object Timer (306, 316) that periodically, e.g., every 500 seconds, enables an event object Tick (308, 318). In embodiments of the invention, a script object may include one or more sub-script objects. For example, the script object Timer 306 includes an event object Tick 308, which further includes an action object invoke Method 310. For another example, the script object Label 312 defined in lines 22-26 includes a binding object 314.
In exemplary embodiment of the invention, a script object may be associated with one or more attributes whose values are used to define the behavior of the script object. An attribute can be, for example, a property, a method, or an event associated with the script object. An attribute may also be a reference to another markup element. For example, the script object Counter 304 defined in line 11 has a property attribute “id” and a property attribute “value”. The action object invoke Method 310 defined in line 14 has an method attribute “Method” that is set to an exemplary “increment” method. For example, instead of using an event object Tick 308, the script object Timer 306 may have an event attribute “Tick”. The script object Label 312 defined in line 22 has an attribute “targetElement” that references the general markup element Counter#1 identified as “counterLabel” in line 1.
In exemplary embodiments of the invention, a script object may reference a general markup element defined in the general markup portion 202 of the markup document 108 and define document behavior associated with the referenced general markup element. For example, the code between lines 22-26 defines a script object Label 312 that references the general markup element Counter#1 defined in line 1. The code between lines 27-31 defines a script object Label 320 that references the general markup element Counter#2 defined in line 2. Consequently, the script objects Label 312 and Label 320 may specify the behaviors of the general markup elements Counter#1 and Counter#2 in the general markup portion 202.
In embodiments of the invention, a script object may communicate with another script object by performing a specific action upon occurrence of a specific event. For example, in embodiments of the invention, a script object may be associated with an event, the occurrence of which initiates a corresponding event handler, which may link to developer-defined code for markup elements in the markup document 108. In an exemplary embodiment of the invention, the event handler includes one or more specific actions to be performed on one of the script objects in the components element 214. An exemplary action can be to invoke a method associated with another script object. Another exemplary action can be to configure a property associated with another script object. In a typical embodiment of the invention, both the event and the action are also script objects including one or more attributes. For example, the script object Timer 306 contains an event object Tick 308, the enablement of which initiates an action object invokeMethod 310. The action object invokeMethod 310 has an attribute “target” specifying a target script object—“counter1”, for example—and an attribute “method” specifying the function to be performed on the target script object.
Another exemplary mechanism for one script object to communicate with another script object is a binding mechanism that connects a property of one script object with a property of another script object; the change of one property thus is reflected on the other property. For example, as shown in
It is to be understood that
In embodiments of the invention, a developer may custom define a script object model. The script object model, for example, specifies attributes, such as property, method, and/or event attributes, and any sub-script object models that may be associated with the script object model. The script object model then is registered with the browser 106, for example, through a type manager associated with the browser 106. The browser 106 thus knows how to interpret and process a script object instantiated based on the script object model. As a result, the script markup language provided by aspects of the invention is extensible in that new script object models can be defined and registered with a browser for interpreting script markups containing script objects instantiated based on the script object models.
Although aspects of the invention have been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
This application claims the benefit of U.S. Provisional Patent Application No. 60/716,293, filed on Sep. 12, 2005, titled “SCRIPT MARKUP,” the disclosure of which is hereby expressly incorporated by reference, and the filing date of which is hereby claimed under 35 U.S.C. §119(e).
Number | Name | Date | Kind |
---|---|---|---|
5835712 | DuFresne | Nov 1998 | A |
6061698 | Chadha et al. | May 2000 | A |
6188401 | Peyer | Feb 2001 | B1 |
6272673 | Dale et al. | Aug 2001 | B1 |
6470349 | Heninger et al. | Oct 2002 | B1 |
6480865 | Lee et al. | Nov 2002 | B1 |
6493719 | Booth et al. | Dec 2002 | B1 |
6594823 | Corbin et al. | Jul 2003 | B1 |
6691176 | Narin et al. | Feb 2004 | B1 |
6732330 | Claussen et al. | May 2004 | B1 |
6748569 | Brooke et al. | Jun 2004 | B1 |
6981212 | Claussen et al. | Dec 2005 | B1 |
7089330 | Mason | Aug 2006 | B1 |
7207000 | Shen et al. | Apr 2007 | B1 |
7594166 | Ramakrishna et al. | Sep 2009 | B1 |
20020087630 | Wu | Jul 2002 | A1 |
20020107892 | Chittu et al. | Aug 2002 | A1 |
20020147745 | Houben et al. | Oct 2002 | A1 |
20020165954 | Eshghi et al. | Nov 2002 | A1 |
20020169806 | Wang et al. | Nov 2002 | A1 |
20020178182 | Wang et al. | Nov 2002 | A1 |
20030188039 | Liu et al. | Oct 2003 | A1 |
20030226107 | Pelegri-Llopart et al. | Dec 2003 | A1 |
20040030717 | Caplin | Feb 2004 | A1 |
20040061713 | Jennings | Apr 2004 | A1 |
20040111673 | Bowman et al. | Jun 2004 | A1 |
20040163036 | Jung et al. | Aug 2004 | A1 |
20040190861 | Chung | Sep 2004 | A1 |
20040205550 | Gerken | Oct 2004 | A1 |
20040216042 | Consolatti et al. | Oct 2004 | A1 |
20040225956 | Beezer et al. | Nov 2004 | A1 |
20050010910 | Lindhorst et al. | Jan 2005 | A1 |
20050021756 | Grant | Jan 2005 | A1 |
20050044491 | Peterson | Feb 2005 | A1 |
20050102611 | Chen | May 2005 | A1 |
20050160358 | Gumz et al. | Jul 2005 | A1 |
20060224978 | Albrecht et al. | Oct 2006 | A1 |
20060234548 | Qing et al. | Oct 2006 | A1 |
20060265662 | Gertzen | Nov 2006 | A1 |
20070050710 | Redekop | Mar 2007 | A1 |
20070101322 | Muschett et al. | May 2007 | A1 |
20070266176 | Wu | Nov 2007 | A1 |
Number | Date | Country |
---|---|---|
9935802 | Jul 1999 | WO |
0142977 | Jun 2001 | WO |
0157718 | Aug 2001 | WO |
03036460 | May 2003 | WO |
03100548 | Dec 2003 | WO |
Number | Date | Country | |
---|---|---|---|
20070061708 A1 | Mar 2007 | US |
Number | Date | Country | |
---|---|---|---|
60716293 | Sep 2005 | US |