compiled language code is specified in line with markup language code. A parsing component parses the code to extract the compiled language code and a compiler compiles it into binary form. The compiled code and the markup language code are provided to a runtime system.
|
1. A computer-implemented method, comprising:
receiving first developer inputs authoring markup language code in a user interface (ui) markup file;
receiving second developer inputs authoring a compiled language code section in line with the markup language code in the ui markup file, the compiled language code section comprising compiled language code to be compiled by a compile system and being delineated from the markup language code by a set of compiled language code identifiers, the compiled language code identifiers identifying the compiled language code section;
generating the ui markup file with the markup language code and the compiled language code section in line with the markup language code and delineated from the markup language code by the compiled language code identifiers, in response to the first and second developer inputs; and
outputting the ui markup file for compiling of the compiled language code at the compile system.
15. A computer readable hardware storage medium that stores computer executable instructions which, when executed by a computer, cause the computer to perform a method, comprising:
generating a developer user interface that displays one or more developer user interface displays;
receiving developer inputs, through the developer user interface, that author markup language code and compiled language code in line with the markup language code;
generating a ui markup file that has the markup language code and the compiled language code in line with the markup language code, the ui markup file having a set of tags that delineate the compiled language code from the markup language code;
identifying the compiled language code by identifying the set of tags in the ui markup file;
compiling the compiled language code identified, to obtain compiled code; and
outputting the markup language code and the compiled code, respectively, for use by a runtime system.
10. A development architecture, comprising:
a ui markup file that has markup language code and a compiled language code section that includes compiled language code in line with the markup language code, wherein a set of tags in the ui markup file identify a beginning of the compiled language code section and an end of the compiled language code section;
a parsing component that receives the ui markup file and that parses the ui markup file to identify the compiled language code based on the set of tags in the ui markup file;
a compiler that receives the compiled language code, identified by the parsing component, from the ui markup tile and compiles the compiled language code to obtain compiled code, wherein the markup language code and the compiled code are outputted for use by a runtime system; and
a computer processor that is a functional part of the architecture and is activated by the parsing component and the compiler to facilitate identifying the compiled language code in the ui markup file and compiling.
2. The computer-implemented method of
generating the ui markup file with the set of compiled language code identifiers comprising at least one tag that marks a beginning or an end of the compiled language code section.
3. The computer-implemented method of
generating the ui markup file with the set of compiled language code identifiers each comprising a series of tags that mark a beginning and an end of the compiled language code section.
4. The computer-implemented method of
generating the compiled language code section as a single section that includes all of the compiled language code in the ui markup file.
5. The computer-implemented method of
generating a plurality of different compiled language code sections, each delineated by a corresponding set of compiled language code identifiers.
6. The computer-implemented method of
generating a trigger in a corresponding compiled language code section, the trigger defining when the corresponding compiled language code section is called by an application using the ui markup file.
7. The computer-implemented method of
parsing the ui markup file to identify the compiled language code section for a compiler; and
compiling the compiled language code section to obtain compiled code.
8. The computer-implemented method of
outputting the markup language code from the ui markup file and the compiled code for use by a runtime system.
9. The computer-implemented method of
preprocessing the ui markup file to separate the compiled language code section from the markup language code; and
re-writing the ui markup file without the compiled language code section.
11. The development architecture of
a code extraction component that extracts the compiled language code identified by the parsing component and provides it to the compiler.
12. The development architecture of
13. The development architecture of
14. The development architecture of
a development system that receives developer inputs and generates the ui markup file based on the developer inputs.
16. The computer readable storage medium of
identifying a first set of tags in the ui markup tile that identifies a beginning of a compiled language code section that includes the compiled language code; and
identifying a second set of tags in the ui markup file that identifies an end of the compiled language code section in the ui markup file.
17. The computer readable storage medium of
extracting the compiled language code identified in the ui markup file; and
providing it to a compiler that performs the compiling.
18. The computer readable storage medium of
identifying a plurality of different compiled language code sections, each marked in the ui markup file by a corresponding set of tags; and
identifying a plurality of different compiled language code section triggers, each compiled language code section trigger identifying when a corresponding compiled language code section is to be run.
|
Computer systems are currently in wide use. Computer systems often include user interface displays with user input mechanisms. A user interacts with the user-input mechanisms on the user interface displays to control or manipulate an underlying computer system or application.
Current user interface frameworks allow developers to specify code to run in a number of different ways. One way of specifying code to run is by using an interpreted script language that is specified in line with a user interface markup language, such as HTML. Another way of specifying code to run is by using a native compiled code language that is specified separately from the user interface markup language.
Both of these frameworks have disadvantages. The interpreted script language is often interpreted at runtime on a client machine. However, this type of runtime interpretation uses processing overhead and increases memory usage. The native compiled language code is separated from the user interface markup code. Therefore, a developer normally needs to maintain a mental memory of where that code exists, in order to update or change that code. For instance, if a developer were to change a button on a UI element, the developer may also wish to update the code that the UI element triggers. If that code exists in another file, the developer needs to remember where that file exists, and switch to it to perform the update.
The discussion above is merely provided for general background information and is not intended to be used as an aid in determining the scope of the claimed subject matter.
Compiled language code is specified in line with markup language code. A parsing component parses the code to extract the compiled language code and a compiler compiles it into binary form. The compiled code and the markup language code are provided to a runtime system.
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 or essential 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. The claimed subject matter is not limited to implementations that solve any or all disadvantages noted in the background.
Compile system 104 illustratively includes processor 140, pre-processing system 142 (which, itself, includes markup file parsing component 144 and code extraction component 146), and compiler 148. The user's runtime system 118 illustratively includes markup code runtime system 150 and compiled code runtime system 152, as well as processor 154 and user interface component 156.
Before describing the operation of architecture 100 in more detail, a brief overview will be provided to enhance understanding. A developer uses markup language code generator (which can also be a text editor or another component) 124 to generate markup language code that can be used, for instance, to define a user interface. Developer 106 illustratively uses compiled language code generator 126 to generate compiled code. Code generators 124 and 126 can be the same code generator or separate code generators. They are described as separate code generators for the sake of example only. The compiled code can, for instance, specify some of the functionality of the user interface defined by the markup language code.
In one embodiment, developer 106 generates code file 112 which specifies the compiled language code 130 in line with the markup language code 132 and 134. The compiled language code 130 is illustratively identified in code file 112 by a set of tags or other identifiers 136 and 138.
Code file 112 is received by compile system 104 where pre-processing system 142 extracts the markup language code sections 132 and 134 and provides them in markup language code 114. It also extracts the compiled language code 130 and provides it to compiler 148. Compiler 148 compiles code 130 to obtain compiled code 116. The markup language code 114 and the compiled code 116 are then sent to the user's runtime system 118. Markup code runtime system 150 runs the markup language code 114 and compiled code runtime system 152 (which can also be a processor, a virtual machine, a managed runtime or other) runs compiled code 116. By way of example, markup code runtime system 150 may read or interpret or even compile the markup code 114, while compiled code runtime system 152 runs compiled code 116. Of course, these are examples only.
One embodiment of the operation of architecture 100 will now be described in more detail.
Development system 102 then receives developer inputs authoring code file 112. The code file 112 illustratively includes both markup language code and compiled language code. Receiving the developer inputs to generate code file 112 is indicated by block 176 in
By way of example, the schema used to identify the compiled language code sections 130 can be a single tag called “code” in which all of the code blocks are specified. A single code tag is indicated by block 180 in
Table 1 shows one example of a user interface markup file that not only includes markup language code, but that also specifies a compiled code section, and the trigger that is used to indicate when the compiled code section should be run.
TABLE 1
<UserControl>
<o:Properties>
<o:Property Type=“String{circumflex over ( )}”Name= “Line1”/>
</o:Properties>
<o:Scripts>
<o:Script Trigger=“.ctor Line1”>
Line1Element->Text = Line1;
</o:Script>
</o:Scripts>
<Border BorderThickness=“2”>
<TextBlock x:Name=“Line1Element”/>
</Border>
</UserControl>
It can be seen that the first part of the code file shown in Table 1 indicates that the code file is for a user control, and specifies properties for the user control. The last part of the code file shown in Table 1 specifies a border thickness for the user control. A center part of the code file shown in Table 1 (the portion separated by, and including, the “scripts” tags) indicates a compiled code section that is to be called, and when it is to be called. Of course, the tags shown in Table 1 are exemplary only, and the compiled code sections can be defined in the schema in other ways as well, so long as they can be distinguished from other tags (e.g., the native tags) of the user interface framework.
The markup and code specified by the developer (such as that shown in Table 1) corresponds to a set of actual code that is to be compiled. The corresponding actual code can take many different forms. Table 2 shows one embodiment of a set of code that is generated in a compiled language.
TABLE 2
void OnScriptInit( )
{
Script_Ctor_Line1_Changed( );
}
property Platform::String{circumflex over ( )} Line1
{
Platform::String{circumflex over ( )} get( ) { return m_Line1; }
void set(Platform::String{circumflex over ( )} value)
{
if (m_Line1->Equals(value)
return;
m_Line1 = value;
Xaml::NotifyPropertyChanged(*this, propidLine1( ));
m_Script_Ctor_Line1_Changed->Dirty( );
}
}
Xaml::Script m_Script_Ctor_Line1_Changed(this,
Script_Ctor_Line1_Changed);
void Script_Ctor_Line1_Changed( )
{
Line1Element->Text = Line1;
}
Thus, the code shown in Table 2 can be compiled into native machine code using an available compiler for the compliable language in which it is authored. The code file including both the markup language code and the compiled language code are then output to compile system 104. This is indicated by block 190 in the flow diagram of
Code extraction component 146 then extracts the compiled language code 130 (and illustratively tags 136 and 138) into compiled language code 131. Extracting the compiled language code (and tags) is indicated by block 196.
Pre-processing system 142 then emits one or more files. The emitted files can include the generated code blocks of compiled language blocks (and tags) 131. They can also include separate markup language code 114 (which includes the markup language code sections 132 and 134) rewritten without the compiled language code 130 and tags 136 and 138. Emitting the files is indicated by block 198 in the flow diagram of
The compiled language code 131 and markup language code 114 can then be output to one or more compilers that are used to compile that code. In the example discussed with respect to
It should be noted that, in one embodiment, the code that has been compiled is called by some other part of the application represented by code file 112. In one exemplary embodiment, the developer 106 writes the code that invokes the compiled code 116. In another embodiment, developer 106 provides a notification to a component that an event has occurred, and that component calls the appropriate compiled code 116. Of course, these are exemplary embodiments only.
It can thus be seen that the present discussion allows developers to write code in a native compiled language within a user interface markup file. Blocks of the compiled language code can be specified within specific XML (or other) tags. These blocks of code are processed at compile time into native machine code, while leaving the user interface markup intact for consumption by the user interface runtime framework. When an application is run, events (such as property changes) can trigger calls to the compiled native code to achieve the desired outcome of the developer.
The present discussion has mentioned processors and/or servers. In one embodiment, the processors and servers include computer processors with associated memory and timing circuitry, not separately shown. They are functional parts of the systems or devices to which they belong and are activated by, and facilitate the functionality of the other components or items in those systems.
Also, a number of user interface displays have been discussed. They can take a wide variety of different forms and can have a wide variety of different user actuatable input mechanisms disposed thereon. For instance, the user actuatable input mechanisms can be text boxes, check boxes, icons, links, drop-down menus, search boxes, etc. They can also be actuated in a wide variety of different ways. For instance, they can be actuated using a point and click device (such as a track ball or mouse). They can be actuated using hardware buttons, switches, a joystick or keyboard, thumb switches or thumb pads, etc. They can also be actuated using a virtual keyboard or other virtual actuators. In addition, where the screen on which they are displayed is a touch sensitive screen, they can be actuated using touch gestures. Also, where the device that displays them has speech recognition components, they can be actuated using speech commands.
A number of data stores have also been discussed. It will be noted they can each be broken into multiple data stores. All can be local to the systems accessing them, all can be remote, or some can be local while others are remote. All of these configurations are contemplated herein.
Also, the figures show a number of blocks with functionality ascribed to each block. It will be noted that fewer blocks can be used so the functionality is performed by fewer components. Also, more blocks can be used with the functionality distributed among more components.
The description is intended to include both public cloud computing and private cloud computing. Cloud computing (both public and private) provides substantially seamless pooling of resources, as well as a reduced need to manage and configure underlying hardware infrastructure.
A public cloud is managed by a vendor and typically supports multiple consumers using the same infrastructure. Also, a public cloud, as opposed to a private cloud, can free up the end users from managing the hardware. A private cloud may be managed by the organization itself and the infrastructure is typically not shared with other organizations. The organization still maintains the hardware to some extent, such as installations and repairs, etc.
In the embodiment shown in
It will also be noted that architecture 100, or portions of it, can be disposed on a wide variety of different devices. Some of those devices include servers, desktop computers, laptop computers, tablet computers, or other mobile devices, such as palm top computers, cell phones, smart phones, multimedia players, personal digital assistants, etc.
Under other embodiments, applications or systems are received on a removable Secure Digital (SD) card that is connected to a SD card interface 15. SD card interface 15 and communication links 13 communicate with a processor 17 (which can also embody processors 128, 140 or 154 from
I/O components 23, in one embodiment, are provided to facilitate input and output operations. I/O components 23 for various embodiments of the device 16 can include input components such as buttons, touch sensors, multi-touch sensors, optical or video sensors, voice sensors, touch screens, proximity sensors, microphones, tilt sensors, and gravity switches and output components such as a display device, a speaker, and or a printer port. Other I/O components 23 can be used as well.
Clock 25 illustratively comprises a real time clock component that outputs a time and date. It can also, illustratively, provide timing functions for processor 17.
Location system 27 illustratively includes a component that outputs a current geographical location of device 16. This can include, for instance, a global positioning system (GPS) receiver, a LORAN system, a dead reckoning system, a cellular triangulation system, or other positioning system. It can also include, for example, mapping software or navigation software that generates desired maps, navigation routes and other geographic functions.
Memory 21 stores operating system 29, network settings 31, applications 33, application configuration settings 35, data store 37, communication drivers 39, and communication configuration settings 41. Memory 21 can include all types of tangible volatile and non-volatile computer-readable memory devices. It can also include computer storage media (described below). Memory 21 stores computer readable instructions that, when executed by processor 17, cause the processor to perform computer-implemented steps or functions according to the instructions.
Examples of the network settings 31 include things such as proxy information, Internet connection information, and mappings. Application configuration settings 35 include settings that tailor the application for a specific enterprise or user. Communication configuration settings 41 provide parameters for communicating with other computers and include items such as GPRS parameters, SMS parameters, connection user names and passwords.
Applications 33 can be applications that have previously been stored on the device 16 or applications that are installed during use, although these can be part of operating system 29, or hosted external to device 16, as well.
The mobile device of
Note that other forms of the devices 16 are possible.
Computer 810 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 810 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media is different from, and does not include, a modulated data signal or carrier wave. It includes hardware storage media including both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk 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 computer 810. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a transport mechanism and includes any information delivery 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, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.
The system memory 830 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 831 and random access memory (RAM) 832. A basic input/output system 833 (BIOS), containing the basic routines that help to transfer information between elements within computer 810, such as during start-up, is typically stored in ROM 831. RAM 832 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 820. By way of example, and not limitation,
The computer 810 may also include other removable/non-removable volatile/nonvolatile computer storage media. By way of example only,
Alternatively, or in addition, the functionality described herein can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
The drives and their associated computer storage media discussed above and illustrated in
A user may enter commands and information into the computer 810 through input devices such as a keyboard 862, a microphone 863, and a pointing device 861, such as a mouse, trackball or touch pad. Other input devices (not shown) may include a joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 820 through a user input interface 860 that is coupled to the system bus, but may be connected by other interface and bus structures, such as a parallel port, game port or a universal serial bus (USB). A visual display 891 or other type of display device is also connected to the system bus 821 via an interface, such as a video interface 890. In addition to the monitor, computers may also include other peripheral output devices such as speakers 897 and printer 896, which may be connected through an output peripheral interface 895.
The computer 810 is operated in a networked environment using logical connections to one or more remote computers, such as a remote computer 880. The remote computer 880 may be a personal computer, a hand-held device, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 810. The logical connections depicted in
When used in a LAN networking environment, the computer 810 is connected to the LAN 871 through a network interface or adapter 870. When used in a WAN networking environment, the computer 810 typically includes a modem 872 or other means for establishing communications over the WAN 873, such as the Internet. The modem 872, which may be internal or external, may be connected to the system bus 821 via the user input interface 860, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 810, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
It should also be noted that the different embodiments described herein can be combined in different ways. That is, parts of one or more embodiments can be combined with parts of one or more other embodiments. All of this is contemplated herein.
Carter, Benjamin F., Coates, Andrew M.
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
6327702, | Dec 30 1998 | Microsoft Technology Licensing, LLC | Generating a compiled language program for an interpretive runtime environment |
6799718, | Jul 10 2001 | CODEGEAR LLC | Development assistance for mixed-language sources |
6836883, | Jun 21 2000 | Microsoft Technology Licensing, LLC | Method and system for compiling multiple languages |
6973646, | Jul 21 2000 | International Business Machines Corporation | Method for compiling program components in a mixed static and dynamic environment |
6986101, | May 06 1999 | International Business Machines Corporation | Method and apparatus for converting programs and source code files written in a programming language to equivalent markup language files |
7219338, | Mar 25 2003 | Microsoft Technology Licensing, LLC | Multi-language compilation |
8402427, | Mar 17 2000 | ZARBAÑA DIGITAL FUND LLC | Web application generator |
8943474, | Oct 26 2011 | The MathWorks, Inc | Code generation and execution for dynamic programming languages |
20040172617, | |||
20040194072, | |||
20050108694, | |||
20070006188, | |||
20070300211, | |||
20100131951, | |||
20110271248, | |||
20130024844, | |||
20130205192, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Dec 26 2013 | CARTER, BENJAMIN F | Microsoft Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 031952 | /0795 | |
Jan 09 2014 | Microsoft Technology Licensing, LLC | (assignment on the face of the patent) | / | |||
Jan 13 2014 | COATES, ANDREW M | Microsoft Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 031952 | /0795 | |
Oct 14 2014 | Microsoft Corporation | Microsoft Technology Licensing, LLC | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 039025 | /0454 |
Date | Maintenance Fee Events |
Mar 28 2019 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Mar 29 2023 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Date | Maintenance Schedule |
Oct 13 2018 | 4 years fee payment window open |
Apr 13 2019 | 6 months grace period start (w surcharge) |
Oct 13 2019 | patent expiry (for year 4) |
Oct 13 2021 | 2 years to revive unintentionally abandoned end. (for year 4) |
Oct 13 2022 | 8 years fee payment window open |
Apr 13 2023 | 6 months grace period start (w surcharge) |
Oct 13 2023 | patent expiry (for year 8) |
Oct 13 2025 | 2 years to revive unintentionally abandoned end. (for year 8) |
Oct 13 2026 | 12 years fee payment window open |
Apr 13 2027 | 6 months grace period start (w surcharge) |
Oct 13 2027 | patent expiry (for year 12) |
Oct 13 2029 | 2 years to revive unintentionally abandoned end. (for year 12) |