CN101512503A - XML application framework - Google Patents

XML application framework Download PDF

Info

Publication number
CN101512503A
CN101512503A CN200680014594.5A CN200680014594A CN101512503A CN 101512503 A CN101512503 A CN 101512503A CN 200680014594 A CN200680014594 A CN 200680014594A CN 101512503 A CN101512503 A CN 101512503A
Authority
CN
China
Prior art keywords
data
application program
assemblies
coupling assembling
stage
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.)
Granted
Application number
CN200680014594.5A
Other languages
Chinese (zh)
Other versions
CN101512503B (en
Inventor
A·S·威廉姆斯
C·A·西泽伯斯基
C·威滕伯格
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.)
Microsoft Technology Licensing LLC
Original Assignee
Microsoft 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
Priority claimed from US11/360,457 external-priority patent/US8132148B2/en
Application filed by Microsoft Corp filed Critical Microsoft Corp
Publication of CN101512503A publication Critical patent/CN101512503A/en
Application granted granted Critical
Publication of CN101512503B publication Critical patent/CN101512503B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention relates to an XML application framework (XAF). XAF applications are data driven such that all operations with the computer system are data focused. In addition, the components used in the XAF application are instantiated and connected according to how the data is displayed and what type of data is used. Applications within XAF comprise a user interface (UI) connector, an action module, and a data connector. UI connectors receive UI events and connect the UI event to an action module. The action module generates a standard format action from the UI event and sends it to the data connector. The data connector translates the standard format action into a data-specific action that changes data in a data store. A data connector then sends a standard format data representation corresponding to the changed data back to the UI connector to provide the changed data to the UI.

Description

The XML application framework
Copyright notice
The part of the disclosure of patent document comprises material protected by copyright.The copyright owner does not oppose that anyone is as like that the photomechanical printing of patent document or patent disclosure being duplicated, in any case still keep all copyrights in addition in the patent document of United States Patent (USP) trademark office or record.
Background
Generally speaking, software systems provide the software architecture of the component software in tissue and the interconnected computer systems.These component softwares are carried out and are given its function operations to software application.Generally speaking, application program is operated with certain characteristics, and these features have one or more assemblies separately.Assembly, and feature therefore can form from operation being parsed into one or more bottom software assembly littler and more simple task.
When the structure software application, the software developer must use such as development languages such as C# and create component software.Creating command code, promptly when component software gives the software code of its function, the developer must be by calling or other constructs the link of creating between all component.For any function that is provided by application program, the software developer is generally all different software building component codes of executive utility special function, and code is manually write in the interconnection that relies between the component software of finishing the work each other.The software developer creates user interface (UI), data configuration and to the mutual required all operations between user and the application program.
In many application programs, UI, operation and data configuration are application-specific.Thus, in order to create application program, the software developer creates a large amount of codes usually.In addition, the software developer generally organizes and creates institute's correlate between the different fragments of software.Be to create Any Application, the software developer must right and wrong Changshu practices, and is complicated because be used to create the substrate of application program.
Owing to be used to generate the complicacy of the current method of application program, and owing to be used for the singularity and the inevitable interconnectivity thereof of the code of given application program, the software developer can't be easily make amendment to current application program under having great efforts and not emitting the situation of the risk of the damage of existing application or expands.
The present invention considers to make at these and other just.
General introduction
Provide this general introduction to come some notion that will in detailed description, further describe with below the form introducing of simplifying.This general introduction is not intended to identify the key feature or the essential feature of the theme of this claim.
Various embodiments of the present invention solve above-mentioned and other problem by a kind of software application framework is provided, structure and be used to manage the execution of this software application when this framework is used to given software application generating run.The application program that is generated by application framework of the present invention is made up of the set or the figure of the application component that connects.Function according to the application program of this application framework configuration is enabled by each application component group dynamically is configured in the assembly territory, wherein each territory is configured to enable a given function of this application program, for example shows the picture in the word processing document.
For generation is used for the run time organization of application program, the application program that application program will be used for each required function of application is described and is passed to application program and describe engine.This application program is described provides the declarative rule that is used to construct with the combine component territory, and this application program is described engine and is used for explaining the declarative rule that is used to create with the configuration component territory when needed based on the data event that is received by application program.Can for example, select to generate by user action by the data event that application program receives in response to user to the function button in the user interface or control or data object.Data event also can be changed by the outside, is for example received by application program as the result of operation external progress or generates from Another Application program or the third party data that receive of originating.According to an embodiment, application program description and application program are described engine and are come structuring and/or operation according to extend markup language (XML).Although can use XML that action or other standard that incident take place and the simple means of statement in this framework are provided in this application framework, this application framework is not limited to only use XML.
This application program is described the engine explanation application program of each required function is described, and obtaining then is each required application component in required function structure assembly territory.According to an embodiment, this application program is described engine and obtain application component from the Component Gallery of safeguarding explicitly with application program.For example, the 3rd territory of the function that this application program is described a territory that engine can be configured to the text in the display document, application program is formatd in second territory of the object picture that is used for display document and being used to or the like.
According to each embodiment, this application framework also comprises the execution administrative model that is used to the territory managing the execution of application program and comprise this application program.When application program the term of execution take place that given function of application is called in requirements such as data item in the deleted data table for example and when therefore requiring to call the data event in the specific components territory of enabling this function, assign single processing threads to carry out the assembly according to the territory of this data-driven incident by application program to the main body territory.
In case single processing threads enters the main body territory, the assembly in this territory is carried out according to the execute phase model by this thread.In the phase one, promptly read/request stage, read desired data, for example, a value deleting from table object is the request of required change subsequently, for example, deletes the request of the value of being asked from the sample table object.In subordinate phase, promptly reaffirm/reconfigure during the stage, describe engine by application program and reaffirm or reconfigure this main body territory according to the change of being asked.That is, application program is described engine where necessary according to being applicable to that the new configuration that data change reconfigures this territory.
During reconfiguring the stage, application program describe discardable this territory of engine some assembly, obtain this territory New Parent maybe that this territory is discarded fully.Thus, be the set of assembly to localization with the life cycle of the time between initial configuration of equaling and follow-up the reconfiguring, wherein follow-up reconfigure and then begin life cycle to next configuration (if there is) of localization.Therefore, describe the set of each assembly territory that engine generates, and this territory had by application program to the demand of the service in this territory determined life cycle as the required assembly of the given data-driven function of executive utility by application program.
The present invention and improved understanding more comprehensively thereof can be by obtaining with reference to the accompanying drawing of following brief overview, the detailed description and the appended claims of following exemplary embodiment of the present.
The accompanying drawing summary
Figure 1A is the functional diagram that a kind of computing environment and basic calculating equipment are shown, and their available application frameworks according to the present invention are constructed application program and executive utility under this framework.
Figure 1B shows a computer screen and shows, it shows an example word processing document that is shown by the example word-processing application that one or more video data objects are shown.
Fig. 2 A illustrates according to application program of the present invention, application program to describe mutual functional diagram between engine and the one or more assemblies territory.
Fig. 2 B is the functional diagram that illustrates according to an exemplary embodiment of the application framework with the application component that is connected to one or more UI and one or more data storage of the present invention.
Fig. 3 be illustrate according to of the present invention have be connected between UI and the data storage and describe and the functional diagram of another exemplary embodiment of the XML application framework of exemplary XAD engine configuration or a plurality of application programs of reconfiguring by exemplary application.
Fig. 4 is the process flow diagram that illustrates according to an embodiment of the method that is used to the incident in the XAF application program of carrying out of the present invention.
Fig. 5 illustrates the process flow diagram that is used to create and dispose or reconfigure an embodiment of XAF application program according to of the present invention.
Fig. 6 show the tissue of data Layer and show data Layer and comprise data storage and other assembly of data client between connection.
Fig. 7 shows the operating process of transaction transforms operation.
Fig. 8 shows the control operation that operation is carried out according to transaction transforms.
Fig. 9 shows the operating process of the operation of carrying out in one embodiment of the invention.
Figure 10 is to an embodiment that can operate in computing environment with the multilayer phasing model that requires the software approach execution according to the present invention.
Figure 11 is an embodiment who has the modular software system of the component software that is used for the custom software approach execution in the phasing model according to of the present invention.
Figure 12 is an embodiment who operates on whole computer system with first or top layer stage model or the space that any software approach of customization in this system is carried out according to of the present invention.
Figure 13 be according to of the present invention can be in one or more stage manipulate of main stage space with the embodiment of customization to the retrieval of data and son-stage space of writing.
Figure 14 A and Figure 14 B be according to of the present invention can be in one or more stage manipulate of main stage space with the embodiment of customization to the son-stage space of the configuration of plug and play system and operation.
Figure 15 shows according to of the present invention and comprises statement about data structure or the linguistic property of software approach to the phase constraint attribute of the constraint of the execution of moment.
Figure 16 A and 16B show an embodiment who is used for the operation method stage by stage of computer system according to of the present invention.
Figure 17 is the exemplary computer system that can be used for providing and be stored in the contact information of customer of operating in the territory stage by stage according to of the present invention.
Figure 18 shows the example system that is configured to carry out concomitantly a plurality of objects according to an embodiment of the invention.
Figure 19 shows another example system that is configured to carry out concomitantly a plurality of objects according to an embodiment of the invention.
Figure 20 has described the asynchronous communication between inside, single-threaded object and the external object.
Figure 21 shows the example execution route when concurrency territory and database interface.
Figure 22 shows the wherein operational flowchart in the first concurrency territory and database interface.
Figure 23 shows the example execution route when the first concurrency territory and the second concurrency domain interface.
Figure 24 shows the wherein operational flowchart in the first concurrency territory and the second concurrency domain interface.
Figure 25 is senior the describing that the application program relevant with object with being created the data that form executable application programs described.
Figure 26 show be performed create and Figure 25 when connecting application component figure shown in application program describe.
Figure 27 shows the intraware that the application program of Figure 25 and 26 describes and is used to handle and/or checks mutual relationship between the result object of data.
Figure 28 is the process flow diagram that the operating characteristic of one embodiment of the present of invention of wherein carrying out SGML is shown.
Figure 29 is the process flow diagram that the operating characteristic of one embodiment of the present of invention that application program wherein is dynamically configured is shown.
Figure 30 shows the operating process of the operation of being carried out by the creation operation in one embodiment of the present of invention.
Describe in detail
Accompanying drawing referring now to embodiments of the invention shown in it is described the present invention more comprehensively.Yet the present invention can specialize with many different forms, and should not be construed as limited to embodiment described herein.On the contrary, provide these embodiment being devoted to making disclosure comprehensive and complete, and make it to pass on scope of the present invention fully to those skilled in the art.
As above concise and to the point describe, various embodiments of the present invention provide a kind of structure and be used for the software application framework of the execution of managing software application programme when being used to given application program generating run.The run time organization of given software application is by the required one or more application components territory combination of one or more corresponding functions of carrying out this software application.Engine is described in response to each territory is generated from the application program description that application program receives by application program in the assembly territory.Application program the term of execution, the unit of management is carried out as application program in each assembly territory, wherein each territory is used to carry out the corresponding function of this application program.When application program receives when changing with the data of being associated for the locking assembly territory, this assembly territory is described engine by application program and is reconfigured data to be associated in response to this as required.The data that application program receives change or incident can for example be selected to generate in response to the user to the function button in the user interface or control or data object by user action.Data event also can be changed by the outside, for example receive by application program as the outside result who carries out of operation or generate from Another Application program or the third party data that receive of originating.Thus, application program is based on the set or the figure of the coupling assembling of being organized and dynamically being reconfigured by the data of application program reception and/or processing.
An example that wherein can realize suitable computingasystem environment 100 of the present invention is shown in Figure 1.Computingasystem environment 100 only is an example of suitable computing environment, is not that usable range of the present invention or function are proposed any limitation.Computing environment 100 should be interpreted as the arbitrary assembly shown in the exemplary operation environment 100 or its combination are had any dependence or demand yet.
The present invention can use numerous other universal or special computingasystem environment or configuration to operate.Be applicable to that well-known computing system of the present invention, environment and/or configuration include but not limited to: personal computer, server computer, hand-held or laptop devices, multicomputer system, the system based on microprocessor, set-top box, programmable consumer electronics, network PC, minicomputer, large scale computer, comprise distributed computing environment of arbitrary said system or equipment or the like.
The present invention can describe in the general context of the computer executable instructions of being carried out by computing machine such as program module etc.Generally speaking, program module comprises routine, program, object, assembly, data structure or the like, and they are carried out specific task or realize specific abstract data type.The present invention also can put into practice in distributed computing environment, and wherein, task is by carrying out by the local and remote treatment facility of communication network link.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory storage device.
With reference to Figure 1A, be used to realize that exemplary computer system 100 of the present invention comprises the universal computing device of computing machine 110 forms.The assembly of computing machine 110 can include but not limited to, processing unit 120, system storage 130 and will comprise that the sorts of systems assembly of system storage 130 is coupled to the system bus 121 of processing unit 120.System bus 121 can be any of some kinds of types of bus structure, comprises memory bus or Memory Controller, peripheral bus and uses any local bus in all kinds of bus architectures.As example but not the limitation, this class architecture comprises ISA(Industry Standard Architecture) bus, MCA (MCA) bus, strengthens ISA (EISA) bus, Video Electronics Standards Association's (VESA) local bus and peripheral component interconnect (pci) bus, is also referred to as the Mezzanine bus.
Computing machine 110 generally includes various computer-readable mediums.Computer-readable medium can be can be by arbitrary usable medium of computing machine 110 visit, comprises volatibility and non-volatile media, removable and removable medium not.As example but not the limitation, computer-readable medium comprises computer-readable storage medium and communication media.Computer-readable storage medium comprises the volatibility that realizes with arbitrary method or the technology that is used to store such as information such as computer-readable instruction, data structure, program module or other data and non-volatile, removable and removable medium not.Computer-readable storage medium includes but not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, tape cassete, tape, disk storage or other magnetic storage apparatus, maybe can be used for storing desired information and can be by arbitrary other medium of computing machine 110 visits.Communication media is embodied as usually such as the computer-readable instruction in the modulated message signal of carrier wave or other transmission mechanism, data structure, program module or other data, and comprises arbitrary information-delivery media.Term " modulated message signal " refers to be provided with or change in the mode that the information in the signal is encoded the signal of its one or more features.As example but not limitation, communication media comprises wire medium, as cable network or directly line connect, and wireless medium is as acoustics, RF, infrared and other wireless medium.Above-mentioned arbitrary combination also should be included within the scope of computer-readable medium.
System storage 130 comprises the computer-readable storage medium with volatibility and/or nonvolatile memory form, as ROM (read-only memory) (ROM) 131 and random-access memory (ram) 132.Basic input/output 133 (BIOS) comprises as help the basic routine of transmission information between the element in computing machine 110 when starting, is stored in usually among the ROM 131.RAM 132 comprises addressable immediately or current data of operating of processing unit 120 and/or program module usually, such as the module of structure under the XML application framework or execution.As example but not the limitation, Fig. 1 shows operating system 134, application program 135,204,304 (shown in Fig. 2 B, 3), other program module 136 and routine data 137; The XML application framework can be used for constructing and carry out and is used for being stored in RAM 132 or from the application program of all softwares of wherein carrying out.
Computing machine 110 also can comprise other removable/not removable, volatile/nonvolatile computer storage media.Only make example, Figure 1A shows computing machine 110 to have not removable, non-volatile magnetic medium 141, not removable, the non-volatile memory interface 140 read and write as hard disk drive.Computing machine 110 also can comprise the non-volatile memory interface 150 to reading and writing such as equipment such as disc driver 151, and 151 pairs of equipment are removable such as disk etc., non-volatile media 152 is read and write.In addition, computing machine 110 can comprise the CD drive of reading and writing such as removable, non-volatile CDs 156 such as CDROM or other optical mediums 155.Other that can use in the exemplary operation environment be removable/and not removable, volatile/nonvolatile computer storage media includes but not limited to tape cassete, flash card, digital versatile disc, digital recording band, solid-state RAM, solid-state ROM or the like.Hard disk drive 141 passes through not removable memory interface usually, is connected to system bus 121 as interface 140, and disc driver 151 and CD drive 155 are connected to system bus 121 usually by the removable memory interfaces as interface 150.
Above discuss and provide for computing machine 110 storage of computer-readable instruction, data structure, program module and other data at the computer-readable storage medium of driver shown in Figure 1A and association thereof.For example, hard disk drive 141 store operation systems 144, application program 145, other program module 146 and routine data 147 are shown, they can be identical with routine data 137 with operating system 134, application program 135, other program module 136, also can be different with them.Here give different labels to operating system 144, application program 145, other program module 146 and routine data 147 and illustrate that they are different copies at least.The user can be by being linked to user input device, as user's input interface 160 of keyboard 162 and positioning equipment 161 to computing machine 110 input commands and information.Other input equipment (not shown) can comprise microphone, operating rod, game mat, satellite dish, scanner or the like.These and other input equipment is connected to processing unit 120 by the user's input interface 160 that is coupled to system bus 121 usually, but also can be connected with bus structure by other interface, as parallel port, game port or USB (universal serial bus) (USB).
The display device of monitor 191 or other type also by interface, is connected to system bus 121 as video interface 190.Except that monitor, computing machine 110 also can comprise other peripheral output device, and as loudspeaker 194 and printer 193, they connect by output peripheral interface 192.
Computing machine 110 can use one or more remote computers, is connected in the networked environment as the logic of remote computer 180 and operates.Remote computer 180 can be personal computer, server, router, network PC, peer device or other common network node, and generally include many or all are above with respect to computing machine 110 described elements, although only show memory storage device 181 in Figure 1A.The logic that Figure 1A describes connects and comprises Local Area Network 171 and wide area network (WAN) 173, but also can comprise other network, as wireless network.This class network environment is common in office, enterprise-wide. computer networks, Intranet and the Internet.
When using in the lan network environment, computing machine 110 is connected to LAN 171 by network interface or adapter 170.When using in the WAN network environment, computing machine 110 generally includes modulator-demodular unit 172 or is used for by WAN 173, sets up other device of communication as the Internet.Modulator-demodular unit 172 can be internal or external, and it can be connected to system bus 121 by user's input interface 160.In networked environment, can be stored in the remote memory storage device 181 with respect to computing machine 110 described program modules or its part.As example but not the limitation, remote application 185 resides on the memory devices 181.Be appreciated that it is exemplary that the network that illustrates connects, and can use other device of between computing machine, setting up communication link.
For the purpose of understanding and explanation, it will be favourable describing various embodiments of the present invention according to the example application program user interface that wherein shows the sample data object.Figure 1B shows the computer screen that shows an example word processing document and shows, the document is shown by the example word-processing application that one or more shown data objects are shown.Example user interface 195 shows the typical software application user interface that the user can be used for importing, editing or handle in addition according to the function of associated software application one or more data objects.For example, user interface 195 shows an example word-processing application, it has one or more functionality controls at the top, comprise " File (file) " control, " Edit (editor) " control, " View (view) " control and " Other (other) " control.Should be appreciated that the functionality controls shown in Figure 1B only for exemplary purposes, is not to being applicable to the restriction of a large number of users interface type, layout and functions associated available in the software application of the present invention.
User interface 195 comprises scroll bar 199, is used for the data that comprise of scroll user interface workspace requiredly up or down as the user.An example word processing document is shown in the workspace of user interface 195.This example document, for example letter, p.m.entry, form etc. comprise text object 196, the object picture 197 that embeds and the table objects 198 that embeds.Still with reference to Figure 1B, the document that is presented in the user interface 195 is rolled by the user, makes text object 196 at the top of the page, and the object picture 197 of embedding is displayed between two text objects, and table objects 198 at page base section as seen.That is, table objects 198 is just entering view, but is not presented at fully in the workspace of user interface 195 as yet.
As described in detail in the following, according to various embodiments of the present invention, be responsible for showing that the software application of example user interface 195 and sample data object 196,197,198 is set or the figure that are grouped together in the associated component in the logic groups, or be used to provide the territory of the required function of application program.Under any given example, application program comprises the run time organization that the logic groups by these associated components constitutes, and is called as the territory herein, and it is to provide the function of application program required under this example.When executive utility, the change of the data that receive based on application program and application program are handled these data and are changed required functions associated and come dynamically configuration component territory.For example, still with reference to Figure 1B, be used for a current illustrative run time organization that is presented at the document of user interface 195 and comprise textview field, text territory comprises and shows and handle the required application component of text object 196.Comprised and comprised the picture territory that shows and handle the required application component of object picture 197, comprised comprising showing and second textview field of the application component that second text object of processes and displays under object picture 197 is required, and comprised the form fields that comprises the required application component of table objects that demonstration enters 198.Other assembly territory that is associated with this run time organization comprises the application component that is used for other function, comprise the position of scroll bar 199 and move, the position and the display properties of the functionality controls in the user interface and any others that the required application program of the function of current requirement is provided.
As will be described in detail, therein data event receive by application program application program the term of execution, the run time organization in assembly territory is dynamically reaffirmed and/or is reconfigured on request in response to the incident of data-driven.For example, if the user selects object picture 197 to delete or carries out other modification, then application program passes to application program with the data change and describes engine, the latter dynamically reconfigures the assembly territory of the object 197 of being responsible for Showing Picture, make this assembly territory will comprise the data event that is used for based on being received, for example the deletion of object picture 197 or other are revised the appropriate application program assembly of the object 197 that Shows Picture.In the required new function of application program, for example, under the situation in the view that new data-objects such as table objects 198 is input in the user interface 195, application program is described engine with access application and is generated the New Parent territory that the required one or more application components of data object that imported into by demonstration constitute.
Fig. 2 A be application program is shown, application program is described the mutual functional diagram between engine and the one or more assemblies territory.According to various embodiments of the present invention, provide that to be used for application deployment be the application framework of coupling assembling figure that is used to carry out one or more functions of this application program.With reference to figure 2A, application program 204,304 shows any software application that is used for according to the programming of corresponding application programs being provided one or more useful functions, for example word-processing application, spreadsheet applications, slide presentation applications, database application, desktop publishing application program, email application and calendar applications etc.In fact, as understanding from following description, various embodiments of the present invention are not limited to any specific software application.
According to various embodiments of the present invention, application program 204,304 is made of a plurality of application components, its each all create by the software developer, be used to be independent of other assembly or provide given function explicitly with other assembly.For example, a given application component can be included in the application program 204,304, is used to provide the printing function of associated application.The Another Application program assembly can be included in this application program, is used to provide the specific format function of associated application.Usually, the given function of application program 204,304 for example formats, prints, editor, data presentation etc., is by enabling when operating together and providing the application component of expectation function to enable.For example, can comprise a plurality of application components that to carry out according to the particular sequence that required function is provided in the function that is used for videotex object 196 or object picture 197 of the given software application shown in Figure 1B more than.As mentioned above, application program 204,304 no matter under the given example of run time organization or given the term of execution, all is the set or the figure of the application component that connects at any time.Mutual being described in detail in below with reference to Fig. 2 B, 3,4,5 between different application assembly and the different application assembly described.
As above briefly describe, at any given time, application program 204,304 comprises a run time organization, and it is the instantiation of application program at the application component of required connection of this moment.As described below, the term of execution of application program, the instantiation of application component dynamically reconfigures by the application program change is required based on the data that application program received.In order to generate the given run time organization of application component, application program 204,304 is described the application program of each required function and is described 318 from application program and be delivered to application program and describe engine 3 20.Application program is described 318 detailed description and application program and is described that operating in of engine is following to be provided.For example, later with reference to Figure 1B, be used for the instantiation of run time organization of user interface 195 and the functionality controls that the data that are associated will require application component explicit user interface 195 and be associated, the table objects 198 that is text object 196, object picture 197, enters, and the current location of show scroll bars 199.
The application program that application program 204,304 will be used for the current required function of application program is described and is passed to application deployment or describe engine 3 20, the grouping that is used for generating and disposing each required application component that these functions are provided.According to one embodiment of present invention, the application program of describing engine to application program from application passes describe comprise following with reference to figure 2B and 3 descriptions according to extend markup language (XML) structuring formative declarative rule also.It is to comprise the application program that is used to explain each required function that receives from application program 204,304 to describe and be used to make up and dispose the software module of enough computer executable instructions that the application component grouping (being called assembly territory or concurrency territory herein) of required function is provided to application program 204,304 that application program is described engine 3 20.According to an embodiment, application program describes that engine 3 20 is following describedly to be operated according to extend markup language with reference to figure 2B, 3,4,5.Application program is described the function of engine and is operated in below with reference to Fig. 3 and under the title of " application program descriptive language " and describes in detail.
In case application program is described engine 3 20 and is received the application program that is associated with the required function of application program from application program 204,304 and describe, this application program is described engine promptly according to satisfying each described function, and for example the object 197 required application components that Show Picture shown in Figure 1B are explained the application program description.Determined required assembly and the relation between the required component in case application program is described engine, application program is described engine 3 20 and promptly obtain required application component from Component Gallery 322, comprises required component interface.According to various embodiments of the present invention, Component Gallery 322 can be set or the storehouse with the application component that is associated as application-specific such as word-processing applications, perhaps Component Gallery can be that application program is described engine 3 20 and therefrom can be obtained to be used for to provide the assembly set of the assembly of function as word-processing application, spreadsheet applications, slide presentation applications, database application etc. to a plurality of dissimilar application programs.
In case application program is described engine and obtained required application component (for example, the individual modules of software programming), this application program is described engine and is promptly created each the assembly territory that is used for the current required function of application program 204,304.As shown in Fig. 2 A, current data in response to the data shown in 204,304 couples of Figure 1B of application program shows demand, and application program is described engine 3 20 establishments and is used for the first assembly territory 250 of text object 196, the 3rd assembly territory 260 that is used for the second assembly territory of object picture 197 and is used for table objects 198.That is, each in these assembly territories is described engine 3 20 by application program and is created, and making each territory comprise provides this application those required application components of function of requirement at present.For example, picture territory 255 is described engine 3 20 by application program and is generated, to comprise that application program 204,304 is with those required application components of its current display characteristic and attribute display object picture 197.Be to be understood that, territory shown in Fig. 2 A shows can be to the territory of the generation of the data object shown in Figure 1B, but any other example for the run time organization that is used for application program 204,304, wherein shown different data objects and demonstration or location or disposed different user interface capabilities in addition, then described engine 3 20 and generate a different set of territory 250,255,260 as required by application program.
According to each embodiment, a kind of execution administrative model is provided, wherein each assembly territory is used as an execution administrative unit that is used for application program 204,304.When application program 204,304 receives data event, as describing in detail below with reference to Fig. 2 B, 3,4,5, application program 204,304 is described 318 with application program and is passed to application program and describe engine 3 20, be used for dynamically reconfiguring the territory 250,255,250 of one or more current configurations, or be used for creating as required neofield.For example, later with reference to Figure 1B, when scrolling up document, application program 204,304 requires to describe from application program the assembly territory that is used to show new data-objects of engine 3 20.For example, before table objects 198 rollings were entered view, application program 204,304 did not require table objects territory 260, and this is shown in Fig. 2 A, because application program 204, the 304 current functions that show table objects 198 that do not require.Yet, in case detecting table objects, the operating system 134 of operating application program 204,304 just entered view by rolling, operating system notification application 204,304, and it now must show table objects 198 and the data that are associated thereof.In response, the application program of application program 204,304 table objects 198 that will be used to enter is as mentioned above described and is passed to application program and describe engine 3 20.Application program is described engine 3 20 and is explained that these application programs describe, obtain required application component, and dynamically create comprising showing the table objects territory 260 of those application components that this table objects that enters 198 is required.
Similarly, leave the bottom of the page if the document shown in Figure 1B is made table objects roll by scrolling up, then operating system no longer requires the demonstration of table objects 198 with notification application 204,304.Application program is described engine will be discarded as the table objects territory 260 that application program 204,304 demonstration table objects 198 are created in response to the application program description that receives from application program 204,304, because no longer require the previous required assembly territory of table objects that shows.Thus, application program describe engine can based on application program 204,304 the term of execution requirement come dynamic creation or discarded to the locking assembly territory.
Application program 204,304 the term of execution, operation by managing each assembly territory and modular construction realize carrying out management.Still with reference to figure 2A, application program 204,304 the term of execution, when application program 204,304 received the data event that calls to the function of localization 250,255,260, application program 204 was handled this data event via corresponding territory.For example, if the user selects a data item in the table objects 198, then select the deletion control of application program 204,304 to delete selected data item, then application program 204,304 receives the data event that the selected data item in territory and selected deletion control are associated.As understood by those skilled in the art, detect by the operating system of being responsible for operating application program 204,304 to the selection of data item with to the selection of deleting control, and make the suitable notice of this data event to application program 204,304.
In response to this data event, application program 204,304 is to the single processing threads 275 of suitable territory 260 assignments of being responsible for handling the data event that is associated with table objects 198.In this main body territory, be also referred to as place, concurrency territory herein, single processing threads 275 enters this assembly territory, and handles this data event in a series of stages.About coming the main body territory of the incident of deal with data driving to assign the detailed description of single processing threads, see following in title " to the multithreading in the concurrency territory " description of statement down to the assembly that is used for via the territory.
Continue current example,, then tasked territory 260 by branch in response to the single processing threads of action data of deletion table entries in case selected the deletion control to come deletion selected data item from table objects 198.In case this processing threads enters this territory, the processing stage of starting first, i.e. read data/request msg stage.For example, during the phase one, read data item or the data value of this data event with the influence of the incident of determining to be subjected in the table objects 198 this data-driven by assembly territory 260.Then, as the part of first operational phase, request is for example deleted the request of selected data item to the change of data from table objects 198.In response, the data connector assembly in the table objects territory is set up the request of deletion selected data item from table objects 198.Being described in detail in below with reference to Fig. 2 B, 3,4,5 of assembly to the application program 204,205 that comprises the data connector assembly provides.In case read data/request msg stage finishes, processing threads will be notified allocator object (following detailed description), next the processing stage can begin.
Next the processing stage comprise that wherein describing engine by application program responds and in data event the change in assembly territory reaffirmed/reconfigure the stage.This reaffirm/reconfigure the stage during, notice and all data connector assemblies that affected data are associated, for example these data item of data connector assembly mark that are associated with the data item that will delete from table objects 198 are for reaffirming/reconfiguring.According to an embodiment, carry out during the son-stage that is marked at read data/request msg stage to influenced data.
In case mark all influenced data item, reaffirm/reconfigure that the stage continues, and process by demand the data item of each mark.For example, the data item that deletion will be deleted from table objects 198, and delete as required or add any territory assembly that is associated.For example, if the result as deletion selected data item need remove the one or more application components that constitute influenced territory 260, then application program is described engine and will be during in response to the stage of reaffirming of data event is described the application program of engine and describe 318 and reconfigure this territory to remove these assemblies in response to passing to application program.On the other hand, if this affected territory needs new application component, then application program is described engine and will be obtained new application component equally and reconfigure to be integrated in the affected territory and to this territory.Thus, affected assembly territory dynamically reconfigures based on the data event that is associated with this territory term of execution of application program.Being described in detail in lower banner " application framework phasing model " of execute phase model that is used for the deal with data incident in the assembly described herein territory 250,255,260 provides.
As mentioned above, each assembly territory is described engine 3 20 by application program and is disposed based on the current demand in 204,304 pairs of assembly territories of application program.And, as mentioned above, when the demand response of application program 204,304 in data events such as the deletion of for example data object, the interpolation of data object or the modifications of data object and when changing, then create new assembly territory as required or reconfigure existing assembly territory.Have the life cycle that equals other assembly in this assembly territory for each New Parent in the locking assembly territory, because give locking assembly territory life cycle when it describes engine instance by application program or when it is described engine and reconfigured by application program, and finish when being dropped in this assembly territory or describing engine and reconfigure by application program subsequently.Thus, giving the locking assembly territory is existence and the function of application and the administrative unit that stop or disappear when follow-up the reconfiguring in this assembly territory in the time durations of the customized configuration in this assembly territory, and wherein the version that reconfigures subsequently in assembly territory is carried out the purpose of management and is considered to a new assembly territory for application program.
More than described and be used for coming the configuration software application program and being used for managing the structure of application program and the application framework of execution, provide the assembly that constitutes given application program and the detailed description of these communication between components below with reference to Fig. 2 B, 3,4,5 via one or more assemblies territory as the set of coupling assembling or figure.In addition, below provide the description of an above-mentioned exemplary embodiment to Fig. 2 B, 3,4 and 5 discussion, wherein application framework is based on the application framework of extend markup language (XML).XML application framework (XAF) provides the method and system that is used to carry out and create software application as mentioned above.XAF is fabricated on standard language, and it represents data change, data event, UI incident or all other generation incidents with standard format in software systems.
In one exemplary embodiment, XAF adopts XML (extend markup language) that data are expressed as the XML data, and application program is expressed as the XML application program.Afterwards, will in description, use XML to represent standard language.Yet, person of skill in the art will appreciate that, the invention is not restricted to use XML.
The XAF software systems are that data focus on, data-driven, and powerful data conversion ability is provided, and include but not limited to mutual from the heterogeneous data in the source of not knowing mutually.All parts of XAF all can be described at or relate to the incident of data, comprise the behavior of application program and User Interface.It is that data creation person and data are patterns of creating that XAF has abandoned application program.On the contrary, XAF makes up application program based on data.In various embodiments of the present invention, the XAF application component in fact based on how video data, data be what and how storage data comes instantiation and interconnection.Thus, XAF can create and sew up " correct " assembly and handle particular data in correct mode when operation.
When making up application program, XAF allows application program " author " to provide about how based on data type and user interface (UI) to create assembly and connect together rule.These rules and assembly can be write with XML.XML allows to be used for to the abundant of current context sensitivity and can organize the UI of structure, and allows the software developer to make up application program with the method for group structure.The software author can be in reducing to the required declarative models of hard coded application logic end-to-end ground construction feature or application program.For example, the software author only need state that a certain specific UI connector and a certain specific UI and a certain specific action match.XAF links together this UI connector and this UI and action then.
In addition, this XML application framework provides the abundant storehouse of assembly, application features and the example application program of prebuild.Although still need some commanding code, XAF is placed on assembly in the storehouse.The storehouse allows other software author to use or utilize these assemblies in declarative models.Thus, the software developer can create its own assembly by generate new commanding code for assembly, but the software author also can adopt the assembly of prebuild to make up new or modified application program and need not to create any commanding code newly.
Exemplary XML application framework 202 is shown in Fig. 2 B.XAF 202 is used to construct and manage the execution such as application programs such as application programs 204.The application program of carrying out in XAF 202 204 comprises one or more UI connectors 206, one or more action 208 and one or more data connector 210.In certain embodiments, application program 204 also comprises one or more memory accesses 212 or one or more transducer 214 and/or 216.Assembly in the application program 204 is used for the UI incident is transformed into the data change and data are transformed into the UI incident.Thus, UI connector 206 is coupled to one or more UI 218 and/or 220.In addition, data connector 210 is coupled to one or more data storage 222 and/or 224.In XAF 202, data event in the application program 204 or data representation adopt standard format.For example, data event and data representation adopt XML.
UI connector 206 provides being connected between application program 204 and one or more UI 218 and/or 220.In one embodiment, UI 218 and/or 220 is the graphic user interfaces to user's display message.UI connector 206 presents and the support application program user edits the ability of the data in the XAF 202.UI connector 206 is mapping (enum) data between XAF data Layer (being represented by data connector 210 and data storage 222 and/or 224) and specific UI 218 and/or 220.In addition, UI connector 206 is operated the UI incident from the data edition that UI 218 and/or 220 is mapped in data storage 222 and/or 224.
The type of the UI element among 206 couples of UI 218 of UI connector and/or 220 is special-purpose.Thus, each UI for the data item in UI 218 and/or 220 represents existence one corresponding UI connector 206.In one example, the data element that is presented in UI 218 and/or 220 such as cell value in the electrical form etc. will have the specific UI connector 206 that is coupled to this data element, and it will convert the UI incident to the user's modification of these data to be connected to the action 208 on the XAF data.Thus, UI connector 206 converts specific UI incident to the XAF action 208 of general expression in XAF application program 204.In one embodiment, all data changes in the application program 204 are represented as the change of XML data.In another example, user-operable is such as user interface controls such as scroll bars.The change of scroll bar has caused the change of the state of UI 218 and/or 220.The UI state changes also can be represented as the data change.Thus, UI connector 206 can receive UI incident such as scroll bar operation for example, convert this UI incident to be used for the XAF data Layer XML data and change incident.
UI connector 206 is connected to action 208 with the UI incident.Action 208 is to be used for the declarative statement that the data of XAF data Layer change.For example, can create " click on scroll bar " incident to user's operation of scroll bar.UI connector 206 is connected to this UI incident such as actions 208 such as " scroll bar are increased progressively a position downwards ".In one embodiment, data change action is represented with XML.For example, the data change can be used as the appearance of XML statement:
<Dropdown?data=$taskpanelist>
<copy?Deltaaction?peform="on?selected?change"
data=selected?value"
target="current?taskPane"/>
Data connector 210 arrangement is gone to and from the data of external data storage 222 and/or 224.Be similar to UI connector 206, data connector 210 in different pieces of information storage 222 and/or 224 inside XAF data representation and the external data type between change.Thus, there is data exclusive data connector 210 in each external data type.Data connector 210 receives action 208, and converts standard format XAF data action 208 to the data dedicated action to influence the data in data storage 222 and/or 224.In one embodiment, data connector 210 converts the XML data action to the data dedicated action.For example, the scroll bar operation of being represented by standard format XML statement is converted into the data storage 222 or 224 that the interfacial state exclusive data changes and be sent to storage specific interface status data.
In addition, data connector 210 converts the change in data storage 222 and/or 224 to the standard format XAF data representation that sends to UI connector 206.UI connector 206 converts standard format XAF data representation to the UI incident that sends to UI 218 and/or 220.Thus, for any change in UI 218 and/or 220, UI connector 206 is connected to action 208 with user interface event.Action 208 is sent to the data connector 210 that action 208 is converted to the special-purpose change of data in data storage 222 and/or 224.In case data are changed, data connector 210 becomes standard format XAF data representation with the data-switching that changes in data storage 222 and/or 224.Data connector 210 sends it back UI connector 206 with the XAF data representation, and it converts the XAF data representation to UI-special-purpose presented event.UI connector 206 sends to UI218 and/or 220 for demonstration with the special-purpose presented event of UI-, and UI 218 and/or 220 shows from the data of the change of UI incident establishment here.
Application program 204 can continue the everything deal with data of generation in the application programs 204 and these the periodic changes between the UI incident.In certain embodiments, the change of the data in the data storage 222 and/or 224 also forces the change of UI 218 and/or 220 and need not to take place customer incident, such as the data of forcing change by another operation outside user's control.
But some optional component in the application program 204 comprises memory access 212 and transducer 214 and/or 216.Memory access 212 is reconciled between action 208 and data connector 210.Be the data of a certain particular type in a certain specific data storages 222 of access and/or 224, action 208 can be specified memory access 212 or " the access model " that is used for these data.Memory access 212 allows the data of application program 204 accesses such as inhomogeneous particular types such as JPEG, MPEG.Thus, regardless of the type of data in data storage 222 and/or 224, application program 204 is interface and change this data all.Memory access 212 guarantees that data connector 210 management comprise as yet any data type of the data type of not design or exploitation.Memory access 212 is transformed into the standard format action data-customization action of standard format.
In other embodiments, one or more transducers 214 and/or 216 are reconciled between data connector 210 and UI connector 206.Transducer 214 and/or 216 will become UI connector 206 and show required UI custom formats from the data output of data connector 210.For example, if the data that UI connector 206 needs in the tabulation, then transducer 214 and/or 216 can become data list with the tabular form data modification by one or more simple changes, and wherein each simple change by single inverter 214 and/or 216 is carried out.Thus, all can be transformed into the form that to accept and to use by UI connector 206 by any type of data of data connector 210 output by one or more gauge transformation devices 214 and/or 216.About such as the going through of the operation of transaction transforms such as transducer 214,216, see with the description under the lower banner " transaction transforms ".
Can utilize the conversion of other type according to various embodiments of the present invention.For example, functional mapping can use such as functional languages such as XQuery and describe.A list of locations is got in agency's (proxy) conversion, and acts on behalf of the data that find in these positions with the form of another name data sequence.Solver (solver) conversion is implemented the solver technology of appointment and support high-speed cache for the purpose of efficient.For example, a solver conversion is found the solution the algebraically equation system in number, and another solver is then found the solution these systems on symbol.High-speed cache and index conversion be data level pass through (pass-through) conversion (that is, output data equals to import data), and high-speed cache and index conversion are added high-speed cache and index to quicken the indexed access in downstream in specified dimension.
According to various embodiments of the present invention, this application framework has adopted the common interface between the assembly of application program described herein.Because this framework depends on herein the data communication between the various assemblies of describing, so the valid data that uniform data structure between the assembly (for example XML etc.) and common interface allow to be used for application deployment and management exchange.
With reference now to Fig. 3,, in various embodiments of the present invention, XAF 300 comprises two or more application programs 302 and/or 304, as shown in Figure 3.Bigger application program 302 can comprise the one or more application programs 306 and/or 308 as submodule or sub-component.All application programs 302 and/or 304 no matter be bigger application program or sub-component, all have such as UI connector 206 connectors such as UI such as grade, such as action actions such as 208 and such as data connectors such as data connectors 210.Thus, application program 306 and/or 308 be particular data element 314 and/or 316 and specific UI element 310 and/or 312 between the operation software module.Application program 302 and/or 304 can be a multithreading, and this shows that they can engage some other application programs 302 and/or 304 and operate.In addition, application program 302 and/or 304 or application component 306 and/or 308 can be constrained to moment or territory, as will be described in detail.
In various embodiments of the present invention, XAF 300 comprises that the XML application program is described (XAD) 318 and the XML application program is described (XAD) engine 3 20.XAD 318 comprises waiting the declarative rule of all application programs and describe such as application program 304 of comprising in the XAF300.The software author is the required application program creation XAD 318 of software author.XAD 318 comprises and is used to pull (pull) or instantiation specific software components and with these component bindings scheme and label together.In various embodiments of the present invention, it is how mutual that scheme and label relate to assembly.Assembly can be UI connector, action, memory access, data connector, transducer or other component software.In certain embodiments, assembly is write with command code, and provides pointwise (point-wise) function to application program.Thus, assembly can be to the bottom software that operability is provided such as XAF assemblies such as UI connector, action, data connectors.
Can use other form to represent although application program describes 318, in one embodiment, XAD318 represents with XML.Label is the XML label.Scheme and label provide sentence structure and the semantic frame that is used to state rule.XAD allows the resource and the order of application author statement range of applications.Order is based on the code bit position of carrying out such as incidents such as click, keyboard selection, voice commands.In each embodiment, the user creates the incident in the user interface, and in other embodiments, another action of certain process can be created incident.Order can be adopted the form of named part, for example changes to select action, editing view action, retrieve data action and edit entries action, as described below with reference to Figure 17.Should be appreciated that these named parts are for purposes of illustration, and be not the order that is applicable to various embodiments of the present invention and/or the restriction of named part.
XAD 318 carries out grammatical analysis by XAD engine 3 20.At first, XAD engine 3 20 carries out grammatical analysis to XAD 318 when starting application program.Afterwards, XAD engine 3 20 carries out grammatical analysis to XAD 318 when needed.For example, according to an embodiment, XAD 318 carries out grammatical analysis with such as reconfigure application program in instantiation and when connecting plug in component in when operation by XAD engine 3 20.According to another embodiment, provide wherein when compiling the compilation model that XAD is carried out grammatical analysis and convert thereof into the mark sequence of explaining when the operation by the XAD engine.When not compiling, when XAD is loaded in the storer, finish the text grammer analysis, and it is stored as data structure.
XAD engine 3 20 processing rules, identifying resource, instantiation assembly and coupling assembling, component and order.Assembly and resource can be commanding codes, such as the executable code of writing with C#.Commanding code has characterized the component software and the software class of the reality under UI connector, action, data connector and other XAF assembly.Assembly is from such as pulling out Component Gallery 322 Component Galleries such as grade.Component Gallery 322 keeps having all component that uses in the Any Application of XAF 300.
Whole assembly set in the storehouse 322 is all available to Any Application.Thus, XAF 300 allows the abundant of code of application programs assembly and these assemblies of establishment to share.In addition, XAF is very extendible, because can be created New Parent and it is stored in the Component Gallery 322 by the software developer.XAD engine 3 20 therefore can the new regulation that the software author is created among the XAD 318 be called by reading, instantiation be connected New Parent.New regulation and New Parent can form new XAF assembly, new data type, new data storage, new UI or or even new application program then.XAD and XAD engine following with more detailed description.
An embodiment of method 400 who is used to carry out customer incident is shown in Figure 4.In this embodiment, customer incident operation 402 at first takes place.Yet, person of skill in the art will appreciate that method 400 not can be used for execution and do not change with the corresponding data of customer incident.As described, data change or the incident that is received by application program can for example be selected to generate in response to the user to the function button in the user interface or control or data object by user action.Data event also can be changed by the outside, is for example received by application program as the result of operation external progress or generates from Another Application program or the third party data that receive of originating.In addition, explain in conjunction with Fig. 2 B that customer incident can be any change of carrying out of user or mutual in such as UI 218 UI such as grade as above.Attended operation 404 is receiving customer incident such as UI connector 206 places such as connector such as UI such as grade, and customer incident is connected to such as corresponding action such as actions 208.
Provide operation 406 to provide the standard format action for the data change of expression in the action.In one embodiment, the action that data change represented to be used in the XML statement.In one embodiment, can choose non-productive operation 408 wantonly is connected to such as memory access 212 memory accesses such as grade action to help to dispose the action of the particular data that is used to change.Memory access sends to the data dedicated action such as data connector 210 data connectors such as grade.Conversion operations 410 receives this data-dedicated action, and converts this standard format action (can be the XML statement) to be used for such as specific data storages such as data storage 222 code and data-dedicated operations.
Making data in data storage changes.Then, data connector reads the data of change from data storage.The data that change are converted into such as standard datas such as XML data representations to be represented.Can be randomly, standard data is represented to be sent to such as transducer 214 transducers such as grade then.Change operation 412 can be chosen wantonly and UI exclusive data statement will be changed into by the data recording that transducer receives.For example, this data change can require to come video data with tabulation.One or more transducers can be classified and create the final data statement that presents data with tabulation the data that retrieve.Transducer will change then and the data of conversion offer such as UI connector 206 connectors such as UI such as grade.
Attended operation 414 receives the data of change then and is connected to show and to provide the data of this change with the UI assembly.Thus, UI provides the view of the data that change now.In one embodiment, it can be user interface state that data change, and the demonstration of the data that change is demonstrations of the user interface of change.As represented, the reception incident, influence that data change and the process 400 of the data of display change is an iteration, and can change each customer incident or data and repeat realization by the flow process that continues to get back to customer incident operation 402.If data change or incident causes or require reconfiguring of application program, then can create and connect and/or reconfigure New Parent as describing below with reference to Fig. 5.
Be used to create with an embodiment of the method 500 of configuring application program shown in Figure 5.Operation (launch) operation 502 starts such as application programs such as application programs 204.In one embodiment, the user is by customer incident, such as starting application program by clicking application icon.504 pairs of parser operation are carried out grammatical analysis such as XAD 318 XAD such as grade.In one embodiment, scheme and/or the rule in grammatical analysis sign and the processing XAD.
Sign operation necessary resource of 506 identification application and/or assembly.In one embodiment, assembly and resource find in such as Component Galleries such as Component Galleries 322.This assembly of instantiation operation 508 instantiations.In one embodiment, the assembly that is identified in the instantiation Component Gallery in form such as the assisting device code in XAD engine 3 20 engines such as XAD such as grade.In another embodiment, one group of interim creator assembly of instantiation.This creator assembly then instantiation about the processing components of input data and the rule that is associated with label among the XAD.
Attended operation 510 connects the assembly of instantiation.In one embodiment, the XAD engine comes coupling assembling according to the customer incident of employed data or processing.In case instantiation has also connected application component, wait for that operating 512 promptly waits for customer incident.Thus, the XAD engine is kept a kind of passive existence (passivepresence) with this application program.XAD engine monitoring data continuously changes, and in response to changing by the data that provide such as data connectors such as data connectors 210.When data change, determine operation 514 specified datas change whether require reconfiguring of application program, as inserting plug in component.If require to reconfigure, then flow process proceeds to parser operation 504 by "Yes".If do not require to reconfigure, then flow process proceeds to by "No" and waits for operation 512.
As described herein, a kind of structure and be used for the application framework of the execution of managing software application programme when being used to given software application generating run is provided.Below be the detailed description of the each side of the invention described above embodiment, comprise the operation of transaction transforms and function, via handling and the application program that is used to generate and reconfigure application component is described the operation of engine in the assembly territory of stage modeling and threading.
Transaction transforms
As mentioned above, the one or more data storage that are used for via one or more connectors receptions and storage data are provided.According to various embodiments of the present invention, data can optionally isolate with data storage by using one or more " transaction transforms ".Fig. 6 shows the tissue of data Layer and shows being connected between data Layer and other assembly that comprises data storage and data client.Transaction transforms 614 comprises the data that are used to store isolation and about the cache module 616 of the status information of data, and binding cache module 616 uses two-stage committing protocols to make the submission of failure needn't cause the control module 618 of loss of data.Below more go through cache module 616 and control module 618.
Data storage 602 and 604 is included in the data on database server or the computer-readable medium.Data can read from data storage and write wherein as described above.Can by the agency who is connected to given data storage send check or a certain other request whether feasible to check that to data storage writes data.If write data is feasible, then indicates certainly one and passes the agency back.Equally, if to write data be infeasible or whether do not know feasible, negate that the agency is passed in indication back then with one.
Data connector 606 and 608 is connected to data storage 602 and 604 with data conversion 610,612 and 614.In one embodiment, realize that in data connector 606 and 608 each agreement is to handle the data storage of one or more types.The data storage of each one or more type of protocol processes is such as using specific format coded data library file.Data modification or the change that receives from data client 622 and 624 submitted on data connector agreement minimum unit ground to.The above UI connector of describing with reference to figure 2B 206 is examples of data client 622,624.
In one embodiment, data connector 606 and 608 is realized minimum unit by conservative concurrency (pessimisticconcurrency).Conservative concurrency relates to the subclass (for example, one or more record) of the data in the locking data storage and revises data to prevent client in the mode that influences other client.In conservative concurrency model, when client executing causes using the action of locking, other client can not carry out will with the action of this locking violation, discharge this locking up to the client that has this locking.This model has a large amount of competitions of data therein and/or wherein to be lower than in the environment of the cost of rollback affairs under the situation that the concurrency conflict takes place with the cost of locking protected data be useful.Conservative concurrency best in the lock time short in, such as use when procedural processings of record.
In another embodiment, data connector 606 and 608 uses the optimization concurrency (optimistic concurrency) that has compensating movement to realize minimum unit.Optimize concurrency and do not utilize locking.When first client needed more new record, this agreement had determined whether another client has changed this record since this record is read for the last time by first client.Optimizing concurrency is useful in having the environment of few data contention.Compensating movement is the action of the effect of compensating transaction.For example, the compensating effect of the bank transfer from account A to account B is that fund with equal number goes back to account A from account B to fund.Similarly, be that cancellation keeps to the compensating movement that keeps hotel room.Compensating movement allows affairs by " rollback ", or is retracted under the situation that does not have residual spinoff or other negative results.Compensating movement is used between two clients rollback affairs when clashing (for example, first client reads a data value, and second client had been revised this data value before first client attempts to revise this value then).In one embodiment, data connector 606 and 608 high-speed caches are respectively from the data of data storage 602 and 604.If the data that data client is asked by the data connector high-speed cache, then need not to inquire about the data of being asked to corresponding data storage.Data connector will more go through hereinafter.
Data conversion 610,612,614 and 620 is encoded and/or decoded data according to the predefine rule.Data conversion 610,612,614 and 620 realizations can be carried out the function of the processing of any complexity.Data conversion 612 and 620 serial each other.Therefore, the result of the function that is realized by data conversion 612 is as the input of the function that is realized by data conversion 620, and vice versa.In one embodiment, data conversion can be connected the result with the previous conversion of buffer memory serially, and allows easier and Modularly realization sophisticated functions.Equally, (seeing below) can be submitted or refresh to the subclass of the data in the view under the situation that does not influence the remainder data in the view.
Data conversion 614 is a kind of special data conversions that are called transaction transforms, and similarly comprises cache module 616 and control module 618.In one embodiment, transaction transforms allows the data minimum unit ground of isolation and submits in data consistent mode between data storage.The isolated data that cache module 616 keeps from data client 622 and 624.In one example, data client 622 and 624 is the dialog boxes that are used for the data of editing data storage 604.The editor that data are made can be stored in the cache module 616 when making editor fully.In another embodiment, transaction transforms will shine upon the edit requests of back stitching to its input at the edit requests of its output.As a result, when making when editor, input/request entity is identified as this editor and finishes.In addition, these transaction transforms use its buffer memory 616 to allow these editors' delay and controlled mapping, will be as discussed below.
Can carry out the control operation of some types by transaction transforms.When the user wishes in data client 622 or data client 624 to submit data to (for example, when activating " application " button that is associated with data client), control module 618 receives from this data client and submits control operation to, and attempts to use the two-stage concurrency agreement below in conjunction with Fig. 6 discussion to submit data to.In one embodiment, data in buffer can deletion after in a single day successfully submitting in the cache module 616.When the user wished data (and data are displayed in the corresponding data client thus) in the flush buffers, control module 618 received refresh control operation from this data client, and the data in the flush buffers module 616.The data that refresh are transmitted to data client, make the user-accessible data updated.The ability that refreshes isolated data can replace the submission in tradition two-stage concurrency model to use, as discussing below with reference to Fig. 6.
In some cases, useful is to upgrade the data in the buffer memory and not submission that discarded one or more users use one or more data client to make changes.In this case, can send the synchro control operation by data client.When control module 618 when data client receives the synchro control operation, upgrade isolated data in the cache module 616 based on the latest edition in the data storage, and will be to the not submission change and data updated merging of isolated data.Synchronizing process to two or more sets changes of data is known in the art, and can use in all cases synchronously.About how realizing in given context that synchronous details is very specific for this context.For example, in the context of product database, the line of the product in the merge database is acceptable, and still merging is unacceptable to the change of two kinds of versions of the title of a product.Other context can have and is used for synchronous Else Rule, and all these can use in conjunction with the present invention.It also is known managing conflict.Can provide and follow about which renewal under the situation of conflict material pre-defined rule should be arranged.Other embodiment can remind the user to solve these conflicts.
Cache module 616 is safeguarded the status information that can change based on current afoot operation types.For example, if submit well afoot to, then status information can comprise that it is co-pending, successfully or failure submitting to.Perhaps, if refresh well afoot, then status information can comprise and refreshes co-pending or finish.If the synchronous operation well afoot, then status information can comprise be synchronously co-pending, successfully or the failure.Below more go through specific control operation.
Addressable some data of data client may not need to isolate.For example, the change of financial database (such as being used to follow the tracks of bank account) is normally submitted to immediately.In one embodiment, given Data View can comprise and isolating and isolated data not.In another embodiment, given data client can comprise the read-only data that can not edit in data client.
In response to receiving application specifications from application developer, one embodiment of the present of invention identify this application program which partly need isolated data and realize transaction transforms as required.Fig. 7 shows the operating process of transaction transforms operation.Receive operation 702 and receive application specifications.In one embodiment, application specifications has been specified the XAF application program, comprises which data should be isolated, and sign operation 704 identifies and the tag application program is interior with segregate corresponding data entity.
Realize one or more transaction transforms that operation 706 realizes corresponding to each data entity that is marked as the data entity that will isolate.Transaction transforms is then to be connected with the essentially identical mode of data conversion and to activate.
Fig. 8 shows the control operation that operation is carried out according to transaction transforms.Receive operation 802 and receive the control operation request from data client.In one embodiment, this request triggers by the UI control that user's click is associated with data client.Determine whether operation 804 definite these control operation requests ask submit operation.If this control operation request is at submit operation, then flow process is branched off into by "Yes" and sends operation 908 (Fig. 9).If this control operation request is not at submit operation, then flow process branches no to and determines operation 806.
Determine whether operation 806 definite control operation requests ask synchronous operation.If this control operation request is at synchronous operation, then flow process is branched off into to send by "Yes" and preserves operation 808.If this control operation request is not at synchronous operation, then flow process branches no to refresh operation 810.
If asked synchronous operation, then preserve this data in buffer that changes to that any not submission is preserved in operation 808.Submit to change a file that can be saved on the computer-readable medium, the Computer Storage that arrives volatibility or nonvolatile memory or other form, perhaps be submitted to external data base or similarly service.Flow process advances to refresh operation 810 then.
The fresh copy of the data in buffer that exists in the refresh operation 810 retrieve data storages, and place it in buffer memory that transaction transforms is associated in.Refresh operation 810 may require to inquire about the plurality of data storage and comprise the fresh copy of these data to determine which data storage.In another embodiment, refresh operation 810 checks that alternately or in addition the data connector that is associated with each data storage checks whether this data connector comprises the cached copy of data in buffer with adding.
Determine whether operation 812 definite these control operation requests ask synchronous operation.In one embodiment, determine that 812 of operations need to check the result who determines operation 806.If the control operation request is at synchronous operation, then flow process is branched off into union operation 814 by "Yes".If the control operation request is not at synchronous operation, then flow process branches no to the end of operating process.
If asked synchronous operation, then union operation 814 will by preserve that operation 808 preserves to data cached change and the data cached merging that refreshes by refresh operation 810.The rule of data subject that is used to merge two kinds of versions is based on the context of application program and change.Some exemplary rules presents in conjunction with Fig. 6.In one embodiment, a plurality of changes from the different pieces of information client can be combined to realize the synchronism in each data client.
Fig. 9 shows the request of submitting to of handling how according to one embodiment of present invention.Receive operation 902 and receive data from data client.In one embodiment, data client is the dialog box that application user is used to import data, and data send when the UI control that is associated with this dialog box is activated.Caching 904 then with metadata cache in one or more transaction transforms or with storer that these one or more transaction transforms are associated in.
When receiving operation 906 and receive request to submit operation, call modified two-stage committing protocol.At first, send operation 908 and send the request of submitting to a plurality of data connectors that are associated with data storage.In one embodiment, submit to request to comprise the data that to submit to.Submission is asked by one or more data connectors of these data of high-speed cache and/or is kept one or more data storage of these data to be received, and as being treated by the request of the assurance of minimum unit ground submission data.Receive operation 910 and receive response from data connector and/or the data storage that keeps these data.In case receive all responses, determine that operation 912 determines whether that all take over partys of this submission request agree to submit to.If all take over partys agree that then flow process is branched off into transmit operation 914 by "Yes".If be not that all take over partys agree, then flow process branches no to transmit operation 916.
If all take over partys agree to submit to data, then transmit operation 914 to by send the operation the 908 submission requests of sending all take over party's submiting commands.The take over party submits these data (that is, change with this upgrade its oneself data) to.
If be not that all take over partys agree to submit to data, then transmit operation 916 sends the abort order to the take over party.Therefore the take over party knows that the submission of suggestion can not take place, and any data that are associated with this submission can be dropped.In one embodiment, transmit operation 916 only sends the abort order to the take over party who agree to submit data to, and disagrees with that the take over party who submits data to abandons these data automatically and need not to order it to do so clearly.Then, refresh operation 918 is carried out the data that refresh control operates flush buffers.In one embodiment, refresh operation 918 changes into and carries out the data that synchro control operates synchronization caching.
Other embodiments of the invention have also been conceived.In one embodiment, each transaction transforms can comprise the policy module of implementing synchronization rules.In another embodiment, policy module is given for and refreshes and synchronous concurrency strategy.Exemplary concurrency strategy comprises conservative concurrency (conservative concurrency) (wherein always making the complete copy to all data in buffer) and optimize concurrency (wherein data only are copied in the buffer memory) when requiring.Policy module also can allow policy moduleization ground to add to handle the control operation of other type of not discussing herein.
In another embodiment, can use transaction transforms to visit and deal with data in conjunction with query language.SQL (Structured Query Language (SQL)) is widely used a kind of such query language.XQuery is another kind of such query language.Also conceived the use to other query language in conjunction with the present invention.
In another embodiment, the part that data connector 610 can provide and (to a certain extent) manages buffer memory, for example buffer memory among Fig. 6 and logic 616.In this case, connector has visit and/or handles data in buffer refreshing and/or the logic of Synchronization Component with control data.
Application framework phasing (phasing) model
As above briefly describe, application program and/or application component can be constrained to some stage.Generally speaking, retrain the execution of software approach in computer system by making component software obey the multilayer phasing model stage by stage.Component software can be other software code construct in class, object, method or the computer system.Stage is while and the common mode of operation of being shared by one group of component software.Computer system is carried out the top layer phasing model, be also referred to as main phasing model, and takes place one or more son-stage during one or more stages of this main phasing model.Operation in the computer system is constrained to one group of stage or son-stage.
An exemplary embodiment of multilayer phasing model 1000 is shown in Figure 10.This multilayer phasing model has first or the main stage model that comprises three phases 1002,1004 and 1006.The main stage is with occurring in sequence of being described by arrow 1016.In two son-stages, promptly son-stage 11008 and son-stage 21010 took place during the stage 11002.In addition, in addition two son-stages, promptly son-stage 2a and son-stage 2b took place during son-stage 2.Thus, phasing model 1000 has represented to have one group of multilayer stage in the son-stage of taking place during other stage or son-stage.Hereinafter, any discussion to the stage also can be applicable to son-stage.
Each component software is restrained in a moment and operates.Each software approach is imposed restriction only to carry out during the stage that this software approach is constrained to or to be called.Can cause the software approach of conflict or contradictory outcome to be constrained to the different stages, just can not be called legally from the current generation at this this software approach.Thus, each software approach is carried out in known manner and can not produced conflict between the method for finishing the contradiction task.All methods are all carried out under a specific phase constraint, make software systems be called as to be in the compatible state of current generation constraint in.
Refer again to Figure 10, the stage 11002 is the superphase in son-stage 11008 and son-stage 21010.In addition two son-stages, promptly son-stage 2a1012 and son-stage 2b1014 took place during son-stage 21010.Equally, son-stage 21010 is superphase of son-stage 2a1012 and son-stage 2b1014.Any stage or son-stage can have son-stage.For the number of plies in the son-stage in the multilayer phasing model without limits.In addition, in any stage space, must there be at least two stages, but to the number of stages on two stages without limits.In addition,, then must there be at least two son-stages in superphase if son-stage is arranged, but to the number in son-stage of during any superphase on two son-stages, taking place without limits.Any son-stage group can be during superphase circulation primary or repeatedly.
Stage model 1000 shows stage space.Stage space is a limited digraph of determining effective stage (node of graph) and effective phase transition (limit of figure).Therefore, stage space has been determined effective sequence of stages.Stage space 1000 was defined within on phase set phase 11002, stage 21004 and stage 31006.Stage space 1000 also has three phases conversion 1018a, 1018b and 1018c.When phasic change took place when phase transition was represented to share all component softwares in pre-converted stage.
Share a stage during space when component software, these component softwares are parts of phase domain.Phase domain is one group of software of reaching an agreement to by the public phasing model of moment definition space.For example, all component softwares of agreeing to be had the main stage space constraint of main stage 1002,1004 and 1006 are parts of main phase domain.Thus, all component softwares that are associated with component software in the main phase domain comprise with main stage 1002,1004 and 1006 at least one phase constraint that is associated.
Phase constraint is to be limited in the effectively static constraint in stage in a certain program context.Especially, constraint can be applied to program segment, thereby asserts that this program segment only carries out during deferring to the stage of this constraint.In one embodiment, phase constraint is written as the attribute in the bracket, such as [Phase1].This data structure will be explained in more detail following.
Computer environment 1100 with the one or more assemblies that occupy one or more phase domain is shown in Figure 11.The conversion and the foundation of the main stage space of main guidance device 1102 controls.All component in this computer environment is the part of main phase domain 1100, but can occupy one or more son-phase domain.For allowing establishing stage territory 1100, strategy that program author needs the choice phase space, the execute phase changes on this stage space and the strategy of handling the message of striding the phase domain border.
Phase domain 1100 can be characterized by the multilayer stage space.In various embodiments of the present invention, register to main guidance device 1102 such as one or more assemblies such as assemblies 11104.The software construction of assembly 11104 expression any kinds comprises component software or method.Component software 1104 is restrained to one of stage in the main stage space.
In other embodiments, register to main guidance device 1102 such as one or more son-guidance devices such as son-guidance device 11106 and son-guidance devices 21108.Son-guidance device control has one or more other phase domain in one or more different phases space.Thus, phase domain 1100 has one or more nested phase domain.Be restrained in son-stage space and one or more son-stages in one or more main stage of main stage space such as assembly 21110 all components such as grade to son-guidance device 11106 registration.In one embodiment, operate in the single main stage by the son-phase domain of son-guidance device control.The operation in son-stage can repeat to take place during the single main stage.
In various embodiments of the present invention, such as son-guidance device 2-guidance devices such as grade to wait registration of other son-guidance device such as son-guidance device 3 to create further nested son-phase domain.In certain embodiments, son-guidance device operation 21108 Control Components 31112 and son-guidance device 31114.In other embodiments, control such as above assemblies such as assembly 41116 and assemblies 51118 such as son-guidance device 31114 guidance devices such as grade.Each son-guidance device may command has the stage space of unique stage.Thus, son-guidance device 11106 operation first son-stage spaces, and son-guidance device 31114 operation second son-stage spaces.If two-stage space is not mutual, then stage space is called as orthogonal intersection space.The combination of orthogonal phase spaces can form cartesian phase space, and it can be used for being formed for the phase domain of single product.Bottom stage group is the cartesian product of orthogonal phase group, and wherein effectively phase transition also is the cartesian product of effective conversion of orthogonal phase group.
In various embodiments of the present invention, guidance device is a logical timer.The clock that guidance device is similar in the hardware system cycles through each stage.When each phase transition, guidance device changes the stage of all component softwares in the phase domain simultaneously.In one embodiment, any son-guidance device can change the son-stage in son-phase domain simultaneously.Logical timer is waited for the operation in the stage that is restrained to or is being constrained in finishing of the operation carried out in the son-stage in this stage.
An exemplary embodiment of stage space 1200 that can be used for main phase domain is shown in Figure 12.Stage space 1200 has three phases.During read request phase 1202, request that will read or write data or other software command or the request queue in the software systems are up to entering next stage.In one embodiment, only the non-repetition methods of some of being asked was carried out in next stage, and other method is waited for next circulation in another stage or stage.
Update stage 1204 will be ordered and request is directed to the appropriate software assembly.In various embodiments of the present invention, in update stage 1204, software components fulfill commands or request.In one embodiment, update stage 1204 has the son-stage space 500 that takes place during update stage 1204.A shown in Figure 5 and explanation hereinafter of example temper-stages 500.In one embodiment, update stage 1204 triggers the son-stage that is used for data Layer.In other words, any request that data are write realized in the son-stage of update stage 1204.
Phase III, reaffirm that promptly the stage 1206 is instructed and execution untreated other method during update stage 1204.In one embodiment, all requests of retrieve data are finished during reaffirming the stage 1206.For example, in update stage 1204, upgraded data after, notify all component softwares that the data change has taken place, and notified software components retrieve data updated.In one embodiment, reaffirm stages 1206 operation son-stage space 600.The exemplary embodiment 1300 of son-stage space is shown in Figure 13 and in following description.
For a change the stage, stage space 1200 passes through phase transition.In this exemplary embodiment, three phases conversion 1208a, the 1208b and the 1208c that have the conversion between the expression three phases 1202,1204 and 1206.As mentioned above, phase transition is to change the stage clock such as guidance device 1102 guidance devices such as grade, and is used for the time point that stage of all component softwares changes simultaneously in the phase domain.
To can taking place of the component software in the phase domain about the current generation or to the prompting or the notice of the conversion of new stage.In one embodiment, all component softwares of guidance device notification phase.In other embodiments, requesting method requires the stage to guidance device.In various embodiments of the present invention, the conversion notice is sent to the one or more component softwares in the phase domain.In one embodiment, conversion notice takes place during the current generation or at the place that begins of next stage.In other embodiments, notification procedure is adopted the independent stage.For example, stage space 1200 can have three notification phase that are positioned at conversion 1208a, 1208b and 1208c place, is used for the component software in the notification phase territory.
An example temper-stage space 1300 of update stage 1204 is shown in Figure 13.Son-stage 1300 is used for data Layer in certain embodiments.In other words, the method that is used for data are write shared data structure is restrained to one of son-stage of data-stage space 1300.In one embodiment, all component softwares of sharing these data agree to submit to this change or abort to change in the contract stage 1302.This changes submitted or abort in submission or abort phase 1304.
In another embodiment, contract stage and submission or abort phase are the son-stages in " submitting to or abort " son-stage 1304, and son-stage space 1300 has marking phase 1302 but not contract-stage 1302.Herein, data change submit to or abort phase 1304 in makes, and use all component softwares of this data to be labeled to be used for upgrading at marking phase 1302.The marker software assembly is that sign is set in component software, retrieves data updated with this component software of signaling in suitable later phases.In one embodiment, the component software of mark is being reaffirmed stages 1206 retrieve data.In another embodiment, marking phase 1302 has two son-stages: mark-stage and final mark-stage., use the component software of these data to be labeled in son-stage herein at mark, and in final mark retrieve data in son-stage.
Another example temper-stage space 1400 that takes place during reaffirming the stage 1206 is shown in Figure 14 A.Be constrained in an exemplary change in the software construction of son-stage space 1400 shown in Figure 14 B.Son-stage space 1400 is provided for the son-stage of plug-and-play operation.Plug and play-stage space 1400 has two stages: with son-stage 1404 and slotting son-stage 1402.Generally speaking, in slotting son-stage 1402, set up, change or remove the combination and the configuration of component software, but do not carry out any service time of function.Equally, with in son-stage 1404,, do not make up or the configuration aspect but do not set up, change or remove to combination or the configuration that conventional func uses component software to set up.
The exemplary embodiment that module reconfigures is shown in Figure 14 B.In this embodiment, software module has first configuration 1406.Import a certain action such as request such as the user after, software module changes second configuration 1408 into.Person of skill in the art will appreciate that software module is differently operated in first configuration 1406 with in second configuration 1408.Thus, reconfigure should with this software module mutual with the stage during do not have method to carry out situation under take place.In various embodiments of the present invention, in slotting son-stage 1402, software instances is initialised, connects or disconnects, and sets a property.In certain embodiments, other son-stage helps customization inserting the operation of carrying out in son-stage 1402.
In one embodiment, slotting son-stage 1402 has other son-stage.Constructor-stage 1410 by the known class of instantiation, call component software or use interface on the existing example obtain one the clone's or the example of being derived specially create new software instances.At last, initial beggar-stage 1414 sets a property and requires negotiation between the correct example that connects.Son-the stage of inserting in son-stage 1402 can be departed from son-stage presented herein.In addition, this son-stage 1404 also can comprise son-stage.
Conceived other space stage by stage.For example, conceived the son-stage space that is used for the user interface change.In user interface-stage space, invalid son-stage can allow to be used to make up the execution of the method for structure.Son-the stage of drafting is drawn the structure structure then.As skilled in the art will recognize, can be to other stage space of manipulating of other type.In addition, person of skill in the art will appreciate that the above exemplary stages space that presents can change aspect the number of the number in stage or son-stage, layer or level and the type in stage or son-stage.Thus, the present invention is extendible.In one embodiment, new superphase is superimposed on the existing stage space.In another embodiment, the new stage is added to existing stage space.In some embodiment that also have, add the new layer of son-stage more how or son-stage space to existing stage space.
Exemplary embodiment of data structure 1500 with phase constraint that the code constraint item carries out is shown in Figure 15.Data structure 1500 is code elements.The code of any kind can have phase constraint.Phase constraint 1502 is shown on the method 1504.Phase constraint 1502 is the stage " execution " with the stage of operational constraints appointment in phase constraint of method 1504 in the present embodiment.Thus, method 1504 is only carried out during son-stage in " execution " stage or " execution ".
In various embodiments of the present invention, data structure comprises the form of the constraint of depending on component software and performed operation types.In one embodiment, constraint is a call constraint.Call constraint is constrained in specified phases with method call.Thus, the execution of the method in other component software or same component software is restrained by limiting these methods only to start during specified phases.In another embodiment, constraint is the constructor constraint.Constructor is the method for a kind of special shape of instantiation component software.Thus, the instantiation of component software is restrained to specified phases, such as what explained for the constructor-stage among Figure 14 A 1410.In another embodiment, constraint is a reference constraint.Reference constraint constrains the whole class of component software and such all primitive operations.For example, the reference constraint that docking port applies has limited the connection between the software module, as what explained for the connexon-stage among Figure 14 A 1412.
Constraint is expressed by the phase constraint attribute that can be assigned to any target software assembly in the software code.In various embodiments of the present invention, phase constraint attribute is assigned to whole class and is hereditable.Thus, child's assembly is inherited constraint from its parent component.In certain embodiments, scheme applies a plurality of phase constraint attribute to same target stage by stage.Thus, software object retrains by the combination of a plurality of phase constraint.
Each constraint is the constraint to " type " that is associated with the level in specified stage.Thus, the constraint of appointment superphase is the constraint to " superphase ".The constraint in the son-stage of appointment is the constraint to " son-stage ".To the constraint as the type in son-stage is to the constraint about the union of all constraints of " superclass type ".Relation between the constraint of type is used by compiler or used when moving to check the validity of the restriction relation between the different software assembly.
Implementing constraint can take place when operation or when compiling.When compiling, can check constraint to type.The combined method rule that compiler can contrast the method (it calls the method that has the constraint of subtype) that is used to have to the constraint of type is checked to the constraint of type and to the constraint of subtype.If the constraint of subtype with identical to the constraint of type or than a little less than it, for example, if the slotting stage 1402 has been specified in the constraint of type, and has been specified initial beggar-stage 1414 to the constraint of subtype, should the constraint scheme be effective then.In this embodiment, initial beggar-phase constraint 1414 was carried out in slotting son-stage 1402, and was more weak constraint therefore.If to the constraint of subtype with the constraint of type is mutually disjointed, for example,, and opposite slotting son-stage 1402 has been specified in the constraint of subtype if the constraint of type was specified with son-stage 1404, then constraint scheme is invalid.If to about beam intensity of the constraint of subtype comparison type or overlap, for example, if slotting son-stage 1402 has been specified in the constraint of type, and initial beggar-stage 1414 has been specified in the constraint of subtype, then constraint scheme is effectively, but must stand a certain dynamic chek.In this embodiment, if the operation in slotting son-stage 1402 and initial beggar-stage 1414 of current while of phase domain, then this invocation scheme is effective.Yet, if the territory not in one of two son-stages, this scheme is invalid.Other legitimacy rule is also conceived and is attached among the present invention.
Be used for multilayer stage by stage an exemplary embodiment of the method 1600 of territory operational computations machine environment shown in Figure 16 A and Figure 16 B.After beginning, conversion operations 1602 is transformed into the phase one, as request stage 1202.In one embodiment, start such as main guidance devices such as main guidance devices 1102.In one embodiment, be restrained to one of main stage of main guidance device registration such as assembly 1104 assemblies such as grade.Main guidance device incipient stage clock is to cycle through logical time such as the stage in stage space 1200 stage spaces such as grade.
Determine that operation 1604 determines whether to be restrained in the main stage first such as any component softwares such as assemblies 1104.If a component software is restrained to the phase one, then executable operations 1606 is carried out this component software during the phase one.If do not have component software to carry out or component software the term of execution, determine that then operation 1608 determines whether the son-stage space that takes place during the phase one, such as son-stage space 1300.If there is not son-stage space to take place during the phase one, then this process advances to the conversion operations 1622 shown in Figure 16 B by connector 1.
If the son-stage space that takes place during the phase one is arranged, then sign operation 1610 identifies this son-stage space and suitable son-stages.In one embodiment, be activated such as son-guidance device 1106-guidance devices such as grade and register to the main guidance device of the main stage space of control.Son-guidance device begins son-phase logic clock to cycle through each the son-stage in son-stage space.Determine that operation 1612 determines whether to be restrained to any component software in current son-stage, as assembly 1112.In one embodiment, be constrained in the component software of son-stage space to son-guidance device registration.Thus, under main phase domain, created nested son-phase domain.If in being constrained in the son-phase domain in current son-stage component software is arranged, then executable operations 1614 is carried out these component softwares during current son-stage.Determine that operation 1616 determines whether other the son-stage space that takes place during current son-stage, such as son- stage 1410,1412 and 1414.If other son-stage is arranged, then this process turns back to sign operation 1610 to identify other son-stage.
If there is not other son-stage space to identify, determine that then operation 1618 has determined whether that any other son-stage space is left to take place in current son-stage space.If there is another son-stage to take place in current son-stage space, then conversion operations 1620 is transformed into the next son-stage in son-stage space.In one embodiment, son-director waits, all threads in current son-stage are performed, and are transformed into next son-stage then.Then, this process advances to once more and determines operation 1612.If in not remaining any son-stage in current son-stage space, determine then operation 1618 determines whether another superphase that will be transformed into is arranged in any superphase space.If another superphase is arranged, then conversion operations 1620 is transformed into next superphase.This process (is determined the son-stage in the superphase; Executive software assembly in son-stage; Next son-the stage that is transformed into finished up to all son-stages; And be transformed into next superphase then) repeat, be transformed into next main stage up to having cycled through all son-stage spaces and requirement.In case son-step cycle finished the first main stage, then this process advances to the conversion operations 1622 shown in Figure 16 B by connector 1.
Conversion operations 1622 is transformed into next main stage, as update stage 1204.In one embodiment, all threads of carrying out in the phase one of main director waits finish.Then, main guidance device changes the logical stage clock into next stage.In certain embodiments, main guidance device is followed the above transformation rule of listing with reference to Figure 11.Similar operation when this process is followed then and taken place as the phase one that is used to the son-stage that identifies.Thus, no longer discuss about some details of son-phase process herein, but person of skill in the art will appreciate that how will be implemented to about the details that the phase one describes in any subsequent process that is constrained in next stage.
Determine that operation 1624 has determined whether that any component software is restrained to the current main stage.If the component software that is restrained to next main stage is arranged, then executable operations 1626 is carried out this component software.In each embodiment, these component softwares are to main guidance device registration.These component softwares continue as the current generation and main guidance device is consulted.When phase transition and main guidance device reported that this territory is now in next main stage, the component software that is constrained in next main stage began to carry out.
If be not constrained in next main stage component software or the component software of constraint the term of execution, determine then operation 1628 determines in the current main stages whether any son-stage space is arranged.If son-stage space is arranged, then sign operation 1630 identifies these a little-stage spaces and is transformed into first son-stage.Determine that operation 1632 has determined whether that any component software is constrained in current son-stage.If the component software that is constrained in current son-stage is arranged, then executable operations 1634 is carried out this component software.
If be not constrained in current son-stage component software or these component softwares the term of execution, determine then operation 1636 determines in current son-stages whether other son-stage space is arranged.If other son-stage space is arranged, then this process turns back to sign operation 1630.If there is not other son-stage space in current son-stage, determine that then operation 1638 determines whether next son-stage in current son-stage space or next superphase in the superphase space.If next son-stage or superphase are arranged, then conversion operations 1640 is transformed into next son-stage or superphase.If under the current main stage, do not have next son-stage or superphase, determine that then operation 1642 has determined whether next main stage, such as reaffirming the stage 1206.If next main stage is arranged, then this process turns back to conversion operations 1622.If there is not another main stage in the main stage space, then this process turns back to conversion operations 1602 by connector 2 and circulates by being transformed into incipient stage phase one.
Be further to explain the present invention, be described in the exemplary computer system that multilayer is operated in the territory stage by stage below with reference to Figure 17.This exemplary computer system is operated individual contacts application, such as
Figure A200680014594D0037163724QIETU
Figure A200680014594D0037163712QIETU
Message communicating and collaboration client program.Herein, the one or more contact persons in the user interface explicit address book.User interface has master view window 1702.Front view 1 702 shows the All Contacts and allows the user to select the contact person to check more details about this contact person.
Computer environment 1700 is operated under stage space.For unrestricted for the purpose of explaining, total system 1700 is in 1200 times operations of stage space shown in Figure 12.In addition, for illustrative purposes, computer system 1700 is current to be in request stage 1202.Thus, computer system 1700 allows wherein to receive any operation of request or order.Thus, receive the user command 1716 of the detailed view 1704 check the contact person and being placed in the formation.In addition, order 1718 is sent to the details that address book module 1708 is asked with retrieval.Request of data 1718 is also lined up.
Main guidance device 1102 changes the stage in the computer system domain 1700 into update stage 1204.Herein, order 1716 and 1718 is sent to selection mode module 1706 and address book 1708 respectively.During update stage 1204, be transformed into the user interface-stage space that is used for reference to Figure 14 explained the change of user interface as above.Invalid son-stage begins.The order 1716 that is used for detailed view 1704 begins to handle.View in the Front view 1 702 is disabled.For example, the selection to detailed view 1704 is set as non-activity.In addition, Front view 1 702 is set as inactive window.Territory and user interface item that detailed view 1704 usefulness are suitable are created.User interface-guidance device is transformed into drafting-stage then.Drawn to be revealed as non-activity to contact person's selection in the Front view 1 702, for example the selection of highlight changes color.Front view 1 702 is plotted as non-activity.For example, Front view 1 702 panes change color to represent that it is non-activity.Detailed view 1704 usefulness user interface elements are drawn.Field stays open to receive data from address book module 1708.
Main guidance device 1102 all in the user interface subspace are invalid finishes the stage of reaffirming 1206 that is transformed into afterwards with the drafting constraint manipulation.During reaffirming the stage 1206, carry out data retrieval operation.In one embodiment, data retrieval operation is restrained to data retrieval-stage space.Data retrieval-stage space has two son-stages, i.e. mark and finally mark, and Figure 13 explains as reference.Start mark-stage.Address book searches needs the software module of Data Update.Mark detailed view 1704.Be used for the son-stage space conversion of the son-guidance device retrieval of data to final mark-stage.In son-stage, address book 1708 is the required associated person information of retrieval from one of following three data storage: exchange server address book 1710, client address book 1712 or MSN address book at final mark.After retrieving associated person information, address book 1708 writes detailed view 1704 with associated person information.
After having finished all operations that is constrained in the stage of reaffirming 1206, main guidance device 1102 conversions are returned hospitality the stage 1202 of asking.Herein, user interface takes orders and asks from user input device once more.The user imports the change to associated person information in detailed view 1704.For example, the user changes contact person's address.Order 1720 sends to address book 1708 (original text 1704, mistake) to change data from detailed view 1704.In addition, order 1722 is sent to selection mode 1706 to upgrade the view of Front view 1 702 and detailed view 1704.In this embodiment, order will be lined up, and main guidance device 1102 is transformed into update stage 1204.Update stage 1204 log-on datas are write son-stage space, such as son-stage space 1300.
In contract (agreement) son-stage 1302, address book changes request with data and sends to plurality of data storage 1710,1712 and 1714.One or more copies that comprise the data that change in the detailed view 1704 in the data storage.Thus, each data storage with these data must agree to change data.Thus, during contract-stage 1302 voting process takes place.If all data stores agree are submitted this change to, then this contract is beamed back address book 1708.Son-guidance device will change in the stage to be submitted to or abort phase 1304.Herein, the data change is sent to data storage and is used for more new data.
Simultaneously, during update stage 1204, user interface-stage space takes place.Selection mode 1706 will comprise the partial invalidity of legacy data in Front view 1 702 and the detailed view 1704 in invalid son-stage.In the son-stage of drafting, repaint Front view 1 702 and detailed view 1704, thereby data have for a change kept the space.After finishing in update stage 1204 in all son-stages, phase domain 1700 is transformed into the stage of reaffirming 1206.
Reaffirming in the stage 1206 that other son-stage space comprises the son-stage that is used for mark and final mark.Be transformed into marking phase, address book 1708 is labeled as the data that need change with Front view 1 702 and detailed view 1704.In son-stage, the data of change are written into Front view 1 702 and detailed view 1704 at final mark.These changes can take place in the very short time and with meticulous granularity.For example, the stage circulates in the moment of second after the user imports each character and part.Thus, change appears to be immediately and takes place.
How this example shows intrasystem method carried out and applies multilayer and retrain stage by stage.If order and change take place under situation about not having stage by stage, then Front view 1 702 and detailed view 1704 may be updated before all data storage change data.Therefore, the user can be depending on attempt to change data and more the order of the new user interface method of attempting check and attempt 1704 or the main mixing resultant of attempting in 1702 in detail.
Utilize the multithreading in concurrency territory
As above briefly describe, application program and/or application component can be restrained to moment or moment territory.According to various embodiments of the present invention, the assembly of software application can be divided into independent territory, is used for providing in the assembly subregion synchronously and improved concurrent operations between the assembly subregion is isolated and be used to provide to thread.Figure 18 shows an example system that is configured to carry out concomitantly a plurality of objects according to an embodiment of the invention.Example system 1800 comprises concurrency territory 1801, and it is all to be to carry out on single thread 1802 and the not directly set (or subregion) of (for example, synchronously) one or more single-threaded objects 1803 of communicating by letter with external object 1810.Internal thread 1802 is carried out object 1803 according to the logic that is applied by concurrency territory 1801.Internal thread 1802 is the single-threaded object 1803 in the execution concurrency territory 1801 only.Internal thread 1802 is not carried out any external object 1810.
According to an embodiment, same thread need not all to be used as internal thread 1802 between the whole lifetime in concurrency territory 1801.On the contrary, when not having the object requirement to carry out on internal thread 1802, the thread that is used as internal thread 1802 can turn back to the thread pool (not shown).When requiring a thread once more, can from thread pool, pull out a new thread to be used as internal thread 1802.According to another embodiment, one of single-threaded object 1803 has thread affinity (affinity), this means that single-threaded object 1803 need carry out on same thread.In this embodiment, same thread is used as internal thread 1802 between the whole lifetime in concurrency territory 1801.According to an embodiment, less important thread 1804 discussed in detail herein also distributes from thread pool.
Still with reference to Figure 18, system 1800 also comprises at least one less important thread 1804 and at least one external object 1810.The embodiment of external object 1810 is included in any object of carrying out on one or more less important threads 1804.Less important thread 1804 comprises any thread except that the internal thread of carrying out 1802 in the application program that is associated.As mentioned above, the example concurrency territory 1801 shown in Figure 18 comprises internal thread 1802 and a plurality of single-threaded object 1803.These single-threaded objects 1803 only use internal thread 1802 to carry out.
Object 1803 in the concurrency territory 1801 is isolated with all the other less important threads 1804 and external object 1810 in the program.Any single-threaded object 1803 that less important thread 1804 does not comprise in the execution concurrency territory 1801.Each external object 1810 is configured to carry out on less important thread 1804 one or more.External object 1810 is communicated by letter asynchronously with the single-threaded object 1803 in the concurrency territory 1801.Communication is included in Data transmission between the object or by the method for an object of another object reference (for example, or task).
The asynchronous communication of striding 1801 borders, concurrency territory realizes by using border object 1807.Each concurrency territory 1801 is associated with one or more border objects 1807.These border objects 1807 can be illustrated as surrounding the barrier film in concurrency territory 1801 or the wall of band door.The example of border object 1807 comprises between the realization concurrency territory 1801 or the data connector and the object of the custom protocol between concurrency territory 1801 and the external object 1810.
Single-threaded object 1803 in the concurrency territory 1801 uses one or more border objects 1807 and external object 1810 asynchronous communications.Single-threaded object 1803 uses internal thread 1802 to communicate by letter with border object 1807.Border object 1807 uses one or more less important threads 1804 to communicate by letter with external object 1810 then.Border object 1807 is striden the border in concurrency territory 1801 thus and is come transmission information and call.According to another embodiment, a border object 1807 used less important thread 1804 to communicate by letter with another border object 1807 before information is passed to external object 1810.
Border object 1807 is as the interface between each of the internal thread in concurrency territory 1801 and less important thread 1804.According to an embodiment, border object 1807 uses less important thread 1804 from external object 1810 reception of inbound communications, and will communicate by letter with filtering and give suitable internal object 1803.Herein with the more detailed description filter method.According to another embodiment, border object 1807 uses internal thread 1802 object 1803 reception outbound datas internally, and uses less important thread 1804 that this communication is sent to suitable external object 1810.According to an embodiment, border object can outwards call external object on internal thread, but the border object of doing like this is under the constraint.That is, allow border object outwards to call external object and must not can therefore cause limitless delay or deadlock.Another constraint prevents that external object from keeping the quoting of internal object, and this prevents externally directly reentering under the control of object of concurrency territory.
The thread that synchronous communication is carried out thereon at first object enters second object and takes place when carrying out the method for second object.External object 1810 not with concurrency territory 1801 in 1803 synchronous communications of single-threaded object.Therefore, the less important thread of execution external object 1810 does not directly call or enters the single-threaded object 1803 in the concurrency territory 1801.
Figure 19 shows another mutual example system 1900 of concurrency territory wherein 1901 and external object 1910.An example of asynchronous communication externally illustrates between object 1910 and the internal object 1903.The border object 1907 that concurrency territory 1901 comprises internal thread 1902, is configured to the single-threaded object of carrying out 1903 and is used for communicating by letter with external object 1910 on internal thread 1902.Another embodiment of this system 1900 comprises a plurality of border objects 1907 and a plurality of single-threaded object 1903.
According to an embodiment, external object 1910 comprises the multithreading object 1905 that is configured to execution on two or more less important threads 1904.A part of 1905A of multithreading object 1905 is shown in a less important thread 1904A and goes up execution, and another part 1905B of multithreading object 1905 is shown in upward execution of another less important thread 1904B.According to another embodiment, external object 1910 comprises a plurality of multithreading objects 1905 or the single-threaded object (not shown) that is configured to execution on a less important thread 1904.
Concurrency territory 1901 maintenance work formations 1908 in the system 1900.Work queue 1908 is (for example, inserting) task of placing on it (for example, to the calling of the method for inner, single-threaded object 1903, Data Update and other executing method) and the multielement data structure that therefrom removes task.According to an embodiment, task is only to remove from work queue 1908 with their identical orders of layout; That is, retrain according to first in first out.According to another embodiment, the task of putting into work queue 1908 is assigned with priority, and each task removes according to its priority.
Import communication into and put into work queue 1908 by border object 1907.These communications of putting into have formed work item 1911, and they are to the request of the task executions of the inside that is associated with concurrency territory 1901, single-threaded object 1903 or border object 1907 (for example, enable or call).The request that forms work item 1911 can be sent to border object 1907 by external object 1910 or another border object 1907.For example, in Figure 19, the multithreading object 1905 request border objects 1907 of external object 1910 are executed the task, as being described by arrow 1920.Border object 1907 will comprise that then the work item 1911 of this task is put into the end of work queue 1908, as being described by arrow 1925.According to another embodiment, a plurality of border objects 1907 are associated with concurrency territory 1901, and one or more in these border objects 1907 can put into work queue 1908 with work item 1911.According to another embodiment, inner, single-threaded object 1903 request border objects 1907 are put into work queue 1908 so that task is carried out the time of postponing till after a while with work item 1911.
According to an embodiment, in order to preserve resource when preparation is put into work queue 1908 with new task, whether any in border object 1907 inspection work queues 1908 and the definite work item 1911 of lining up comprises inter-related task.If inter-related task is arranged, then border object 1907 optionally bundles the inter-related task of new task with previous queuing as a subtask, but not new task is placed as brand-new work item 1911.
Still with reference to Figure 19, according to an embodiment, concurrency territory 1901 comprises allocator 1909, is used for tasking single-threaded object 1903 in 1911 minutes for processing from the work item of work queue 1908.Allocator 1909 uses internal thread 1902 to come to remove work item 1911 from work queue 1908, and assigns each work item 1911 for carrying out on internal thread 1902.Allocator 1909 calls being included in the work item 1911 of task.For example, in Figure 19, allocator 1909 as by arrow 1930 with describing assignment from the work item 1911 of work queue 1908.Work item 1911 is carried out on internal thread 1902 then as by arrow 1935 with being described.
According to an embodiment, work item 1911 is put into work queue 1908 can not force allocator 1909 runnings.On the contrary, the time point by the top layer circle logic defined in concurrency territory 1901 is postponed till in the execution of work item 1911.In case work item 1911 is placed into work queue 1908, internal thread 1902 is carried out institute's tasks requested in as next the suitable circulation by allocator 1909 determined concurrency territories 1901.Therefore, external object 1910 uncertain work item 1911 and the tasks of when calling and carrying out inside, single-threaded object 1903 therefore of when removing.When the also uncertain border object 1907 of external object 1910 executes the task on the internal thread 1902 in concurrency territory 1901.
In case assignment has also been finished task, the result that will set off passes to border object 1907 as callback.Border object 1907 passes to this callback the external object 1910 that the work item 1911 of the task of realizing this result is called in initial placement then.The example of callback comprises Data Labels that the indication task finishes, method call etc.
Figure 20 has described the asynchronous communication between inside, single-threaded object and the external object.According to one embodiment of present invention, show the communication chain 2000 that takes place during the externally asynchronous communication between object 2001 and inside, the single-threaded object 2009.External object 2001 at first communicates by letter 2002 with border object 2003.This communication 2002 is general adopts calling or the form of call request one or more tasks of being associated with concurrency territory (not shown).Although institute's tasks requested is actually the task of single-threaded object 2009, external object 2001 only is associated this task with concurrency territory or border object 2003.
Border object 2003 communicates by letter 2004 with work queue 2005 then.This communication 2004 generally comprises puts into work queue 2005 with the work item (not shown).Work queue 2005 communicates by letter 2006 with allocator 2007 then.This communication 2006 generally comprises allocator 2007 and sequentially assigns each work item of putting into work queue 2005.At last, allocator 2007 communicates by letter 2008 with the invoked inside of its task, single-threaded object 2009.This communication 2008 generally comprises calling the task of inside, single-threaded object 2009.In another embodiment, external object 2001 is communicated by letter with another border object (not shown) in concurrency territory.
The above asynchronous communication of striding border, concurrency territory with reference to figure 18-20 description has protected inside, single-threaded object to exempt from the problem of reentering.As will be appreciated, object under the control in the top layer logic in concurrency territory (for example, inner, single-threaded object or border object) when the indication internal thread reentered same another object under this top layer logic control, reentering of internal control taken place.When object (for example, external object) the indication internal thread under the control in the top layer logic in concurrency territory not reentered object under the control of this top layer logic, reentering of external control taken place.When internal object reentered another object in himself or the same concurrency territory, inner reentering of causing taken place.When the events affecting that causes by external object when reentering, betide the control that will from the logic of common implementing the internal object in concurrency territory, remove effectively that reenters that the outside causes to reentering.Right and wrong are deterministic as a result reenters.
Later with reference to Figure 19, that the asynchronous communication that only allows to stride the border in concurrency territory 1901 has been protected is inner, single-threaded object 1903 exempts from reentering of external control.For example, if execution inner, single-threaded object 1903 comprises calling the task of external object 1910, then internal thread 1902 will enter one of border object 1907 that is associated with concurrency territory 1902, and will call the task of the task execution of being responsible for request external object 1910.Internal thread 1902 turns back to the task of carrying out inner, single-threaded object 1903 then or carries out the assignment from the work item 1911 of work queue 1908.Because internal thread 1902 is not left 1901 ground, concurrency territory and is entered external object 1910, so it does not drop under the control of external object 1910.
In addition, if allow internal thread 1902 to carry out the task of external object 1910, and if this task executions comprise the calling of another task of inner, single-threaded object 1903, then do not allow internal thread 1902 to reenter concurrency territory 1901.On the contrary, internal thread 1902 will enter the border object 1907 in concurrency territory 1901 to call the task of being responsible for placing work item 1911.Perhaps, as mentioned above, under some particular constraints, border object can outwards call external object with calling task on internal thread.After calling task, internal thread 1902 turns back to the task of carrying out external object 1910 and turns back to subsequently carries out first ancestral task inner, single-threaded object 1903.In other words, internal thread 1902 is not carried out calling of 1910 pairs second tasks of external object, finish up to first task, and up to will so doing by allocator 1909 indications in concurrency territory 1901.
With reference now to Figure 21 and 22,, each embodiment that comprises the exemplary external object aspect of data source of the present invention has been described.Figure 21 shows the system 2100 that comprises concurrency territory 2101 and data source 2112, and Figure 22 shows the operational flowchart 2200 of the interface between the less important thread 2104 of the internal thread 2102 of describing concurrency territory 2101 and data source 2112.In one embodiment, less important thread 2104 comprises a plurality of less important threads 2104.Concurrency territory 2101 comprises single-threaded object 2103 and allocator 2109, and is associated with border object 2107.The work queue 2108 of the task co-pending carried out of indicating is safeguarded in concurrency territory 2101 on the internal thread 2102 in concurrency territory 2101.In one embodiment, data source 2112 is databases.In another embodiment, data source 2112 is networks.
The execution route of internal thread 2102 and less important thread 2104 is shown in two figure.In Figure 21, the task that dotted arrow has been described to take place on internal thread 2102 is carried out, and the task that solid arrow has been described to take place on one or more less important threads 2104 is carried out.The related label of dotted line and solid arrow is corresponding to about Figure 22 performed operation or task, and Figure 22 shows each task of arranging along this thread (task is performed on it).
Still with reference to Figure 21 and 22, this method begins at beginning frame 2201 places, and advances to operation 2202, and wherein single-threaded object 2103 request border objects 2107 call being associated with data source 2112 of task.This request is carried out on the internal thread 2102 in concurrency territory 2101.In operation 2203, allocator 2109 orders are by work queue 2108 and assign each work item 2111.According to an embodiment, use internal thread 2102 to assign these work item with the order that work item 2111 is placed into work queue 2108.For example, allocator 2109 begins to put in order with work item 1 and finishes to put in order with work item 7, supposes and does not add new work item 2111 in the meantime.Any new work item 2111 will be added after work item 7.According to another embodiment, work item 2111 is assigned according to the priority value that is distributed.
Method 2202 is also led to method 2211, and the latter carries out simultaneously with operation 2202.In method 2211, border object 2107 calls being associated with data source 2112 of task.This is invoked at one of less important thread 2104 and goes up execution.Then, this method advances to operation 2212, wherein carries out the task of data source 2112 on less important thread 2104 one or more.Then, operation 2213 comprises that database 2112 beams back border object 2107 with execution result as callback.Result's one or more the going up that is sent in less important thread 2104 taken place.Then, in operation 2214, border object 2107 is put into work queue 2108 with callback as work item 2111.This one or more going up that is placed on less important thread 2104 is carried out.
From operating 2214, this method advances to operation 2204.Operation 2203 also causes operating 2204.Operation 2204 takes place when allocator 2109 arrives the callback work item 2111 of being added by border object 2107 in operation 2214, and this allocator is the work item 2111 in the execution work formation sequentially 2108 during operation 2203.Allocator 2109 uses internal thread 2102 to assign callback.In case assigned callback, allocator 2109 continues each work item 2111 in the tell off formation sequentially 2108 in operation 2205.This method finishes at 2206 places.
With reference now to Figure 23 and 24,, each embodiment that comprises the exemplary external object aspect in less important concurrency territory of the present invention has been described.Figure 23 shows the system 2300 that comprises the first and second concurrency territories 2301,2321 respectively, and Figure 24 shows the wherein operational flowchart 2400 in the first concurrency territory 2301 and the second concurrency territory, 2321 interfaces.Each concurrency territory 2301,2321 comprises internal thread 2302,2322, single-threaded object 2303,2323 and allocator 2309,2329 respectively.Each concurrency territory 2301,2321 is associated with border object 2307,2327 respectively, and safeguards the work queue 2308,2328 of the work item co-pending 2311,2331 carried out on internal thread 2302,2322 of indicating.In Figure 23, first group of task execution that dotted arrow has been described to take place on internal thread 2302, the task that one group of solid arrow has been described to take place on less important thread 2304 one or more is carried out, and the task that second group of dotted arrow described to take place on second internal thread 2322 is carried out.These dotted lines and solid arrow are illustrated as carrying out related various operations in the communicating by letter between the first concurrency territory 2301 and the second concurrency territory 2321.These arrows related with reference to label corresponding to operation or the task carried out about Figure 24.
Still with reference to Figure 23 and 24, this method begins at beginning frame 2401 places, and advances to operation 2402 and 2422.Operation 2422 comprises that the allocator 2329 in the second concurrency territory 2321 uses internal thread 2322 to come each work item 2331 in the tell off formation sequentially 2328.Operation 2402 is carried out concomitantly with operation 2422.In operation 2402, the single-threaded object 2303 request border objects 2307 in the first concurrency territory 2301 call the task of one of the object in the second concurrency territory 2321.In one embodiment, institute's tasks requested is the task of one of the single-threaded object 2323 in the second concurrency territory 2321.In another embodiment, institute's tasks requested is the task of one of border object 2327 of being associated with the second concurrency territory 2321.
From operating 2402, this method advances to operation 2403 and 2412.In operation 2403, each work item 2311 in the allocator 2309 tell off formation sequentially 2308 in the first concurrency territory 2301.In operation 2412, the border object in the first concurrency territory 2,301 2307 uses one or more in the less important thread 2304 to communicate by letter with the border object 2327 in the second concurrency territory 2321.This communication comprises the request of calling task.Then, in operation 2413, second border object 2327 is put into work queue 2328 with institute's tasks requested as work item 2331.This placement is to use one or more being performed in the less important thread 2304.
Operation 2423 is all led in operation 2413 and operation 2422.In operation 2423, allocator 2329 arrival are also assigned the work item 2331 that comprises institute's tasks requested.This assigns execution on the internal thread 2322 in the second concurrency territory 2321.Then, in operation 2424, task is as the callback of the single-threaded object 2303 in the first concurrency territory 2301 is carried out.At this moment, this method divides once more, advances to operation 2425 and 2414.In operation 2425, allocator 2329 continues each work item 2331 in the tell off formation sequentially 2328.
Operation 2414 takes place concomitantly with operation 2425.In operation 2414, the border object 2327 in the second concurrency territory 2321 uses one or more less important threads 2304 to ask the border object 2307 in the first concurrency territory 2301 that callback is put into work queue 2308 as work item 2311.Then, in operation 2415, border object 2307 is put into work queue 2308 with this callback.This placement is to be performed on less important thread 2304 one or more.
The allocator 2309 of operation 2404 in the first concurrency territory 2301 takes place when arriving the callback of putting into work queue 2308.Allocator 2309 uses the internal thread 2302 in the first concurrency territory 2301 to assign callback.Callback is carried out in operation 2405.Then, this method advances to operation 2406, and wherein allocator 2309 continuation are assigned each work item 2311 according to the order of sequence in proper order by work queue 2308.This method finishes at 2406 places.
Another example (not shown) of system comprise interface each other and with the three or more concurrencies territory of external object interface.This system is according to sequentially operating with identical operations described herein.Each concurrency territory in this system comprises internal thread, one or more single-threaded object and allocator.Each concurrency territory is associated with at least one border object and safeguards a work queue.All communications of striding border, concurrency territory all are asynchronous (for example, filtering by corresponding border object, work queue and allocator).
The application program descriptive language
As above briefly describe, various embodiments of the present invention comprise that application program is described (XAD) and application program is described (XAD) engine, be used to provide comprise in the above application framework of describing with reference to figure 3 wait the declarative rule and the description of all application programs and assembly such as application program 304.The each side of some embodiment relates to declarative or the descriptive language that is used to create data flow, data binding and characterizes the rule of application program.Others relate to engine when handling or carrying out the operation of this declarative application program in when operation, and promptly (via making up device) created and checked and/or " the application program description " of the object of deal with data.Therefore, the developer need not to write actual code for the object that carries out data processing, but only need write the declarative application file that is finally compiled and carry out.As will be discussed in detail, this system provides numerous benefits of the art methods that is better than the application programs programming.
The use of this declarative language mode by data modeling, processing and conversion data, user interface (UI) and the UI and the data interaction of declarative ground application programs is different from use to imperative language.Various embodiments of the present invention relate to the certain claims language that is used to characterize XML application framework (XAF) application program.This declarative language is called as XAF application program definition (XAD) herein sometimes.Although great majority described herein realize that details relates to the use to XML, person of skill in the art will appreciate that and can use other sentence structure to realize each side of the present invention.
As will be appreciated,, in one embodiment, can use a kind of platform, such as making up and the platform of executive utility etc. for the declarative application file being provided and carrying out this separation between the configuration of instance object of data processing.According to each side of the present invention, employed platform is called as the XAF platform herein, and it is the platform that is used to make up and carry out these software applications.Especially, XAF also uses XML to represent data uniformly, and adopts the method for altitude moduleization to make up each application program.In one embodiment, XAF has utilized XML that powerful data conversion ability and rich data is provided.External data and Application Status all can use the ability of XML to visit and handle.User interface and complex data flow process can define in XAD.
As described, XAD is a kind of declarative language that is used to create the XAF application program.Figure 25 is senior the describing that the application program relevant with object with being created the data that form executable application programs described.XAD is used to create statement or describes such as the data set or the application program of storing data such as 2504,2506 and 2508 and describe 2502, make when operation, assembly 2501,2512 and 2514 is created to be handled, checks and/or edit this data, thereby has constructed the configuration that constitutes the object of executive utility in essence.
In the exemplary embodiment herein, application program is described 2502 and is expressed as one group of declarative structure, such as the good XML of form.Therefore application program is described 2502 and has been described one or more objects 2501,2512 and 2514 and should how to dispose in executive utility.In essence, application program is described 2502 and is used for the configuration of computing application program and the result of nonusable routine, and the latter's calculating is finished by object 2510,2512 and 2514.Because object 2510,2512 and 2514 can be used by other application program of writing with non-declarative language, so XAD is by having improved the exploitation of application program to reusing of these objects.In addition, impossible mode application programs was carried out dynamic creation and modification when the XAD permission defined with traditional static declarative application program, will discuss in more detail as following.
For the data shown in Figure 25 2504,2506 and 2508, these sources can be relevant with text data store, SQL database storage, XML source, web service source etc.In fact, application program is described 2502 and is considered to data-centered, makes that it is a data center.Application Status can be considered to another " data " source, and to treat with the similar mode of more routine data that is configured in operation on it of object 2510,2512 and 2514.The developer is therefore main pay close attention to the specific data flow process by application program mode and the domination application program how in response to the rule of these data.XAD provides and has made up and the simple and cheap mode of change application program, and this makes the target that can reach different software applications appropriate location (niche) and person's newly developed low complex degree is hindered.The application program of using the present invention for required protection to make up not only has traffic aggregate and transforms to the ability of application program, but also has the ability of selection to the optimal one or more user interfaces of data type.
Object 2510,2512 and 2514 expressions are by the assembly of good-decomposition, such as reader, editing machine, transducer etc.Application program is described and can be called " pre-programmed " assembly and/or add New Parent to set.
Object have by well-type of definition, therefore corresponding XAD label and parameter have corresponding type in the XAD language.XAD is a strong typing, and the XAD compiler detects mistake statically.Label and parameter have return type and constraint base (cardinality constraints).In addition, data type is supported some additional constraints: scheme, conversion require and memory access availability (memory access is the strong typing object appearance (facade) that is used for the XML data).
XAD not only allows simply to revise or increase existing application by changing one or more texts, but also the permission developer retrains modification and plug-in unit (can be added to the module of existing application, roughly be similar to browser plug-in) with the maintenance security, and following user model in greater detail is integrated.
Example XAD application program
For understanding numerous nuances of XAD, especially the XAD application program is described, and describes 2502 as application program, an example will be discussed describe.Table 1 shows the source code of example XAD application program according to an embodiment of the invention.Example XAD application program in the table 1 is simple relatively, and has conceived many other complicated XAD application programs.In fact, the example shown in the table 1 has unique function of demonstration " Hello World " message.
Figure A200680014594D00481
Table 1: example XAD application program is described
As will be appreciated, the example shown in the table 1 comprises that some XML labels are to describe the object of deal with data gained.The 1st line identifier the version of XML, and the 2nd line identifier be used for the system label that the XAD application program is described, this will be in following more detailed description.The 3-4 line identifier some name space of available label among the XAF.For purposes of this discussion, the major part of the example in the table 1 is " Aplication (application program) " shown in eighth row label.Application tags is the example that causes creating an entity tag of application object when operation, the highest level of this application object coordinate application and controlling application program function.Similarly, " Window (the window) " label (another example of entity tag) in the 9th row causes window object, i.e. the establishment of the user interface entity of the framework of responsible display application program.In this case, " Window " is the parameter of " Application ".At last, " TextBlock (text block) " entity, the text object of the gained that the result of the text label in promptly going as the 10th creates is the user interface entity of the responsible videotex (in this case, being " Hello World ") of establishment when operation.Using label (via making up device) to create object will describe in more detail following.Above example only is provided to illustrate a simpler example XAD application program.
In operation, the XAD application program shown in compiling and the execution list 1 with create as application program, window and text object shown in Figure 26.That is, Figure 26 shows according to the application program of one particular embodiment of the present invention and describes 2602, is similar to the XAD application program shown in description shown in Figure 25 2502 and/or the table 1 when it is performed deal with data.
At first, the developer creates application program and describes 2602.In one embodiment, first label of XAD file 2602 is "<sys:XAD〉".Equally, for operation correctly, computer system can be such as XAF SDK visits XAF or any suitable equivalent by for example installing.After sending the application program launching order, XAD 2602 is verified automatically, and in one embodiment, is compiled into more effective form.2604 couples of XAD of compiler or XAF engine 2602 carry out grammatical analysis, and the form that compiled of the quilt of carrying out the necessary object of instantiation.And engine 2604 is created subject component (being also referred to as entity) Figure 26 12,2614,2616,2618 and they is linked together with the level of application 2606 of creating final deal with data.Simultaneously, engine 2604 is connected each object with data necessary 2608, i.e. binding.Engine 2604 also can be considered to configuration service, because its instance object and object linked together to create application program 2606.
Application program 2606 is figure of coupling assembling 2612,2614,2616,2618.For example, application program 2606 can have one or more data connector entities 2612.The object that data connector entity 2612 signs are connected to data system and communicate by letter with available various data storage.The entity of another type relates to UI connector 2614.UI connector 2614 expression actual treatment user interface features, and the object of in fact communicating by letter with user interface 2620.Be included in the conversion 2616 that certain conversion of data was provided usually that also has in the application program 2606 before information is relayed the UI connector, and deal with data is to carry out the action 2618 such as the action of revising a certain types such as data.The process of creating necessary assembly and the more details that object are tied to the process of data are below described.
As understanding from this discussion, the label that uses among the XAD 2602 is not used in the representative special object, but the XAD label is represented object factory (factory).To be XAD in conjunction with its label makes up device class make object factory is used for utilizing designated parameters in the label to make up the description of one or more entities.Engine 2604 provides the actual creation of these objects.In one embodiment, engine has the visit to the Component Gallery 2622 of some details that existing and/or reusable label and object are provided.
Therefore, application program 2602 uses label to define, thereby allows the modular of application program.Figure 27 shows according to the structural mutual relationship between the assembly of this notion.Entity tag 2702 (entity tags shown in the 8th, 9 and 10 row of table 1) is associated with entity 2706.Making up device 2704 reads entity tag 2702 and shines upon it.Make up device 2704 instantiations and connect the one or more objects (not shown) that are associated with entity tag, and entity tag 2702 is associated with entity 2706.For the developer, appear to be entity tag 2702 and impliedly be mapped to its entity that is associated 2706, because mapping, instantiation, write or connection and initialization can take place on the backstage.
Had after these general provisions, will some details of XAD be discussed.About the more details of language, added instructions as appendix A, its is by clearly in conjunction with in this manual.
Object and factory
Object comes instantiation by factory (factory), and factory makes up the device assembly, or the XAD engine that customizes with the fragment of XAD.Factory allows for such as lazy evaluation (lazy evaluation) or virtual purposes such as (saving need not the cost of the object of instantiation immediately) and postpones instantiation.This is to realize by the parameter with NewScope=" True " attribute.With conventional instantiation by sys:Switch structure together, factory makes it possible to the configuration of dynamic data related application.Dependence management in the XAF platform and the use of reaffirming make the XAD engine can reconfigure application program as required automatically when data change.This eliminated conventionally write in the application program common and cost is higher and error-pronely be used for the commanding demand that reconfigures code.The XAD engine allows to define factory with the XAD language, and the factory that structure is corresponding automatically realizes.
Can use the framework label among the XAD to come the various objects of instantiation, all objects 2510,2512 and 2514 as shown in figure 25.A kind of such object relates to " data set provider " object that is also referred to as data connector, wherein the source and the manipulation of the data that may use of data set provider object representation application program.The data set provider object is connected to data source (by this data source, application program can receive external data) and data conversion (to importing the logical OR arithmetical operation that data are carried out into).
Can use the framework label instantiation among the XAD another kind of type to as if user interface object.User interface object provides with control and has shown and input processing function associated.User interface object can be used for trigger action (seeing action discussed below).
Also can use the framework label instantiation among the XAD another type to as if the action.Action provides " hook " (the appending to the function of user interface element) to the handle that is used for customer incident.For example, the button of clicking on the user interface will activate and this button associated action object.
When customer incident takes place, can use corresponding action to store and transmit event details.Event details can be stored on primary memory, hard disk drive or other storage medium.Event details uses " scope (scope) " discussed below variable to transmit.For example, if customer incident is click, can mean that then the moment in this incident stores the x and the y position of mouse.Other details that can store when customer incident takes place includes but not limited to, supresses which key, selected which index of data element tabulation in the moment of this incident, which row of form and/or row are visible or the like to the user when having selected which and/or row of form, moment in this incident in the moment of this incident.By using these incidents, can realize function of application.
Entity tag
As what can understand from the example as shown in the above table 1, XAD uses the use that comprises label.In one embodiment, a kind of label is " entity tag ".To more go through following such as other labels such as grouping or selector switch labels.Entity tag is mapped to (CLR) object between the common language runtime when operation.Unique restriction to the CLR object is that it must (in one embodiment) be the XAF entity.For becoming the XAF entity, the CLR object is from two base class, as derivation in one of " Microsoft.Xaf.Core.BaseTypes.EntityElement " or " Microsoft.Xaf.Core.BaseTypes.EntityComposite ", and adhere to some agreement and the contract that defines by XAF.
Make up device 2704 (Figure 27) and be responsible for the practical examplesization of entity, and sometimes be called as " label structure device " or " entity structure device ".In one embodiment, to make up device be to be used to create entity and/or with entity user-defined .NET class connected to one another to entity.Entity makes up device and is used to realize primitive XAD label.In addition, entity makes up the interaction point between the self-defined expansion that device is engine 2604 and language, makes in one embodiment, and the XAD language has defined especially to writing the requirement of entity structure device.More details about label or entity structure device provide in the joint 3.5 of clear and definite combination appended appendix A in this manual.
The exemplary physical label illustrates at the 8th, 9 and 10 row of above table 1.For example, in eighth row, show the application entity label.As mentioned above, this label causes the instantiation of the entity of coordinate application, and the function of application of control highest level.Window entity tag (the 9th row of table 1) causes the establishment of the user interface entity of responsible display application program frame.At last, text entity tag (the 10th row of table 1) causes the establishment of the user interface entity of responsible videotex (in this case, being " Hello World ").As understood by the skilled person in the art, definable and many other entity types of use.
Before using entity tags such as all application entity labels as shown in table 1, window entity tag or text entity tag, for example defining each entity tag in the XAF platform.In fact, each entity tag has corresponding label definition.Each label definition has comprised is enough to the information that each entity tag the most at last is mapped to entity.Entity tag defines by the statement of form, for example, and " Text (text) " following beginning of label definition "<sys:TagDefinitaion Name=" Text " ...〉" ... and following end "</sys:TagDefinition〉".
What comprise in the definition is " title " of new label, as " Text ", and " type " of special entity label.Entity tag can be classified into all kinds, and all entity tags all have type.But these types are supersets, and real CLR type corresponding to the entity that is associated with label.Some type of being used by the XAF framework comprises " sys:Data ", " sys:EventHandler ", " fwk:UIElement " and " sys:Selector ".Whether label adds framework or system to, depends on that usually whether label extracts in engine interface and/or the version internally with the speed identical with kernel language.If then label should be added to system, otherwise should be added to framework.Type statement in its definition.The Text definition that provides more than the continuation, label definition can be expanded as shown in the following Table 2.
Figure A200680014594D00521
Table 2: comprise the definition to the Text entity tag of type
In table 2, the novel entities label of label definition indication Text by name should be created as type fwk:UIElement (the framework label of indication UI element type entity).The Text label can call the use Anywhere of fwk:UIElement entity subsequently.See in the HelloWorkd.xad example that an example of Text entity tag can occur in table 1.
Parametrization
Usually, each entity tag during the XAD application program is described has some parameter that the object or the entity of gained were created, connect or disposed to description how.Parameter can be to the quoting of data, perhaps quoting factory or object.For example, range attribute can join to indicate this parameter to relate to factory or object with parameter correlation.If the object of a certain type of parameter request just is suitable for, then this parameter can come mark to carry out the type consistency check with the type.This type checking guarantees that the execution of application program can not cause type mismatch, and the type mismatch meeting causes incorrect calculating.
XAD allows for the many different mode of entity statement parameter.A kind of common form is shown in the following table 3.
Figure A200680014594D00531
Figure A200680014594D00532
Table 3: have the example tag definition to the Text entity of parameter
At first, " Param " is the reserved name among the XAD embodiment, and is used for defined parameters.Equally, indicated as the suspension points in the table 3, also can add one or more other parameters to the Text label definition.In this example, should create the novel entities of the type UI element of Text by name.In addition, should create the single parameter of " FontFamily (the font family) " by name of type " Data (data) " (more specifically, being " String Data (string data) ").The Text label of gained can with the static content string, as make text be the Arial font "<sys:Text FontFamily=" Arial " .../" use together.Importantly, the label definition parameter is corresponding to having attribute in the practical examples of label of same names with this parameter.
Perhaps, label can be defined as getting the parameter of other entity, for example "<Text FontSize=" 25 "〉<foo:RandomWordGenerator Param=" Text "/</Text〉".In one embodiment, more than definition will make the Text attribute of Text label use the value of being returned by the foo:RandomWordGenerator function object, and present the value of gained on screen with 25 pounds font.In another embodiment, this definition can be written as "<TextFontSize=" 25 "〉<Text.Text<foo:RandomWordGenerator/</Text.Text<Text ".Back one definition is instantiation Text entity, and with its Text attribute definition value that is foo:RandomWordGenerator.
In one embodiment, parameter itself can comprise a plurality of its oneself entities.Table 4 shows code sample parameter partly is set.
1 <sys:TagDefinition?Name="FlowPanel"Type="fwk:UIElement"> sys:Param?Name="Children"Type="fwk:UIElement" Max="Unbounded"/> </sys:TagDefinition>
2 <FlowPanel?FlowOrientation="Vertical">
<FlowPanel.Children> <TextBlock?Text="John?Smith"/> <TextBlock?Text="Jane?Doe"/> <TextBlock?Text="Amanda?Jones"/> </FlowPanel.Children> </FlowPanel>
Table 4: example XAD segment is provided with parameter
Code shown in the table 4 (the 1st row) has defined the UI element of FlowPanel by name and has had several parameters, causes the demonstration of UI element flow thus.This group UI element that shows can be specified via the single parameter that is called " Children " of definition in the table 4 (the 2nd row).Promptly the 2nd row shows the application program description of the flow faceplate that calls/describe definition in the 1st row.
Can specify a default parameters to each entity among the XAD.It is capable that table 5 shows the code sample that defines its default parameters that is called " Children ".If there is not the designated parameter name on subtab, then this subtab will join with this parameter correlation, and its DefaultParam (default parameters) attribute is set as " true ".
Figure A200680014594D00541
Table 5: default parameters example
Data binding
In one embodiment, XAD supports data binding (with the XML data binding to the object that is in particular this design data).Reference data more specifically when therefore, object oriented is used in designated parameter.Unlike quiescent value (according to definition, the life cycle of application programs keep constant), the data binding value can be upgraded by the modification to the associated data of data bound values.In one embodiment, this modification can be carried out by application program.In another embodiment, this modification can be carried out by user or external progress.In one exemplary embodiment, go "<TextText=" $TextValue " FontSize=" 25 "/〉 " cause the Text parameter value of being assigned with “ $TextValue ".In this embodiment, " $ " is reserved character, and use in this way this character the establishment of assembly be connected during call data binding.This data binding causes sensing or association from the data of another source that will be tied to this entity tag or object.
Data binding can be used for the citation digital data.That is, lteral data can use the sys:InlineData label to specify.For example, "<sys:InlineData Name=" TextValue "〉Hello Workd</sys:InlineData〉" defined inline data, promptly go here and there " Hello World ".This exemplary lteral data label is given title TextValue.Therefore, by use Ming Cheng $TextValue in XAD describes, the XAD code can be tied to the data in the lteral data label, and the value of any parameter of type sys:Data is used it.
Data binding also can be used for quoting the relative data position.For example,<TextText=" $SomeLocation/myd:Employees/myd:Employee/myd:Name "/〉 used dynamic prefix, i.e. “ $SomeLocation ", be that relative data is quoted afterwards, i.e. " myd:Employees ", " myd:Employee " and " myd:Name ", and do not use " $ " character.The result is the data binding to the absolute position that forms from the additional value that given relative position De $SomeLocation arranged.
In addition, data binding can be used in conjunction with packet label.For example, the code sample in the table 6 (the 1st row) is tied to this group object under the Resources packet label with the MergeTreesTransform entity.
1 <Resources?Name=”MyDataSources”> <XmlFileDataSource.../> <SQLDataSource.../> </Resources> ... MergeTreesTransform?Trees=”$MyDataSources”/>
2 <Text> <sys:InlineData?Param="Text"Name="ScratchData" Writable="true"> <Greeting>Bye</Greeting> </sys:InlineData> <SetTextValueAction?Param="MouseLeftButtonDown" Data="$ScratchData"NewValue="Ciao"/> <SetTextValueAction?Param="MouseRightButtonDown" Data="$ScratchData"NewValue="Au?Revoir"/> </Text>
Table 6: to the data binding of packet label or action
Table 6 (the 2nd row) shows XAD and allows action is tied to data value.For example, the value to give a definition action is tied to.Initial value according to definition , $ScratchData is " Bye "." MouseLeftButtonDown " is the parameter of type " sys:EventHandler ".Running into left mouse button corresponding to the action of " MouseLeftButtonDown " parameter at the Text entity presses any moment of incident and is called.This incident makes SetTextValueAction be called, this general<Greeting〉textual value of element changes " Caio " into.Equally, right mouse button is pressed incident and is changed the value of Dao Zhi $ScratchData into " Au Revoir ".
In another example, data binding allows application program to receive command line parameter.For example, the code sample in the table 7 allows the specified command line parameter.The sys:Main label is the entrance of application program.
1 <sys:TagDefinition?Name="sys:Main"Type="Application"> <sys:Param?Name="TextData"Type="sys:Data"/> <sys:Body> <Application> <Window> <FlowPanel> <Text?Text="$TextData"/> </FlowPanel> </Window> </Application> </sys:Body> </sys:TagDefinition>
Table 7: command-line data binding
The application program of definition is accepted such as command line parameters such as " xad CommandLine.xad/TextData=Testing " in the table 7, and wherein CommandLine.xad is an application name, and TextData is a parameter name, and Testing is a value.In one embodiment, can import a plurality of parameters into XAD with the form of " xad ApplicationName/ parameter name 1=value 1/ parameter name 2=value 2.../parameter name n=value n ".Use string as input value although those skilled in the art will appreciate that above exemplary embodiment, command line parameter can be alternatively or is additionally comprised alphanumeric values, filename, image or other resource location etc.Equally, command line parameter can be given a default value, for using not for this parameter specified command line parameter value the time.
The data source label
In one embodiment, external data is given the XAD application program by the DataSource label display.In addition, can use the XmlFileDataSource label to set up connection between application program and the XML file, make the latter can be employed program as data source.External data source can use by the mode that the inline data that provided by the sys:InlineData label are provided.Yet external data source can use the XAD action to be saved in dish, and therefore other user can be when needed by this application program consumption to the change of data.
Derive label definition
It is abstract and reuse that XAD allow to use derives that label definition supports to define.For example, in the application program that requires a series of 12 pounds of Verdana font titles, the user can be with such as "<Text FontFamily=" Verdana " FontSize=" 12 " Text=" heading text here "/〉 " etc. definition be placed on each position that requires title.Yet if require up to a hundred or thousands of titles, and each title may be different, derive label definition and allow bigger appointment efficient.More specifically, definable derivation label definition and an example are shown in the table 8.
Figure A200680014594D00571
Table 8: derive the label definition example
Definition shown in the table 8 will make XAD create the new label of the TitleText by name of type fwk:UIElement.Text parameter in this label is bound to the value that Dui $Text imports into, and this value can differently be imported into each instantiation of title.
As another example, consider the following example shown in the table 9, wherein first row is the sample segment of XAD, second row shows derives label definition replacing the example of this XAD segment, and the third line shows the instantiation of this derivation label definition of use and calls.
1 <StackPanel> <TextBlock?FontWeight=”Bold”Text=“My?Caption”/> <foo:Table?FontFamily=“Arial”> <XmlFileDataSource Param=“Table”File=“MyTable.xml”/> </foo:Table> </StackPanel>
2 <sys:TagDefinition Name=foo:TableWithCaption”Type=“fwk:UIElement”> <sys:Param?Name=“Caption”Type=“sys:StringData”/> <sys:Param?Name=“TableFile”Type=“sys:StringData”/> <sys:Body> <StackPanel> <TextBlock FontWeight=”Bold”Text=“$Caption”/> <Table?FontFamily=“Arial”> <XmlFileDataSourceParam=“Table”File=“$TableFile”/> </Table> </StackPanel> </sys:Body> </sys:TagDefinition>
3 <foo:TableWithCaption Caption=“Sales”TableFile=“SalesTable.xml”/>
Table 9: exemplary fragment, derive label definition, sample instanceization
As shown in table 9, derive label and can improve and repeatedly call or the functional and simplicity during the instantiation identical entry.
Scope and new range parameter
Range parameter provides the border of definition for some subgraph of the object that changes life cycle, and the border of this definition especially is provided for the instantiation of the delay of these entities and/or repetition.Factory is postponement and postpones to call the means of instantiation.Value as the parameter that is provided by the entity that calls this instantiation is provided bound variable.An example to the use of bound variable is to allow to receive different event features, presses incident such as mouse button.
XAD uses the new range parameter with in Data transmission between the application component, between the object and/or between its combination.In one embodiment, can use the new range parameter parameter to be delivered to the sub-component of new establishment by parent component.Thus, XAD allows the user to make full use of code reuse.In one embodiment, constructed the tabulation entity of quoting that comprises the data in each list of entries.Definition will be done and so on same parameter to single list of entries and be applied to each new list of entries, thereby allows to use single parameter or parameter set to create big item list arbitrarily.In addition, the parameter of transmitting between father and son's object equally can be optimised.For example, parent object can pass to subobject with list index via the new range parameter, and described list index is corresponding to the list element that is passed to subobject.
The parameter of introducing new range is made as very (true) with " NewScope (new range) " attribute.For example, go "<sys:Param Name=" ... " NewScope=" true " .../" be generally used for new attribute is made as frame.The new range parameter can be used for the one or more variablees in the introducing scope.Variable is the parameter of implicit declaration.Variable is together with the statement of the new range parameter statement of coming together, as can be in table 10 seen in (the 1st row) example of providing.As mentioned above, new range is to being introduced by any entity of repeatedly instantiation.Table 10 (the 2nd row) shows the definition to this factory:
1 <sys:TagDefinition?Name=”fwk:Text”Type=”fwk:UIElement”> <sys:ParamGroupRefRef=”fwk:FrameworkElementParamGroup”/> <sys:ParamGroupRefRef=”fwk:TextExtensionsParamGroup”/> </sys:TagDefinition>
2 <sys:TagDefinitionName=”FlowPanel”Type=”fwk:UIElement”> <sys:Choice> <sys:ParamGroup> <sys:Param?Name=”Data”Type=”sys:Data”.../> <sys:Param Name=”RepeatedChild”Type=”sys:UIElement”NewScope=”true”...> <sys:ScopeVariable?Name=”DataContext”
Type=”sys:Data”.../> </sys:Param> </sys:ParamGroup> <sys:Param Name=”Children”Type=”fwk:UIElement”DefaultParam=”true”.../> </sys:Choice> </sys:TagDefinition>
Table 10: new range parameter
In above example (table 10, the 2nd row), has the bound variable of DataContext by name by the scope of RepeatedChild parameter introducing.This variable is set as the item corresponding to the sub-view of wanting instantiation.More than definition is used shown in table 11 (the 1st row), supposes that List.xml comprises the XML shown in the table 11 (the 2nd row).
1 <Application.Resources> <XmlFileDataSource?File=”List.xml”Name=”ListData”/> </Application.Resources> ... <FlowPanel?Data=”$ListData”FlowOrientation=”Vertical”> <Text?Param=”RepeatedChild” Text=”$DataContext /@Name”/> </FlowPanel>
2 <Employees> <Employee?Name=”Employee?A”/> <Employee?Name=”Employee?B”/> <Employee?Name=”Employe?eC”/> <Employee?Name=”Employee?D”/> <Employee?Name=”Employee?E”/> <Employee?Name=”Employee?F”/> <Employee?Name=”Employee?G”/> <Employee?Name=”Employee?H”/> </Employees>
Table 11: the example of bound variable is used
In the example shown in the table 11, to each list items, the FlowPanel entity will be created the Text entity of a correspondence.The Flowpanel entity of gained will show the tabulation of employee (Employee) A-H on monitor.Those skilled in the art will appreciate that of the instantiation of each row corresponding to the Text entity.What change between each instantiation is the value of " DataContext " bound variable.The pattern of gained is called as duplicator pattern (repeaterpattern).This is the basis of the iteration on the data set among the XAD.In one embodiment, the duplicator pattern can be nested to the multidigit iteration.
Additional parameter
Additional parameter is the parameter that is associated with subobject by parent object, and this subobject may not know how to handle this parameter.For example, " triangle (triangle) " object as the subobject of father's " drawing (drawing) " object may specifically not know how to handle " position (position) " coordinate, because position coordinates relates to the general position in drawing and is not specifically related to such as shapes such as triangles.Data and/or function that additional parameter allows the parent object visit to be associated with subobject.XAD checks additional parameter correctly to use based on the definition of parameter described in the parent object.Table 12 (the 1st row) shows an example tag definition.
1 <sys:TagDefinition Name="DockPanel"Type="fwk:UIElement"> <sys:Param?Name="Children"Type="fwk:UIElement">Max="Unbounded" <sys:AttachedParam Name="Dock"Type="sys:Data" TargetType="fwk:Dock"/> </sys:Param> </sys:TagDefinition>
2 <DockPanel> <Text?DockPanel.Dock=”Top”Text=”Top?of?the?View”/> <Text?DockPanel.Dock=”Bottom”Text=”Bottom?of?theView”/> </DockPanel>
Table 12: additional parameter example
XAD code definition in the table 12 (the 1st row) has defined the entity that is called DockPanel, and it comprises the additional parameter that is called " Dock ", and this parameter can be called as " DockPanel.Dock ".Table 12 (the 2nd row) shows the exemplary XAD code that uses the DockPanel entity.
As shown in table 12, DockPanel.Dock is designated as each Text attributes of entities, even DockPanel.Dock one of designated parameters in the label definition of Text entity not necessarily.Because DockPanel.Dock is an additional parameter, it uses in conjunction with the Text entity, but in fact defines in the statement of the DockPanel entity shown in the table 12 (the 1st row).
Resource parameters
The parameter of another kind of type is a resource parameters.Resource parameters provides the place that is stored in the object that does not have logical place in the object hierarchies.Resource parameters can be used for the set of any entity is anchored under the given entity.Can run through whole application program with resource parameters associated action and state uses.An example definitions of resource parameters is shown in the table 13.
Figure A200680014594D00611
Table 13: example resources parameter
The UI element can be tied to state and/or action via the data binding ability of above-mentioned XAD.
Structure
In XAD, " structure " is a group object that can be used as a name delivery.Structure among the XAD also can be nested.The example of structure and nested structure is shown in the table 14.
Figure A200680014594D00612
Table 14: nested structure
, $ActionsAndData.Actions.Print and $ActionsAndData.Actions.Save binding in this example all is effective to all parameters of type sys:EventHandler., $ActionsAndData.RecentDocuments, $ActionsAndData.Preference.User and $ActionsAndData.Preferences.Enterprise are effective to all parameters of type sys:Data similarly.$ActionsAndData is effective to all parameters of signature (Signature) app:ActionsAndDataSignature.$ActionsAndData.Actions is effective to all parameters of signature app:ActionsSignature., $ActionsAndData.Preferences is effective to all parameters of signature app:PreferencesSignatures at last.
Component list (manifest)
In one embodiment, XAD uses " component list " each several part with application program, describes gathering together as application program.Component list is can be by the appointment of the each side of the description application program of Computer Processing, for example to need between which file, the object to exist what dependence and what user environment exclusive data be the part (such as the user interface element text of user's native language, icon etc., different with the data of application program operation) of application program to application program.
Built-in label
Built-in label is predefine and the label that significant capability is provided to XAD developer.It is conventionally, built-in that label is used " sys: " as prefix.For example, but the establishment of these built-in label enabled condition operations, repetitive operation and object.A kind of built-in label of this type is called as " transaction " label, and it is used in the object what type the interior change of data description will use.Real time modifying is carried out in this permission configuration to object on screen.For example, select a given user interface element in response to the user, the function of this element and/or purposes can be changed in real time.For example, an output window can be used for showing from the output of different application view how arbitrarily based on the selection to " being recycled to next application view " user command.In one embodiment, the transaction label allows to carry out the transaction instantiation by bookmark name as shown in the following Table 15:
Figure A200680014594D00621
Table 15: the exemplary dynamic entity uses
In the example shown in the table 15, built-in entity " Dynamic Entity (transaction) " provides the ability of Dynamic Definition entity to the developer., $DateTag is resolved to native name in this case.
The built-in label that is called the another kind of type of " switching entity " allows dynamically to reconfigure application program by the condition of an object or a plurality of related objects is constructed.Although XAD is a declarative language, it still has enough expressiveness to allow the condition structure to entity.Provide single structure to construct: Switch (switching) with enabled condition.The switching entity label can come parametrization by " cases (situation) " or " conditions (condition) " label.Cases can be considered to be similar to the switch of C#, and Conditions is similar to the if-else clause of one group of C#.In one embodiment, be mutual exclusion to the use of Cases and Conditions, this means Switch can not be in its main body mixed C ases and Conditions.In addition, in the present embodiment, Cases may only use when parameter has been specified value for its Data (data) at Switch, otherwise must use Conditions.
Use Switch to allow the author as the result of switching evaluation is returned one or more entities conditionally.Table 16 shows some example XAD data (the 1st row), and the example of switching is used (the 2nd and 3 row).
1 <sys:InlineData?Name=”Electronics”> <Items> <Item?Description=”Toaster”Price=”49.99”/> <Item?Description=”VCR”Price=”199.99”/> <Item Description”=DVD Player”Price=”279.79”/> <Item?Description=”Receiver”Price=”549.99”/> <Item?Description=”Sub-woofer”Price=”350”/> </Items> </sys:InlieData>
2 <sys:Switch> <sys:Condition Test=“$Electronics/Item[1]/@Price>50.00”> ... </sys:Condition> </sys:Switch>
3 <StackPanel?Data=“$Electronics”> <sys:Switch?Param=“RepeatedChild”> <Condition?Test=“./@Price>500”> <TextBlock Text=”./@Description”FontFamily=”Arial” FontWeight=”Bold”Foreground=”Red”/> </Condition> <Condition?Test=”./@Price<100”> <TextBlock Text=”./@Description”FontFamily=”Georgia” FontWeight=”Bold”Foreground=”Green”/> </Condition> <sys:Default> <TextBlock Param=”Default”Text=”./@Description” FontFamily=”Courier New”/> </sys:Default> </sys:Switch> </StackPanel>
Table 16: example resources parameter
As will be appreciated, the 2nd of table 16 the row shows among the embodiment based on the sentence structure of creating entity greater than 50.00 dollars value.The 3rd of table 16 worked and the test block entity that is used for other condition test is shown further illustrates this example.The view of gained will show all elements item in the 1st row, i.e. " Toaster ", " VCR ", " DVD Player ", " Receiver " and " Sub-woofer ".Yet " Toaster " will be the Georgia bold and be green, and " Receiver " will be the Arial bold and be red.
Switching is followed the tracks of and is reaffirmed together with dependence and allows the automatic realization that dynamically reconfigures.Dynamically reconfigure and more to go through following.
The framework label
XAD and XAF allow to be called the label of the another kind of type of framework label (being abbreviated as " fwk ").The framework label can be used for creating the object as the part of application program.The framework label can be used for quoting action, data source, conversion and association manager (each comfortable following discussion).In one embodiment, the application program debugging also can be carried out via the framework label.
On the simplest rank, the UI connector provides visual XAF data and in response to the ability of the incident of revising these data.In fact arbitrary specific UI connector has " element-tree " that a UI connector is presenting, one group of visual elements that can be shown.What be associated with each UI connector is that data-switching is become the code of visual elements and the code that incident is converted to editing operation.
In one embodiment, the UI connector showed simply client platform (such as Presentation Foundation (WPF) element) characteristic and incident.In addition, the UI connector provides the data binding of particular form, thereby will arrive the WPF element from the data binding of XAF data Layer.Different elements is designed to visual data of different types.For example, Image (image) element is visual by the video data of bitmapped, the visual word string data of Text (text) element, and ListBox (list box) visual may be the ordered list of inhomogeneity data.Some element also can visual " selection " to these data as ListBox and TextBox (text box).The notion of selecting is another data input basically.
Generally speaking, specific UI connector is designed to wanting visual specific type of data to work.If two elements have used identical mechanism to accept to be come by them the input (or parameter) of visual content, then the developer can write single UI connector and handle the two.Parameter is used for giving factory's object to the UI connector, and the latter is used for creating as required subobject.The UI connector provides data context to factory usually.Factory is the fragment of XAD normally, and it is packaged in the object by the XAD engine.Table 17 shows one group of UI connector that can be provided.
The UI connector The fundamental element class The Windows client platform element of supporting
SimpleUIConnector UIElement The subclass of Shape
PanelUIConnector Panel DockPanel、FlowPanel、Canvas、GridPanel
DecoratorUIConnector Decorator Border/Box
TextUIConnector Text Text
WindowUIConnector Window Window
ContentControlUIConnector ContentControl Button、CheckBox、RadioButton、ListItem、ComboBoxItem
SelectorUIConnector Selector ListBox、ComboBox、RadioButtonList
HeaderecItemsControUIConnector ItemsControl Menu、ContextMenu
TabularPanelUIConnector Panel
HeaderedContentControlUIConnector HeaderedContentControl
Table 17: the built-in UI connector of example
One type framework label (being association manager) can be used for the element of an object with a data structure or data structure is associated.For example, the tabulation association manager can be used for an object with one the tabulation in the item be associated.The list items of gained will be dynamic, and this shows that it will comprise object and quote relative with quiescent value of associated data thereof.
In the operation
Figure 28 shows according to one embodiment of present invention by the operating process that makes up the operation that device carries out, and wherein creates and object is set for use.Instantiation process 2800 is used with creation operation 2802 beginnings and with the operating process that initialization operation 2806 finishes and is carried out.Generally speaking, flow process 2800 can be carried out by single configuration service or by a plurality of services.
Creation operation 2802 is created object.In one embodiment, creation operation 2802 is created the required data structure of object.In another embodiment, creation operation 2802 is also by being required to be this data structure allocate memory.
In case creation operation 2802 has been created object, attended operation 2804 promptly is connected to other object according to the relation of this object and other object with this object.In one embodiment, make up the object created and the connection layout between one or more object that is pre-existing in.Establishment-connection-initialization sequence allows the XAD engine to support the circulation between the group objects to connect.Under the situation of data and conversion, this circulation is forbidden, and the XAD compiler is carried out certain and checked and prevent this circulation.
Line that is produced by attended operation 2804 or connection layout have defined interconnection and the mutual relationship between the object.In one embodiment, these connections will keep, up to changing by dynamically reconfiguring (following discussion), or deleted up to object.Which connection is necessary to be determined when the executive utility marker code by engine.In one embodiment, attended operation 2804 is connected to application program with the data set provider object.
The object that initialization operation 2806 initialization are created.In one embodiment, initialization relates to one or more uncertainty values is made as 0 or other predefine value.In another embodiment, initialization operation 2806 calls the constructor that is associated with object.In another embodiment, the object initialization created of initialization operation 2806 indication himself.Those skilled in the art will appreciate that initialization operation 2806 also can carry out other operation that usually is associated with the object initialization and do not depart from the scope of the present invention.In one embodiment, whether initialization operation 2806 comprises based on given object and wants initialized data and take place conditionally.In one embodiment, object can come initialization with different value based on condition.For example, the definition shown in the following table 16 will make XAD when the price of article surpasses $500 with red display in tabulation, and if price Di Yu $100 then show article with green.
Table 16: example XAD code
In one embodiment, engine uses instant (just-in-time) compiling to come executable operations 2802,2804 and 2806.In another embodiment, precompile application program.In another embodiment, use precompile and the instant combination that compiles to realize the balance of performance and dirigibility.
XAD allows application program dynamically to be reconfigured.Dynamically reconfigure and to trigger by the change that flows into application's data or the modification of the existing data of application programs.Figure 29 shows in the embodiment of XAD how dynamically to reconfigure application program.
Prison hearer (listener) is the computing machine agency, some incident of its monitor application or set of applications.XAD prison hearer monitors the change of the value of the data of some registered object in the XAD application program.Registration operation 2902 is to this prison hearer's registry object and data thereof.
When the change of data value takes place in registered object, receive from the change notice of supervising the hearer by receiving operation 2904.Marking operation 2906 identifies one or more data values of the value that depends on change then, and they are labeled as to be subjected to change influence.Analysis operation 2908 is analyzed the influence of the value of change to the data value of each institute's mark.Based on the result of this analysis, it is invalid to determine that operation 2910 has determined whether that the reformed value of any object becomes.
If one or more objects are changed to invalid, then flow process is branched off into by "Yes" and removes operation 2912, and this operation removes one or more invalid objects now.Flow process is branched off into then determines operation 2914.Determine not have object to be changed to invalid if determine operation 2910, then flow process branches no to and determines operation 2914.
Determine whether operation 2914 definite results as the value that changes require any new object.If require one or more new objects, then flow process is branched off into creation operation 2802 (Figure 28) by "Yes", and Object Creation, connection and initialization will as above be carried out in conjunction with Figure 28 describedly.Determine not look for novelty object if determine operation 2914, then flow process branches no to the end of exemplary flow.
Be the establishment of simplifying new object and the deletion of invalidated object, XAD can carry out lifetime management to object.Life cycle, the territory was the unit that reconfigures in the XAD application program.Its life span (is for example bundled each other, first object may be without any purposes under the situation that does not have second object to exist, and second object may be without any purposes under the situation that does not have first object to exist) object be placed in same life cycle of the territory.In the territory many objects can be arranged in given life cycle.When no longer requiring object, territory life cycle that all objects in the life cycle territory can will be deleted by reference (with forming contrast in order to delete the thousands of single object that may quote in the life cycle of the territory) easily deletes.Those skilled in the art will appreciate that the object in given life cycle of the territory need not be correlated with on function; On the contrary, they only need to share creation-time and interdependent property, make them to be discarded simultaneously.
In one embodiment, XAD can support the object created conditionally in conjunction with dynamically reconfiguring of application program.Therefore the object of change type can be depending on the characteristic of data value change and creates.Figure 30 shows according to one embodiment of present invention the operating process of the operation of being carried out by creation operation 2802 (Figure 28).At first, determine that operation 3002 has determined whether that any label wants instantiation.If there is label to want instantiation, then flow process is branched off into by "Yes" and determines operation 3004.If there is not label to want instantiation, perhaps all labels are all by instantiation, and then flow process branches no to attended operation 2804 (Figure 28).
Determine whether operation 3004 definite labels comprise any parameter of necessary instantiation.If there is no parameter tags, then flow process branches no to operation 3008.If there is parameter tags, then flow process is branched off into instantiation operation 3006 by "Yes".
Instantiation operation 3006 instantiations are by determining operation 3004 parameters that find.As mentioned above, parameter is used for describing how to create, connect or dispose factory or object.As described earlier, parameter can comprise one or more characteristics of factory or object, to quoting of data or quoting to another factory or object.Characteristic can be static or dynamic.
Handle operation 3010 and handle label according to its data type.There are some different types of labels, and realize some kinds of possible methods by handling operation 3010 thus.Primitive label (actual label corresponding to an object) is to handle by creating new object.In one embodiment, all objects of being created are all corresponding to entity.
Some label definition range boundary.These labels make that handling operation 3010 creates " factory ", and factory can call in the instantiation as required for entity after a while.When processing plant, create a new scope territory.Usually can check its dependency information by entity, this information can be useful during dynamically reconfiguring.
Handle operation 3010 and handle switch labels by creating switching factory.This is a factory, and it supports the branch based on the application program control of various user's specified requirementss.This factory can be used for monitoring various conditions, will trigger the branch in the application flow when satisfying these conditions.In one embodiment, when owing to handle again as the part that dynamically reconfigures label become must the time, instant compiling is used for revising object.
Handle operation 3010 and also can handle the label of other type.For example, binding tab triggers processing operation 3010 establishment factories and is actually quoting a certain other entity to indicate a certain parameter value.This roughly is similar to the pointer in the procedural language.The binding of the delay of the entity that the permission of transaction label will be created.When in one embodiment, this delayed binding is postponed till the application program operation.
After label had been handled in processing operation 3010, flow process turns back to determined operation 3002.
In one embodiment, can add plug-in unit (add_ins) to the XAD application program.Plug-in unit is can expand the essential characteristic collection of given application program and the self-contained software package that need not upgrade applications.But plug-in unit allows incrementally to add them in new feature or third party's expansion time spent that becomes, and need not to experience may be expensive the upgrading circulation.
The XAD plug-in unit is packetized in the subassembly (assembly).In one embodiment, subassembly loads by the static dependencies item of appointment in the component list (above discussing).In one embodiment, the XAD application program is communicated by letter with plug-in unit via the extensibility agreement.The extensibility agreement can define in independent subassembly, makes this agreement to be issued simultaneously and to quote with the third party that can develop this expansion by application program.
The extensibility agreement has two parts.First is metadata (Metadata) scheme.Metadata is the data of data of description.In the context of XAD, metadata can be used for describing the feature that is realized by plug-in unit.Metadata can comprise the mankind-readable text of bookmark name, the parameter that will transmit, UI etc.Extensible application has defined metadata proposal (desired from plug-in unit), and plug-in unit provides content.The second portion of extensibility agreement is a label signature (above discussion).Plug-in unit is realized its feature by the definition label.Application program uses these labels to visit the plug-in unit feature.Application program definition label signature (label should cause the entity of what type, label should get what parameter or the like), and plug-in unit provides label definition (bookmark name and actual the realization).Therefore the label signature roughly is similar to interface, and label definition roughly is similar to the interface realization.
In one embodiment, XAD supports and can set via the global metadata of metadata tag visit.Metadata tree is the associating from all metadata composition files of the subassembly of all dynamic load.When operation, metadata tree was upgraded automatically in any moment that load or unload has the subassembly of metadata composition file.Send suitable change notice, make application program dynamically upgrade himself (as before discussing) in conjunction with Figure 29.Metadata tree allows application discovery will load what plug-in unit, and the feature of utilizing plug-in unit to provide.
In one embodiment, plug-in unit has defined the label that is used to visit the feature that plug-in unit realizes.Because plug-in unit may be disabled when writing application program, so the label by the plug-in unit definition possibly can't be known and use to application author.The author may only know, and therefore may only define the label signature statically.Physical tags title and final parameter value can use metadata to provide by plug-in unit.Because metadata proposal is the part of the extensibility agreement of application program definition, so metadata proposal information can be by application access.Therefore application program can read metadata, and comes dynamically instantiation entity according to bookmark name.XAD supports to be used for the DynamicEntity label of this purpose.
Although in language, clearly the present invention has been described in action of architectural feature, method and the computer-readable medium that comprises these actions, but be appreciated that the present invention who defines in the appended claims is not necessarily limited to described concrete structure, action or medium.It should be appreciated by those skilled in the art that other embodiment or the improvement that fall within the scope and spirit of the present invention.Therefore, these concrete structures, action or medium are disclosed as the exemplary embodiment that realizes the present invention for required protection.The present invention is defined by appended claims.
Appendix A
Content
1. introduction ... ... ... ... ... ... ... ... ... ... ... ... ... .71
1.1 XAF principle ... ... ... ... ... ... ... ... ... ... ... ..71
1.2 XAF target ... ... ... ... ... ... ... ... ... ... ... ..71
1.3 the role of XAF application structure and XAD ... ... ... ... ... ... ... ... .72
1.4 norm structure ... ... ... ... ... ... ... ... ... ... ... .73
1.5 standard agreement ... ... ... ... ... ... ... ... ... ... ... .74
2. language concept ... ... ... ... ... ... ... ... ... ... ... ... 74
2.1 Hello World example ... ... ... ... ... ... ... ... ... ... 74
2.2 case sensitivity ... ... ... ... ... ... ... ... ... ... 75
2.3 entity tag ... ... ... ... ... ... ... ... ... ... ... .76
2.4 the basic parameterization of entity ... ... ... ... ... ... ... ... ... ..78
2.4.1 parametrization with static string ... ... ... ... ... ... ... ... ... 78
2.4.2 parametrization with the odd number entity ... ... ... ... ... ... ... ... .79
2.4.3 parametrization with group of entities ... ... ... ... ... ... ... ... ... 81
2.4.4 resource ... ... ... ... ... ... ... ... ... ... ... 83
2.4.5 default parameters ... ... ... ... ... ... ... ... ... ... ..83
2.4.6 additional parameter ... ... ... ... ... ... ... ... ... ... 85
2.4.7 inline data ... ... ... ... ... ... ... ... ... ... 87
2.5 by the binding parametrization ... ... ... ... ... ... ... ... ... ... .88
2.5.1 the name of label ... ... ... ... ... ... ... ... ... ... 88
2.5.2 be tied to entity ... ... ... ... ... ... ... ... ... ... 89
2.5.3 be tied to packet label ... ... ... ... ... ... ... ... ... ..94
2.5.4 be tied to the formal parameter of label definition ... ... ... ... ... ... ... .95
2.5.5 use binding to allow editor ... ... ... ... ... ... ... ... .97
2.6 main label ... ... ... ... ... ... ... ... ... ... ... 99
2.6.1 automatic pad parameter ... ... ... ... ... ... ... ... ... .99
2.6.2 command line parameterization ... ... ... ... ... ... ... ... ... .101
2.7 the piece of ignoring ... ... ... ... ... ... ... ... ... ... ... .102
2.8 the parameter of spreading out of ... ... ... ... ... ... ... ... ... ... ... ..106
2.9 white space ... ... ... ... ... ... ... ... ... ... ... ... 106
2.10 structure ... ... ... ... ... ... ... ... ... ... ... ... .107
2.10.1 single layer structure ... ... ... ... ... ... ... ... ... ... ... 108
2.10.2 nested structure ... ... ... ... ... ... ... ... ... ... ... 110
2.11 pattern ... ... ... ... ... ... ... ... ... ... ... ... .111
2.11.1 be used to give tacit consent to the pattern of purpose ... ... ... ... ... ... ... ... ... ..112
2.11.2 the patternization of the Visual tree of Avalon ... ... ... ... ... ... ... ... .115
2.11.3 patternization and visual trigger ... ... ... ... ... ... ... ... ... ..116
2.12 the parameter of setting range ... ... ... ... ... ... ... ... ... ... ... 116
2.12.1 bound variable ... ... ... ... ... ... ... ... ... ... ... 116
2.12.2 duplicator pattern ... ... ... ... ... ... ... ... ... ... .119
2.12.3 the bound restriction that scope is relevant ... ... ... ... ... ... ... ... ... ..122
2.12.4 nested duplicator pattern ... ... ... ... ... ... ... ... ... .123
2.13 parameter is inherited ... ... ... ... ... ... ... ... ... ... ... ... 127
2.13.1 restriction ... ... ... ... ... ... ... ... ... ... ... .128
2.14 conditional parameterization ... ... ... ... ... ... ... ... ... ... ... .129
2.14.1?Case...................................................................130
2.14.2?Condition..............................................................131
2.14.3?SwitchEntity...........................................................131
2.14.4?SwitchEntities.........................................................133
2.14.5 summary ... ... ... ... ... ... ... ... ... ... ... .134
2.14.6 selector switch and label definition ... ... ... ... ... ... ... ... ... .136
It is 2.15 related ... ... ... ... ... ... ... ... ... ... ... ... .138
2.16 label documentation ... ... ... ... ... ... ... ... ... ... ... ..140
3. formal language standard ... ... ... ... ... ... ... ... ... ... ... ... ..141
3.1 boolean properties ... ... ... ... ... ... ... ... ... ... ... ... .141
3.2 qualified name ... ... ... ... ... ... ... ... ... ... ... ... 141
3.3 key word ... ... ... ... ... ... ... ... ... ... ... ... 142
3.3.1?<Xad>...................................................................142
3.3.2?<Doc>...................................................................142
3.3.3?<Description>...........................................................143
3.3.4?<Type>....................................................................143
3.3.5?<TagDefinition>...........................................................144
3.3.6?<Signature>...............................................................145
3.3.7<ParamGroup〉(<Xad〉under) ... ... ... ... ... ... ... ... ... ..145
3.3.8?<Const>...................................................................146
3.3.9?<Param>...................................................................146
3.3.10?<OutParam>...............................................................147
3.3.11<ParamGroup〉(<Choice〉under) ... ... ... ... ... ... ... ... .148
3.3.12?<ParamGroupRef>..........................................................148
3.3.13?<Choice>.................................................................149
3.3.14?<ParamDefaultValue>......................................................149
3.3.15?<ConstDefaultValue>......................................................149
3.3.16?<Entity>.................................................................149
3.3.17?<Function>...............................................................150
3.3.18?<Body>...................................................................150
3.3.19?<ScopeVariable>..........................................................150
3.3.20?<AttachedParam>..........................................................151
3.4 built-in entity ... ... ... ... ... ... ... ... ... ... ... ... 152
3.4.1?<InlineData>..............................................................152
3.4.2?<Binding>.................................................................152
3.4.3?<XPath>...................................................................153
3.4.4?<Mapping>.................................................................153
3.4.5?<DynamicEntity>...........................................................153
3.4.6?<AssociatedEntity>........................................................154
3.4.7?<AssociatedDataEntities>..................................................154
3.4.8?<SwitchEntity>............................................................156
3.4.9?<SwitchEntities>..........................................................156
3.4.10?<Case>...................................................................157
3.4.11?<Condition>..............................................................157
3.5 entity makes up device ... ... ... ... ... ... ... ... ... ... ... ... .157
3.6 action ... ... ... ... ... ... ... ... ... ... ... ... ... .160
4. common framework entity ... ... ... ... ... ... ... ... ... ... ... ... ..162
5. deployment model ... ... ... ... ... ... ... ... ... ... ... ... ... 162
5.1 XAD application program ... ... ... ... ... ... ... ... ... ... ... .162
5.2 XAD subassembly ... ... ... ... ... ... ... ... ... ... ... 163
5.3 subassembly component list ... ... ... ... ... ... ... ... ... ... .165
5.3.1 component list label ... ... ... ... ... ... ... ... ... ... 166
5.3.2 exemplary components inventory ... ... ... ... ... ... ... ... ... ... 167
5.4 subassembly dependence ... ... ... ... ... ... ... ... ... ... ... 169
5.5 subassembly binding, loading and unloading ... ... ... ... ... ... ... ... ... ..170
5.6 packing situation ... ... ... ... ... ... ... ... ... ... ... .171
5.6.1 monofile application program ... ... ... ... ... ... ... ... ... .171
5.6.2 derive the storehouse of label ... ... ... ... ... ... ... ... ... ... 172
5.6.3 the storehouse of primitive label ... ... ... ... ... ... ... ... ... ... 176
6. plug-in model ... ... ... ... ... ... ... ... ... ... ... ... ... 179
6.1 what is plug-in unit? ... ... ... ... ... ... ... ... ... ... ... 179
6.2 XAD plug-in model ... ... ... ... ... ... ... ... ... ... ... .179
6.2.1 the dynamic load of subassembly ... ... ... ... ... ... ... ... ... ..180
6.2.2 the extensibility agreement of metadata-driving ... ... ... ... ... ... ... ..180
6.2.3 transaction instantiation ... ... ... ... ... ... ... ... ... .181
6.3 plug-in unit situation ... ... ... ... ... ... ... ... ... ... ... .181
6.3.1 FileExtensionProtocol subassembly ... ... ... ... ... ... ... 182
6.3.2 File subassembly ... ... ... ... ... ... ... ... ... ... ..184
6.3.3 SmartFilesAddIn subassembly ... ... ... ... ... ... ... ... 186
7. appendix A: code compiling agreement ... ... ... ... ... ... ... ... ... ... ... .187
7.1 be used for " sys " prefix of System name space ... ... ... ... ... ... ... ..188
7.2 the Pascal external packing of name ... ... ... ... ... ... ... ... ... ... 188
7.3 the signature name must finish with " Signature " ... ... ... ... ... ... ... ..188
7.4 the name of " Set " parameter must finish with " s " ... ... ... ... ... ... ... .188
7.5 the name of " Singular " entity tag must not finish with " s " ... ... ... ... ... ..188
7.6 the name of selector switch label must finish with " Selector " ... ... ... ... ... ... .188
7.7 Param (if appointment) must be first attribute of entity ... ... ... ... ... ... ..188
7.8 Name (if appointment) must be Param (if appointment) first attribute afterwards of entity ... ... ... ... ... ... ... ... ... ... ... .188
1. introduction
XAD (definition of XAF application program) is a kind of declarative language that is used for making the XAF application program.
The UI combined aspects of XAD is identical with XAML as much as possible.The further feature great majority that XAD supported are towards the data binding feature of XAF platform.
Although XAD can use multiple form to represent, it mainly represents it is with Xml's.This allows the strong engagement with XAML.Another advantage of using Xml is that the inherent data that XAD resolver and XAD developing instrument can directly be handled XAF is represented (Xml).
XAD is " through what translate " with regard to XAD developer need not to carry out any explicit compile step.This does not get rid of some compilings of carrying out on " jit compiling " backstage for performance reason.
1.1 XAF principle
XAF is the platform that is used to set up " office's class " application program of going on the market with the time of reduction greatly.The core principles of XAF is:
Xml is represented as uniform data
It is the method for setting up a kind of altitude moduleization of application program
Powerful data-switching ability
With the enrich assembled view of Avalon as the basic representation layer
1.2 XAF target
Because XAD is used to make the XAF application program, so the target of XAD is set up based on core XAF principle:
Xml is represented as the uniform data of external data and Application Status
Seamless and dynamic data binding (Xml by non-Xml data source represents) with Xml and non-Xml data source
The declarative definition of complex data stream
Use 1) the class XAML grammer or 2 of band binding additional data structure) XAML itself is to the declarative definition of UI
How data carry out conversion, demonstration and mutual rule-based declarative definition
Strong typing and senior static check
Senior expansion with minimum " built-in " set of keywords
Progressive abstraction level
Enough abundant to specify " office's class " application program with regard to following aspect
The о breadth and depth
The о performance
The о quality
1.3 the role of XAF application structure and XAD
The XAF application program is to use the technology that is different from traditional window application programming technique to make up.
Most of existing window application development technique depend on the developer and write the execution stream that code comes controlling application program.Developing instrument can comprise with the declarative mode and designs dialog box and UI pel, but the developer finally is responsible for carrying out the viewable design program of stream.The developer must write button.onrelease and the data structure of handling Application Status.The developer also is in charge of the mapping between data structure and their visual elements of expression.All these comprises the differ from one another commanding application code of (although similar bottom pattern is arranged) of each a large amount of application programs.
XAF has adopted a kind of method of different creation application program.Data, user interface and the UI of XAF declarative ground application programs and the method modeling of data interaction.The core design principle is view-data separating.The XAF application program can be considered as mainly is declarative, but has inserted commanding code segment as required.
The XAF application program is considered to data-centered; Except application program was data-centered, all Application Status also were regarded as data.Developer's major concern be that data stream is crossed the method for application program and the rule how the management application program responds to data.The practical basis structure that is used for the dynamic data binding is not that the developer is concerned about, and is provided outside by XAF.
Figure A200680014594D00781
Figure A200680014594D00782
1.4 norm structure
Although a part of back chapters and sections in this standard can be used as skilled XAD author's independently reference, generally speaking these chapters and sections interdepend and set up.
2. language concept:By normal codes sample explanation kernel language notion and structure.Although language keyword and general framework label use in sample in a large number, they are form ground definition in the chapters and sections in the back only.
3. formal language standard:The formal definition of all language keywords (language keyword can be considered to be " built-in " label in language).This section also comprises the formal definition of XAD extensible mechanism (being the label of third party's definable its oneself).
4. common framework entity:The most frequently used label that discussion is provided by standard x AD framework.These are the labels that can be used the extensible mechanism structure of XAD by the third party.The framework label helps to use recommends Design Mode and best practices to construct application program.
5. deployment model:Formal definition and the exemplary discussion of XAD based on subassembly-deployment model.
6. plug-in model:How the XAD deployment model can be used as the illustrative discussion of the declarative models of specific plug-in.
Appendix A: code compiling agreement:The tabulation of the XAD code compiling agreement of suggestion.The XAD framework of standard meets these agreements.The third party can select to adopt the part or all of of these agreements.
1.5 standard agreement
In XAD, use name space fully and Xml name space standard (http://www.w3.org/TR/REC-xml-names/) compatibility of W3C.This standard is used specific unified name space agreement in all code sample.
Figure A200680014594D00791
The label of all bands " sys " prefix all is the label that occupy in " XAD system " name space.Label in the system namespace is embedded in the language and can be regarded as the language reserved keyword.
Figure A200680014594D00792
The default names space of all code sample is " XAD standard card cages ".In this standard, all do not have the label of name space prefix all can be identified as to belong to standard card cage.In other situation, provide fwk name space, and the fwk name space should be associated with the label that belongs to the XAD standard card cage.
All code sample all in compliance with Appendix AIn coding convention.
2. language concept
This section illustrates core XAD language concept and structure by the normal codes sample.Bigger code sample with more comprehensive situation will be provided in the chapters and sections in the back.Although language keyword and general framework label use in sample in a large number, they are formal definition in the chapters and sections in the back only.
2.1 Hello World example
The XAD code is the good Xml of form always.First label of XAD file is needed as<sys.Xad 〉.This document (but and nonessential) usually has the .xad extension name.
Figure A200680014594D00793
HelloWorld.xad:
Figure A200680014594D00801
After XAF SDK has been installed, " xad.exe Hello World.xad " will cause this simple application program implementation.The XAD code there is not explicit compile step.XAD verifies (also may compile, although this can't carry out current) automatically when the XAD code is carried out for the first time.The XAD of verification step failure can not move, and is repaired up to the code error of necessity.
It below is the screenshot capture of Hello World.xad application program.
Use is catered to the XAD sample of this notion in problem each language concept was discussed originally.The fundamental purpose that lists the HelloWorld example provides certain class relevant with the XAD outward appearance basically hereinafter.
2.2 case sensitivity
Write as following:
With write as following:
<text>
Be different.
Figure A200680014594D00811
2.3 entity tag
Be not all labels among the XAD all be entity tag (have two classes to be called other label of " packet label " and " selector switch label "---they are minor changes of the entity tag of definition in being discussed later).Yet entity tag is the XAD label of the most common and most important kind.
Figure A200680014594D00812
Figure A200680014594D00813
In order to become an XAF label, the CLR object is necessary:
Derive from one of following two base class:
о Microsoft.Xaf.Core.BaseTypes.EntityElement
о Microsoft.Xaf.Core.BaseTypes.EntityComposite
Be attached to
Http:// xafteam/xafenv/doc/Platform/CoreComponents/Dev/DevIntroT oEntit YDomains.docThe specific protocol and the contract of middle definition.
It is to be responsible for the practical examplesization of entity (factory mode) and the parameterized class of entity that label makes up the device class.This label makes up device and is actually only to the interested realization details of framework extender.
3 entity tags (Application, Window and Text) are arranged in Hello World sample:
Figure A200680014594D00821
Each of these three entity tags all causes creating an entity when executive utility.
The Application entity is " coordination " application program and the root level entity of controlling top level view.
Window is a UI entity of being responsible for the display application program frame.
Text is a UI entity of being responsible for videotex (being " Hello World " in this case).
Entity tag defines by the statement form, and for example the Text label definition begins as followsly:
Figure A200680014594D00823
Figure A200680014594D00824
Entity tag can be divided into all kinds.But these types are supersets and in fact corresponding to the CLR type of the entity that is associated with label.In a large number some examples of the type of being used by standard card cage are sys: DataSys: EventHandler, fwk:UIElement and Sys:Selector.
Generally speaking, label is added to differentiation between Framework or the System name control based on following criterion:
1. if:
A. label is signed and issued by the internal engine interface,
B. version has the progress identical with kernel language
Then add System to
2. if:
A. can't help the internal engine interface and sign and issue,
B. version does not have the progress identical with kernel language
Then add Framework to
The statement in its definition of the type of entity then is the Text label, and its type is specified as follows in its label definition:
Figure A200680014594D00832
2.4 the basic parameterization of entity
In the chapters and sections, we determine that entity tag causes object (XAF entity more specifically) to be created when operation in front.Yet for useful object, it needs certain significant parametrization.
This section covers the parametrization of the citation form of XAD entity.
2.4.1 parametrization with static string
XAD allows many distinct methods of statement entity parameter.A kind of common form is:
This statement indication Text entity has type for " Data ", more specifically be the parameter of " Text " by name of " String Data ".
The practical examples of Text entity seems to be similar to:
Figure A200680014594D00841
Figure A200680014594D00843
Figure A200680014594D00844
Figure A200680014594D00845
In one joint of back, will introduce<sys:Inline Data how label and will discussing can express with " ./", " " static state string that begin or that be ". " fully.
2.4.2 parametrization with the odd number entity
In the example in front, select to use hard coded string or static string to specify the text of Text UI element.Might change into the entity that produces string and come parametrization Text element.Consider to produce the random words connector entity of random train:
Figure A200680014594D00846
(the corresponding Type attribute of listing the statement of type family (Random Font Family) at random and mainly being for the FontFamily parameter of emphasizing Type attribute and Text is complementary.)
Parameterized FontFamily seems to be similar to another entity:
Figure A200680014594D00847
This can be pronounced " the type family entity is as the effective FontFamily parameter of Text entity at random ".
Figure A200680014594D00849
Figure A200680014594D008410
This has only hinted that the user definition parameter can not be named as " Param ".It is illegal being write as following:
Figure A200680014594D00851
In order to understand better, consider in the entity layering structure, to have the following example of an additional layer with the parametrization of other entity to entity:
Xml File Data Source entity comes parametrization with the title of the Xml file that comprises a numerical listing.The FileConnector entity can be regarded as having produced a numerical listing.Highest Value Transform comes parametrization with a tabulation (being provided by Xml File Data Source) in this situation.
Highest Value Transform produces the tabulation-item with mxm..Then, the Text element uses the tabulation-item that is produced by Highest Value Transform to come parametrization (as long as the type of this list items is that sys:Data and target type are fwk:String, it just can be consumed by Text).
Following diagrammatic sketch helps to illustrate the nested data stream in this generation:
Figure A200680014594D00853
The method that another kind is write is not use the Param attribute; This is easier to understand usually:
As appreciable from above Xad, use the Param sentence structure to make the Xad application program can be more simple and clear.Yet using this grammer is pattern and the problem of NOT-function.
2.4.3 parametrization with group of entities
What paid close attention to up to now all is the odd number parametrization.The odd number parameter is the parameter of getting an entity at most.Yet the parameter that an above entity is got in statement is possible.Consider:
Figure A200680014594D00862
Hint that as its title FlowPanel (streaming panel) element shows the stream of UI element.The explicit UI element set that will " flow " can be specified by " Children " (child's) by name parameter.
The FlowPanel example can be designated as:
Figure A200680014594D00863
The group of entities of appointment is corresponding to " Children " parameter of FlowPanel under the FlowPanel.Childen packet label.
The gained diagrammatic sketch seems to be similar to:
Chris?Hackmann
Vlado?Hristov
William?Aitken
Figure A200680014594D00872
If only specified a sub-UI element, then write as following still effective for a FlowPanel:
Figure A200680014594D00873
Notice that the parameter that will " Param " be used to get group is effectively (to need only and only specify an entity):
Below also be effective:
Figure A200680014594D00876
It also is possible being write as following
Figure A200680014594D00877
Using XQuery is effectively, because it is used as the value (by Param=" FlowOrientation " expression) of the FlowOrientation parameter of FlowPanel.If Param=" ... " is removed, then this can become invalid Xad.
2.4.4 resource
Figure A200680014594D00882
Exist in and obtain the special parameter that is called " Resources " that implicit expression is supported on all entities.Sole exception is the sys:InlineData that does not support Resources.The Resources parameter is used to any group of entities is anchored under the given entity.
The Resources parameter usually is used as " grab bag " of action and state in the superlative degree of application program.These actions and state use in whole application program then, for example:
Figure A200680014594D00883
The method that the UI element is tied to state and/or action will become apparent when XAD binding structure is discussed." Name " attribute of relevant data connector and action also will illustrate in the context of binding.
2.4.5 default parameters
The method of the two kinds of designated parameter among the XAD of having touched upon up to now; Use " Param " attribute and use packet label.Yet Hello World sample neither uses:
Figure A200680014594D00891
Reason is that Hello World sample depends on " default parameters ".It can be rewritten as follows:
Figure A200680014594D00892
The label definition of application program comprises similar following delegation:
Figure A200680014594D00893
Figure A200680014594D00895
Recall above FlowPanel example:
Figure A200680014594D00901
This need not packet label (being FlowPanel.Children) and just can rewrite, because be designated as default parameters for FlowPanel entity " Children ":
Figure A200680014594D00902
Figure A200680014594D00903
2.4.6 additional parameter
We determine how entity can state a closed parameter group up to now.Consider following XAD fragment now:
Figure A200680014594D00904
It is as follows that the gained view seems that some is similar to:
The Text entity is designated as " Children " parameter of DockPanel (stop panel) entity.
Recall: do not need packet label, because Children is the default parameters of DockPanel entity.
Note, what is interesting is that " DockPanel.Dock " is designated as each Text attributes of entities.Yet " DockPanel.Dock " is not to one of Text entity designated parameters in label definition.
Recall: up to now, the example of label only can use the attribute that is defined as parameter in its respective labels definition.
" DockPanel.Dock " is an example of additional parameter.In fact, it defines when statement DockPanel entity:
Figure A200680014594D00912
In other words, for each the UI element that is designated as a Children parameter part, might specify the additional parameter of DockPanel.Dock by name.
The technical limitation of (by the Xad engine) of additional parameter (not violating any known Vl situation) is to specify non-odd number additional parameter.For example, it is illegal being write as following:
Figure A200680014594D00913
Figure A200680014594D00915
(the Managed Avalon type of TargetType definition bottom, i.e. definition is used for the Avalon type of " Dock " additional param.)
The term additional parameter is derived from parameter by the father's (but not entity itself) " providing " of entity or the fact of " adding ".
In addition, the DockPanel.Dock sentence structure is used for the character of parameter is labeled as an additional parameter.First aspect, the DockPanel definition provides the entity of this parameter.The while second aspect, Dock is defined in the title of the additional parameter that defines in the label definition of DockPanel.
Figure A200680014594D00921
Figure A200680014594D00922
2.4.7 inline data
In example up to now, specified simple static string, or depended on the data introducing XAD that data source will be more complicated by attribute.
Inline Data (inline data) entity is that the type that can be used for simple and complicated data are directly embedded among the XAD is the System entity of " sys:Data ".
Replace being write as following XAD:
Figure A200680014594D00923
Data from Data.xml directly might be embedded XAD:
Figure A200680014594D00924
Also might use Inline Data entity to specify simple textual value (although the attribute sentence structure can be much simple and clear).For some rim condition such as the character string that starts with " " or ". ", Inline Data entity is the unique method of directly specifying string in XAD.
Figure A200680014594D00931
The gained view shows:
$500
1) (says) and require to probe into the thinking of easily avoiding simple characters ' ' and '. ' according to Tony W.In ' $ ' situation, seem to use ‘ $$ '.It seems without any the method that is easy to avoid '. '.
Figure A200680014594D00932
2.5 by the binding parametrization
2.5.1 the name of label
Figure A200680014594D00933
This only hints that user-defined parameter can not be named as Name.It is illegal being write as following:
Figure A200680014594D00934
Figure A200680014594D00935
We do not discuss the selector switch label as yet, but this statement hints that all entities and packet label can be named now.This name is the purpose that is used for allowing binding (having another name called entity shares) purely.For example:
Figure A200680014594D00936
We do not introduce the notion of scope as yet, but for ease of discussing, it is just enough that some parameter is considered as introducing a new range.This statement represents that if there is not such " scope introducing " parameter in the main body of label definition, then name must be unique in the main body of label definition.
If a plurality of scopes are arranged, then loosen the uniqueness of name restriction in a label definition.Name only must be unique in given range.This should become more clear when range parameter is discussed.
2.5.2 be tied to entity
To a common data source, consider two views.Aspect XAD, this will be referred to 3 entities: 2 UI element entities and a data source entity of sharing.
Figure A200680014594D00941
In discussion up to now, man-to-man mapping is always arranged between the parameterized entity with it at entity and they.Yet the shared of entity is understandable average case.XAD has necessity structure of this situation of realization:
Figure A200680014594D00943
Figure A200680014594D00944
This will be illegal below expression:
Figure A200680014594D00951
The type of Beep Command entity is " sys:EventHandler ", but the type of Text parameter is " sys:Data ".
In the above example with table (Table) and tree (Tree), MyTable.xml has following form:
Figure A200680014594D00952
Tree can consume any tree, but Table requires the data (requiring the situation of data promptly) of table shape.
Comprise following content what will take place if consider now that Table.xml changes into:
Figure A200680014594D00953
This Table will finish to be tied to non-table data (<SearchResult〉label).
In order to solve this mismatch, Table must be written as again to the binding of its Table parameter:
Figure A200680014594D00961
This binding is interpreted as " the Table Wire Parameters of Table is set interior myd:TableData element to the Xml that the entity by SharedDataSource by name returns ".
Be important to note that: $SharedDataSource is tied to the root of Xml file, Ji $SharedDataSource another name<SearchResults... 〉.Therefore, Wei Zhi $SharedDataSource/myd:TableData is similar to and specifies myd:SearchResults/myd:TableData.
Being also noted that the use of name space prefix on this position---this is very important.
Because the Xml file has been specified the default names space of xmlns=" MyData ", so name space identical when attempting visit data must be used in the binding position in the Xad.In most of situations, the Xad application program is used as the default names space with Xad Framework name space.
Therefore, if binding is designated as:
Figure A200680014594D00962
And the Framework name space is the default names space in the Xad application program, and then this binding will be interpreted as:
Figure A200680014594D00963
Obviously, this will not provide the required data from the Xml file.Therefore, statement xmlns:myd=" MyData " name space is very important.So do not do usually is the cause of many destructive application program bug.
Figure A200680014594D00964
Figure A200680014594D00965
The entity that in fact can be tied in the main body of given label definition is limited by the notion of scope.This will more in depth touch upon when introducing the notion of range parameter following.
Effective relative position
Use in following Xml file (RelLocData.xml) the relative position example below:
Figure A200680014594D00971
Figure A200680014594D00972
The specify text element
Figure A200680014594D00974
Generation value: Stephen Danton
Figure A200680014594D00975
Some details of knowing
A critical aspects of noting is how relative position is mapped to the bottom data source.Note , $RelLocData Generally be not mapped to the Xml documentOn the contrary, it is mapped to the root of the document:<TableData... 〉.Another kind of thinking Shi $SomeBinding is as the another name of the Xml root of its institute's binding data.Can be write as for this reason ...
Figure A200680014594D00981
... because it is with to be write as myd:TableData/myd:Employees identical in fact ...
Some others of knowing are when to use binding., $SomeBinding is not directly bound to the text element of data and it is shown as its value when data source has root, for example:
Figure A200680014594D00982
Specifying Text=“ $UnrootedData " situation in, can Kan Dao $UnrootedData map directly to character string " Where is my root? "
Should be understood but easily the explicit final situation that accesses be to have only the data source of root (root only), for example:
Figure A200680014594D00983
, $RootOnlyData is mapped to label<Root in this case〉also turn back to first text element under this label acquiescently, promptly go here and there " I Root therefore I am ".
The value of specified attribute
Figure A200680014594D00984
Generation value: 1.
Figure A200680014594D00991
Specify specific child
Figure A200680014594D00993
Generation value: Andy Wassyng (being second son of Employees).
Figure A200680014594D00994
2.5.3 be tied to packet label
Except being tied to the entity tag, might be tied to packet label.For example:
Merge Tree Transform (merging the tree conversion) entity has the parameter that type is a group object of " sys:Data " of getting that is called " Trees ".By being tied to Resources (resource) packet label, Merge TreeTransform quilt " binding " arrives this group object under the Resources packet label.
2.5.4 be tied to the formal parameter of label definition
Even this theme is to discuss in the context of binding, its in fact not only relevant Wire Parameters.It shows how to use XAD easily to create the label with abstract progressive rank (the spitting image of the function in the conventional language).
Consider following XAD fragment:
Figure A200680014594D01001
Comparatively actual is that supposition is wanted this XAD fragment is become the abstract of " TableWithCaption " by name.The spitting image of using function, this abstract user can want to make certain behavior Reparameterization.This can realize by the novel entities label of creating " TableWithCaption " by name.This label will be got 2 parameters: " Caption " and " TableFile ".XAD author can realize it by pure declarative definition:
Figure A200680014594D01002
The attention formal parameter is used with the duplicate mode of quoting in the label definition main body of entity and is quoted.
Figure A200680014594D01003
Figure A200680014594D01004
Figure A200680014594D01011
Figure A200680014594D01012
This is equivalent to and does not allow formal parameter to cover by local variable.It is illegal being write as following:
Figure A200680014594D01013
The abstract average case of establishment such as TableWithCaption will provide the default value of partial parameters.Label definition is for the usefulness of specifying such default value.In this case, the Caption parameter is designated as and can chooses wantonly, and is defaulted as string " Results ".
Figure A200680014594D01014
The instantiation of " TableWithCaption " will no longer need Caption (title):
Figure A200680014594D01015
If the silent string that admits a fault, then the statement of this acquiescence will comprise inline entity tag.For example:
Figure A200680014594D01021
2.5.5 use binding to allow editor
Setting<sys:InLineData〉on Writable (can write) attribute make Inline Data (embedded data) entity to write.
Figure A200680014594D01022
Following example illustrates can write the common use of Inline Data entity as " scratchpad (scratchpad) " in the XAD.
Figure A200680014594D01023
When at first showing Text, shown text is the initial value of Inline Data entity:
Bye
" MouseLeftButtonDown " is that type is the parameter of " sys:EventHandler ".Run at the Text entity and call when left mouse button is pressed incident with the corresponding action of " MouseLeftButtonDown " parameter (by Param=" MouseLeftButtonDown " expression).
In this case, SetTextValueAction will be called, and will change in the Inline Data entity<Greeting〉textual value of element.This be because SetTextValueAction via Data (by Data=“ $Scratch Pad " expression) Wire Parameters to Inline Data entity.In a word, the received left mouse button of Text is pressed incident and will be caused Text to show:
Ciao
Similarly, right mouse button is pressed incident and will be caused Text to show:
Au?Revoir
But action is a kind of common methods that realizes the editability among the XAD with the binding of write data.
Consider to relate to a kind of slightly different situation of in form, inserting newline:
Figure A200680014594D01031
If CDs.xml comprises following:
Figure A200680014594D01032
The then initial form that shows seems and will be similar to:
Achtung?Baby U2 19.99
Firestarter Prodigy 21.99
When form received right mouse button and presses incident, AppendSibling Tree Action will be called and will the value of its Tree attribute appointment be added on the node that is provided by its Sibling (brother) param.After this this tree will be similar to:
Figure A200680014594D01041
Because to the renewal of this tree, this form shows to upgrade automatically makes it to seem as follows:
Achtung?Baby U2 19.99
Firestarter Prodigy 21.99
? ? 0.00
2.6 main label
Can see that in the Hello of above standard World example the entrance of Xad application program is similar to the principal function in C or the C# application program.When Xad design time shell, i.e. in Xad.exe when operation,, it searches " Main " label definition, i.e. the label of Name=" sys:Main " and used as the entrance that is application program.
Continuation about with the similarity of generic command language, sys:Main label definition available command row value is come parametrization.In addition, three predefine values of the value of providing automatically are provided after executive utility for it.
2.6.1 automatic pad parameter
The sys:Main parameter tags is kept 3 names, and they are XadBaseDirectory, InitialWorkingDirectory and MetaData.They each showed in an identical manner and bound.In addition, they all are read-only.Below will present an example using the XadBaseDirectory parameter.
XadBaseDirectory usually is used as the value of its BaseUri parameter explicitly with XmlFileDataSource, consider following Xad...
Figure A200680014594D01051
... $XadBaseDirectory will be searched on the position of the file that passes to Xad.exe (being the design time shell of Xad application program) as the file that the value representation of BaseUri is associated with DataSource.So, if foo.xad is application program and it be positioned at C: xaf demos personal, then XadBaseDirectory will equal C: xaf demos personal, and will in this directory path, search for by the file of File definition.
Automatic filling value with 3 retention parameters of giving a definition:
XadBaseDirectory-represents the Xad base directory of this application program, promptly start the catalogue of this application program but not start the string of the position of Xad.exe
InitialWorking Directory-represents the initialization catalogue of this application program, promptly start the catalogue of this application program but not start the string of the position of Xad.exe
Current all that are associated with this application program of MetaData-are written into the tree of the merging metadata of assembly.
Following Xad application program illustrates the use of all three parameters ...
Figure A200680014594D01062
2.6.2 command line parameterization
Except the sys:Main parameter of the automatic filling that keeps, application program can be specified any amount of parameter with other names such as parameter as sys:Main.These parameters can be by parametrization on order line, and can be used for the application deployment of all modes.Following Xad provides the sys:Main parameter of appointment, provides an example of this order line of its value then ...
... order line ...
xad?CommandLine.xad/TextData=Testing
... more generally ...
Xad<application file〉[/<parameter name 1 〉=<value 1〉[/<parameter name 2 〉=<value 2〉[...]]]
[Switches]
... obtain following application program ...
Figure A200680014594D01072
(value that is delivered to command line parameter needs not to be plain text, and it can be filename, picture position etc.)
2.7 the piece of ignoring
Recalling Xad is a kind of language based on Xml.More specifically, any Xad code NecessaryBe effective Xml.This has produced interesting restriction when attempting with " note goes out and code " method exploitation Xad application program.For the purpose of clear, Xml does not support the nested of note, and for example following Xml is illegal:
Figure A200680014594D01073
Therefore, with different, in the Xad of any specific sentence structure of not supporting this operation, be impossible to the note of note such as imperative languages such as C++ or C#, this feature become sys:IgnoredBlock by name label form and be defined as follows.
IgnoredBlock (piece of ignoring) label can be positioned at<sys:Xad〉arbitrary place under the scope, as long as remaining Xad is effective.Below the consideration ...
Figure A200680014594D01081
... the Xad comment tag can not be surrounded any in these elements, because they all are essential for an effective Xad application program.
Occur making the first time of IgnoredBlock label it and its child to be ignored, consider following effectively Xad... by the Xad verifier
Figure A200680014594D01082
... add following IgnoredBlock label ....
Figure A200680014594D01091
... make it become invalid Xml and invalid in this case Xad.Therefore, the Xad verifier will be reported the mistake of invalid Xml, because Xad must be effective Xml before can carrying out further inspection.
As long as the validity of nested maintenance Xml just allows nested<sys:IgnoredBlock〉...
Figure A200680014594D01092
Consider following demonstrations<sys:IgnoredBlock〉Xad of the Xml note of outside
Figure A200680014594D01093
... be regarded as a big Xml note, promptly IgnoredBlock does not have specific function, and it only is a character string in the Xml note at this.
An Xml note<sys:IgnoredBlock is surrounded in consideration〉outside Xml note ...
Figure A200680014594D01101
This is illegal.As mentioned above, Xad must be effective Xml always.Recall: can not surround the Xml note with note according to definition.
,<sys:IgnoredBlock different with the Xml note〉can not be used for avoiding invalid Xml...
Figure A200680014594D01102
... above Xad will return the inspection mistake of an invalid Xml:<FP 〉,<A〉and<B〉there is not an end-tag.
Yet, be fine if add the Xml note ...
Figure A200680014594D01103
The IgnoredBlock label can not be used for note and go out the inside of sys:InLineData, considers following Xad...
Figure A200680014594D01105
... above code is interpreted as " inline data ",<EFG〉</EFG be not left in the basket, in fact<sys:IgnoredBlock become<EFG father.Therefore, the inline data data definition that in fact will be easier to see is ...
Figure A200680014594D01111
2.8 the parameter of spreading out of
Figure A200680014594D01112
2.9 white space
All enter the Xad application's data and all are regarded as " tale quale "---and no matter specify or define statically by Xad author by data binding.Therefore, Xad will not show any UI assembly dedicated controls that is used to control white space.This expression, different with Xaml, not in that UI element level display xml:space=" Preserve|Default "-this is the unjustified zone of Xad and Xaml.
Select not support in each UI element, data source, conversion etc. that " keeping white space " parameter will allow us that Office class application program is taken up---the white space management that is this type is unpractiaca to Office class application program.On the contrary, we show WhitespaceTransform (white space conversion) (temporary name-MM3 feature), with allow Xad author's definition as how more the mode of the overall situation/data-driven handle white space.
Consider following situation ...
All white spaces are considered as tale quale (as is).The meaning is if having following Xad...
Figure A200680014594D01113
... then be revealed as:
“Steve”
Similarly, for ...
... it is revealed as:
“Steve”
Similarly, for ...
Figure A200680014594D01121
... it is revealed as:
“Steve”
Equally ...
<Text?Text=“$foo”/>
Qi Zhong $foo=" Steve "
(all of the value of Dui $foo derive and repeat.)
Figure A200680014594D01122
2.10 structure
The structure that lacks in the XAD is not got rid of the Any Application function.Yet, simplify several workflow really for big XAD application structure.
Consider to have in an action (preservation) of top layer definition and the application program of three states (document, user preference and enterprise's preference recently).If this application program has several panes (being modeled as the derivation label of type for " fwk:UIElement "), then problem is:
1. each parameter must be passed to each pane (data parameters can be used to reduce the quantity of data parameters via the gathering of Xquery, but can not help non-data parameters) by explicitly
2. adding an additional act (for example printing) requires to add a new argument (attention, the change that can avoid the label definition of each pane if pane is designed to share parameter group to each pane; Yet all pane examples still need be updated)
3. not (class that by its attribute is other class does not realize with typical OO with the mechanism of parameter grouping according to nested classification; Realize with XAF via attachment unit interface)
This situation by following illustration further to illustrate:
Figure A200680014594D01131
For ease of explanation, " single layer structure " (to solve preceding two problems) at first will be discussed, be generalized to " nested structure " (to solve the 3rd problem) then.Collective's feature that a conduct " structure " is in fact only arranged.
2.10.1 single layer structure
Following XAD will be write becomes the signature of specifying this structure:
Figure A200680014594D01133
Use the composition of sample of " app:ActionsAndDataSignature " signature to be:
Figure A200680014594D01141
Figure A200680014594D01143
Structure can be used in label definition, and an one example is as follows:
Figure A200680014594D01145
An example of pane will be:
Figure A200680014594D01146
In main body, below binding will be that all parameters of " sys:EventHandler " are effective to type:
·“$ActionAndData.PrintAction”
·“$ActionAndData.SaveAction”
In main body, below binding will be that all parameters of " sys:Data " are effective to type:
·“$ActionAndData.RecentDocuments”
·“$ActionAndData.UserPreferences”
·“$ActionAndData.EnterprisePreferences”
Notice that if as an example, user preference is by the data tree modeling of following form:
Figure A200680014594D01151
Then might be via “ $ActionsAndData.UserPreferences/AutoSaveFrequency " be tied to automatic preservation frequency configuration.
In main body, below binding is to all parameters of signature " app:ActionsAndDataSignature " (normally require the action of access application and hobby other derive the parameter of label) effectively:
·“$ActionAndData”
2.10.2 nested structure
Same situation can use nested structure (only being the popularization of single layer structure) to solve:
Figure A200680014594D01152
Figure A200680014594D01153
Figure A200680014594D01154
Figure A200680014594D01155
In main body, below binding will be that all parameters of " sys:EventHandler " are effective to type:
·“$ActionAndData.Actions.Print”
·“$ActionAndData.Actions.Save”
In main body, below binding will be that all parameters of " sys:Data " are effective to type:
·“$ActionAndData.RecentDocuments”
·“$ActionAndData.Preferences.User”
·“$ActionAndData.Preferences.Enterprise”
In main body, below binding is to all parameters of signature " app:ActionsAndDataSignature " (normally require the action of access application and preference other derive the parameter of label) effectively:
·“$ActionAndData”
In main body, below binding is to all parameters of signature " app:ActionsSignature " (normally only requiring other of action of access application to derive the parameter of label) effectively:
·“$ActionAndData.Actions”
In main body, below binding is to all parameters of signature " app:PreferencesSignature " (normally only requiring other of hobby of access application to derive the parameter of label) effectively:
·“$ActionAndData.Preferences”
2.11 pattern
Mainly being applied as of Avalon pattern:
The property value of acquiescence element-specific
The outward appearance of the Visual tree under the acquiescence element-specific
Acquiescence is to the input response (visual trigger) of element-specific
Specify the child of the repetition that how to show a control
These are divided into three classes:
1. be included in the each side of the pattern among the SDK1; By with the vague generalization of XAML model and make it can be applicable to XAD specific concept (for example deriving label) to come other interpolation value; This grammer is also nonessential to be identical, and only needs enough approaching to be defined as alignment area.For example, default property value.
2. the promising and each side of the pattern that comprises on the vague generalization degree of not having substantive design; These are valuable aspects and require to comprise in some way back-SDK1: for example Visual tree and visual trigger.
3. flimsy and unlike for the each side of making the pattern that " office's level application " can bi-directional scaling as current design; They solve by preferred XAD method.For example show and repeat child.In addition, can support the XAML method for compatibility, but these decisions will be made back-SDK.
The field that this document is conceived to comprise in SDK1, i.e. default property value.
2.11.1 be used to give tacit consent to the pattern of purpose
The XAD engine is designated as processing by name<sys:Style of resource〉specific label.The specify default parameter value will be allowed, and the UI entity will be not limited to.Below be an example of acquiescence appointment:
Figure A200680014594D01171
This is illustrated in specifies before another the default style TextBox, and the XAD engine will carry out following action when creating TextBox:
Only when not specifying clear and definite Width (width), its Width is set at 100%
Only when not specifying clear and definite Height (highly), its Height is set at 100%
Only when not specifying clear and definite Background (background), its Background is set at solid red paintbrush
Figure A200680014594D01172
The stratified environments that " style information " will keep with the XAD engine is simply stored so that link.Searching of pattern is the hash search and the Walkthrough tree that need not to make progress.Can be different at this with Avalon, because utilized the artifactitious fact (delay process range) when having the XAD operation.In addition, relate to the method that travels through Visual tree with the acquiescence of strictness restriction to the UI entity.
Closing a pattern can be by realizing the entity designated parameter of wanting design pattern.Below will forbid any previous pattern of TextBox:
Figure A200680014594D01181
Default value can be applied to derive label with being equal to:
Figure A200680014594D01182
An example that is applied to the default value of non-UI entity is:
Figure A200680014594D01183
If AccessMode (access mode) parameter of XmlFileDataSource is not clearly specified in this expression, then it is set to ReadOnly.
Notice that call parameter must be specified in XAD.It is impossible depending on and setting call parameter by pattern (for example Path of XmlFileDataSource (path) parameter).This restriction exists writes to allow.The existence that depends on pattern is fragile.
Figure A200680014594D01184
In addition, may be on type hierarchy specify default:
Figure A200680014594D01191
This is illustrated in specifies before another the default style UIElement, and the XAD engine will carry out following action when creating arbitrary UI connector:
If
1. support the Width parameter
2. and not clearly specify the Width parameter
3. and do not specify the special-purpose pattern (for example TextBox special use pattern) of the UI element of discussing, then Width is set to 100%
The same for Height
The same for Background
2) strict type matching? should perhaps check " near IsAssignableForm " coupling in addition?
The type checking of pattern is more not stricter than conventional XAD.Particularly:
Because each UIElement can introduce its parameter, so will not check parameter on " type pattern " (for example, above " UIElement " example).If type is for signature and therefore specified some parameter, those parameters will be through type checking (because do not allow to cover parameter, so this is possible) in XAD.
In the pattern the value of additional parameter will be examined, be about to forbid DockPanel.Dock=" Garbage ".Yet, any additional parameter through statement might be written on the pattern.For example, even pattern can be applicable to not to be the child's of DockPanel TextBox, also may be write as follows:
3) will mark overall additional parameter.This all will require to be used for the back-SDK1 of bubbling incident in any case.
Similar to XAML, will support implicit system level Wire Parameters by being called " Style " (pattern) on all entities to a special style.
Figure A200680014594D01201
Yet this pattern still need be in scope.Note.The scope restriction really is not exclusively used in pattern, but the result of the binding model that draws the line.If desired, can support and overall situation binding, but will check at present what degree the model that draws the line can use such as the particular type of Styles.
Even it does not have practical application, but note may being write as follows for for the purpose of the consistance:
Figure A200680014594D01202
Being tied to pattern is type-safety.Therefore will cause mistake below:
In a word, will support the model of Avalon to use pattern and interpolation value with acquiescence in several zones:
Default value is applied to all entities (only be not UI entity)
Default value is applied to derive label (but not only primitive label)
Acquiescence can be finished (Avalon finally very likely supports this) on the type layer of for example all UIElement
To not realize acquiescence on the type level for SDK1.
2.11.2 the patternization of the Visual tree of Avalon
To finish by back-SDK1 together with corresponding UI connector design this regional XAD design.
2.11.3 patternization and visual trigger
To finish by back-SDK1 together with corresponding UI connector design this regional XAD design.
2.12 the parameter of setting range
Some parameters are introduced a new scope.The parameter of introducing new range has and is made as genuine " NewScope " attribute:
Figure A200680014594D01211
Can select the introducing scope for different cause parameter:
Introduce bound variable
Introduce the delay of a unit and/or repeat work
More than all
To in this section, define the variable of setting range and delay/the repeat notion of work.
Be present on the range boundary with the entity of the parameter correlation of setting range connection.Rely on the advantage of their associated parameters, they introduce a range boundary.The nested scope of following illustration introduces entity and how packet label produces a range tree:
Figure A200680014594D01212
2.12.1 bound variable
The reason that parameter is introduced new range is to introduce one group of variable in scope.These variablees quite look like formal parameter, and its difference is that they are implicit declarations.The variable that is tied to setting range is realized to be tied to the identical method of formal parameter.
The variable of setting range is introduced parameter with scope of a declaration and is stated.For example, consider the label definition of Text:
Figure A200680014594D01221
The sys:ParamGroupRef definition is quoted the sys:ParamGroup label, and this seems as follows:
Note the definition of the sys:Param of MouseLeftButtonDown by name.It specifies the sys:ScopeVariable of NewScope and Position_X by name.
This expression: no matter when use the MouseLeftButtonDown parameter, it is all incited somebody to action:
1. introduce a new range
2. the sys:ScopeVariable that shows Position_X by name
The main points of the variable of setting range are to allow such as following situation:
Figure A200680014594D01223
The Xad that is used for this application program is as follows:
Figure A200680014594D01231
For all examples, will encourage you to move the function of this Xad with this application program of perception.
By using the bound variable that is associated with MouseLeftButtonDown, can press the position of upgrading orange rectangle when incident takes place as mouse button at every turn.Further check event code ...
Figure A200680014594D01241
... see two bound variable: Position_X of MouseLeftButtonDown parameter display and Position_Y.Use the parameter identical to finish to the binding of the value of those range parameters with all Xad bindings.
Figure A200680014594D01242
For example, below will be illegal ...
... because Position_X is showed by MouseLeftButtonDown.
2.12.2 duplicator pattern
Although the duplicator pattern is used by various entity types, its purposes is illustrated best by the Compound in the XAD standard card cage (compound) entity.The compound entity of data-driving is bound to data-collection, and for these data-each concentrated data item, it shows one son-element.
In many samples, used the FlowPanel entity up to now.This FlowPanel entity really has two kinds of patterns:
(son-entity that will show is by the explicit Children of the being appointed as parameter) of regulation
And (the duplicator pattern that use will define in this section) of data-driving
The definition of FlowPanel entity is not merely around Children parameter (as proposing in each example up to now).Its label definition seems more to be similar to following:
Figure A200680014594D01251
With specify son-entity opposite in accordance with regulations, might specify Data parameter and RepeatedChild parameter.This inserts the FlowPanel entity in " data-driving " pattern.
Note, FlowPanel label definition use<sys:Choice〉label, any realization of these these labels of labeling requirement, with use Children parameter (thereby definition regulation layout) or Data and RepeatedChild<sys:ParamGroup between select.
Figure A200680014594D01252
The RepeatedChild parameter is for each instantiation entity repeatedly among the Data.
Figure A200680014594D01253
The bound variable that has a DataContext by name by the scope of RepeatedChild parameter introducing.This variable is set to and corresponding of the sub-view of wanting instantiation.
Following fragment illustrates with the use of data-type of drive to the FlowPanel entity:
Figure A200680014594D01261
Suppose that List.xml comprises following Xml:
Figure A200680014594D01262
For each list items, the FlowPanel entity all will be created a Text entity.For first Text entity, the value of DataContext bound variable will be:
The $DataContext/@Name binding will produce Name (name) attribute.When Text was bound to an attribute, it was shown as the property value of " Chris Hackmann " in this case.
This is equally applicable to each tabulation-item.If viewport (view-port) is enough big, then the FlowPanel entity will show below on screen:
Figure A200680014594D01271
Each provisional capital is corresponding to an instantiation of Text entity.Is the value of " DataContext " bound variable from an instantiation to what another instantiation changed.This pattern is called as " duplicator pattern ".It is among the XAD on data set the basis of iteration.
Because specific shorthand notation '. ' (single-point or fullstop), binding can be rewritten as ./, should '. ' be retained with the unique DataContext of being used for bound variable.
Figure A200680014594D01272
Figure A200680014594D01273
Figure A200680014594D01274
2.12.3 the bound restriction that scope is relevant
Scope is introduced some bound restriction.Binding from outer scope to interior scope is under an embargo.Yet the binding from interior scope to outer scope as shown below is allowed to.
Figure A200680014594D01281
Label in being tied in the scope is under an embargo.
2.12.4 nested duplicator pattern
In a joint of relevant " duplicator pattern ", illustrated how on data set, to realize simple iteration.In this section, will consider a kind of more complicated situation.
Begin to consider following simple data collection:
Figure A200680014594D01282
Consider the following view of this simple data collection:
Customer Description Price
Luis?Figo Toaster 49.99
Luis?Figo VCR 199.99
This view can easily be realized with Table (form) entity, but will be limited to FlowPanel and Text entity for the purpose of illustrating:
Figure A200680014594D01291
For the people who is familiar with imperative language, only the iteration aspect can be by generally modeling is as follows:
Figure A200680014594D01292
Consider now following slightly complicated data set:
Figure A200680014594D01301
Consider this following view of complex data collection:
Customer Description Price
Luis?Figo Toaster 49.99
Luis?Figo VCR 199.99
Lilian?Thuram DVD?Player 279.79
Lilian?Thuram Receiver 549.99
Lilian?Thuram Sub-woofer 350.00
Unique real difference in this situation is to have extra one-level iteration.
With different, incite somebody to action at first iteration on one group of purchase order in the last iteration of single purchase order (Purchase Order).For each purchase order, still will generally do identical thing.Main difference is that customer (client) hurdle will be the function of " outside " iteration now.
Again, for the people who is familiar with commanding code, iterative model generally is:
Simply add the same procedure of the extra iteration of one-level with commanding code, XAD will make equally:
Figure A200680014594D01311
Except the extra iteration of this one-level, another interesting explanation is to use<sys:BindingName=" OrderDataContext " in this example〉entity quotes a bound variable from outer scope.In fact, so a kind of mechanism only rare relatively quote in the following bound variable situation useful:
Outside in the scope, and
Have with existing scope or comprise the identical name of bound variable in the scope
2.13 parameter is inherited
When creating the derivation label definition, the parameter of existing entity can become available by the BaseTag attribute.For example ...
Figure A200680014594D01321
... allow Xad author can specify as follows:
Figure A200680014594D01322
Notice that Text and FontFamily are not accessed usually is the Param value in the label definition.This is because these parameters are specified in the fwk:Text label definition, and down is passed to the SimpleText label definition automatically as the result who specifies BaseName=" fwk:Text ".
Figure A200680014594D01323
In addition, the value that defines in the label definition of basic label is automatically distributed to the SimpleText label definition.For example, if FontFamily is endowed the default value of Arial, then this value is handed down and is passed SimpleText label definition.
The examples comparative definition---parameter value is preferential.When definition one label, to interior attribute value of providing statically is provided ...
Figure A200680014594D01324
If these are not specified in the label example, then they keep " standing state ", if but they have obtained appointment, and then example value is preferential.Below the consideration ...
Figure A200680014594D01325
... to have font size is that the SimpleText of 25 green font is an example.The statement of FontSize=" 50 " in FontSize value displacement (having precedence over) label definition in this label example.
Special parameter can be defined as " forbidding " or " can not cover "; Below the consideration ...
Figure A200680014594D01331
For example ...
... because definition with this parameter-definition be minimum value be 0 and maximal value also be 0, check mistake (not being to warn) so the FontFamlily in the definition label example will produce one.
Notice that the FontFamlily parameter still can be provided with statically, and is as implied above in label definition.
Appointment is illegal with the unmatched BaseTag value of type of the superiors' label, for example ...
Figure A200680014594D01333
... the above fwk:Border value that is used for its BaseTag parameter of having specified, but Text (type is fwk:Text) is defined as its top-level tab.
2.13.1 restriction
Parameter only can be inherited by top-level tab, for example, if write out ...
... for example ...
Figure A200680014594D01335
... top-level tab is Border (border), thus its whole parameters all show automatically by new BorderText label, and belong to Border label in this label definition.
Share parameter and consume, for example by top-level tab ...
Figure A200680014594D01341
... although Border and Text have the Margin parameter, Margin is set in above example only is provided with the margin of Border but not the margin of Text.
For the value on the Text label is set, they need and be bound in the Text label via the displaying of Sys:Param grammer, have below illustrated this point ...
Figure A200680014594D01342
... and the example of label seems as follows:
Figure A200680014594D01343
At last, do not support multiple inheritance.For example, can not define label definition, then with the BaseTag of this label definition as another label definition.
For example, below be illegal:
2.14 conditional parameterization
Although XAD is a declarative language, it still enough is rich in expressive force to allow the condition structure of entity.
Two kinds of condition makes are possible: SwitchEntity or SwitchEntities.Each of these modes all can be come parametrization by Case (situation) or Condition (condition) label (but not being both).Case can be regarded as certain equivalence of C# switch (switching), and Condition is similar to one group of if-else clause of C#.
The use of Case and Condition is mutual exclusion, promptly Switch can not be in its main body mixed C ase and Condition.In addition, Case only can use when Switch specifies the value of its Data parameter, otherwise must use Condition.
SwitchEntity, SwitchEntities, Case and Condition are present in the system namespace.According to standard, they have prefix sys: name space, i.e. sys:Case, sys:SwitchEntity etc.
Consider that following data set is as example ...
Figure A200680014594D01351
2.14.1?Case
Case is in two options better simply one.They have single V parameter alue.The value of Value must become IString by evaluation.Check mistake when under the situation of specifying Switch without the value of Data, using Case to cause designing, consider following illegal Xad...
Figure A200680014594D01352
... following Xad illustrates the correct use of Case ...
2.14.2?Condition
Condition provides Advanced Control to Switch result to Xad author.Condition shows single parameter Test.The value of Test is a situation template, represents that it can be any effective xQuery.Condition only can use during not to its Data parameter designated value at Switch.
Condition used with the Switch that specifies the Data value check mistake when causing designing, consider following illegal Xad...
Figure A200680014594D01361
... the correct use of following Xad explanation Condition ...
Figure A200680014594D01362
2.14.3?SwitchEntity
Use SwitchEntity to make the author can return the single item of conduct conditionally to the result of switching evaluation.
The following Xad... of each that consideration permission video data is concentrated
Figure A200680014594D01363
Resulting view seems and can look like:
Figure A200680014594D01371
Consider to want also to show the situation of the price below 100 now with green Arial font with the price of red Georgia font demonstration more than 500.XAD looks like now ...
Figure A200680014594D01372
Resulting view will to following similar (" Toaster " is shown as green runic Arial, and " Receiver " is shown as red runic Georgia):
Figure A200680014594D01381
2.14.4?SwitchEntities
SwitchEntities can be used to return a plurality of values.This can represent to mate a plurality of Case or Condition, or makes single Condition return a plurality of values.Except the parameter of being showed by SwitchEntity, SwitchEntities shows a MatchFirst parameter.MatchFirst is false acquiescently, the value of all coupling Case of expression SwitchEntities coupling (promptly returning) or Condition.
Be set in the genuine situation at MatchFirst, SwitchEntities only returns at first the Case of coupling or the value of Condition.Consider that the following MatchFirst of appointment equals false Xad...
Figure A200680014594D01391
... depend on the value in the input text frame, this Xad will mate one or more Condition and suitably show UI.Yet if MatchFirst is set to very, only evaluation is that a genuine Condition will make its value return.
Figure A200680014594D01394
2.14.5 summary
Figure A200680014594D01395
Figure A200680014594D01396
Figure A200680014594D01402
In the context of setting range not, use ' Switch '
When (for example under Resources) used in the context of the not setting range of not acting on behalf of, sys:SwitchEntity must specify a value to its Type (type) parameter, below the consideration ...
Figure A200680014594D01403
... must define the Type of sys:Data.Check mistake in the time of can't definition of T ype causes designing on being in for the SwitchEntity label in the context of setting range.
Nested ' Switch '
SwitchEntity/ies can be nested with following mode ...
... this should be pronounced, " Ru Guo $AppState=' Blork ', if then test it shown the Text element of value for $AppState/Foo, whether attention You $AppState/Foo=' Bar ' ".
The nested additional parameter of conflict
Consider following Xad...
Figure A200680014594D01411
... additional parameter (with yellow highlighted) conflict.Outermost parameter (appointment on the sys:SwitchEntities label) shows that the rreturn value of this switching should dock at the top of father DockPanel.On the contrary, mate inner Case label (highlighted with cyan) and return a Text element, it specifies this Text should dock at the bottom of father DockPanel.
The result of this conflict is as follows:
Check mistake during design, show that this Switch has defined an additional parameter, it cover on may rreturn value appointment additional parameter
Innermost definition " triumph " when operation.The meaning is if that inner Case coupling, then this Text will dock at the bottom of DockPanel
At last, for guarantee clear for the purpose of, mate as above visible default scenario generation docked at the Text element at father DockPanel top, specified as the additional parameter on the Switch.
2.14.6 selector switch and label definition
In some cases, require the set of selector switch or selector switch is abstracted into a label definition, thereby this selector switch can be reused in each zone.
Consider following Xad...
... produced following application program:
Yet following pattern is illegal ...
Figure A200680014594D01431
Figure A200680014594D01432
2.15 it is related
XAD allows the related of any entity and data.Consider the Xml statement of the following modeling that the work space of an application program is provided with:
Figure A200680014594D01433
Note, do not use " LayoutScheme " and " ActiveDocumentIndex " in the example herein---they only are the structure and the pattern similarity that uses in application program usually that makes this statement at there.
The MDI application program will be a such state transfer to each subsystem in this application program.The example of these subsystems will be:
The actual MDI work space that in independent mdi child window, shows the content of each opening document
The side hurdle that has the thumbnail of all opening document
Have menu such as orders such as " preserving all documents "
These " subsystems " all will require not only lists of documents to be operated separately, and Data Sources (data source) operation to being associated with these documents.Ideally, each subsystem will be shared this same Data Sources (data source) example.In fact share for being essential such as situations such as relevant views.Should share and to realize by the entity class that is called association manager (Association Manager).
Association manager is to create and manage the entity of a plurality of entities associated with the data.For example, the association of each list items in tabulation association manager (List Association Manager) establishment and the managing listings:
Figure A200680014594D01441
This XAD represents following implication:
This tabulation association manager is managed<OpenDocument〉tabulation association.
For each (be each<Document 〉) in the tabulation, will create file data source (File DataSource) conduct " associated entity ".
It is corresponding<Document that each File Data Sources will make its File (file) parameter setting〉Filename (filename).The always corresponding list items of data context (". ") (promptly<Document 〉).
When list items (be each<Document 〉) was added in the tabulation or therefrom removes, corresponding associated entity (being File Data Sources) was added and removes.Notice that the actual creation of entity is finished as required.
Client is via<sys:AssociatedEntity〉quote association:
Figure A200680014594D01442
This XAD represents following implication:
For<OpenDocument〉in the tabulation each<Document, stop panel and all show a profile view.(profile view is the UI element that shows the supposition of its Tree (tree) parameter with the profile form.)
The Tree parameter of each profile view all is an associated entity.
Associated entity is the File Data Sources that is associated with list items (be each<Document 〉).Association manager can be modeled as dynamic dictionary:
Figure A200680014594D01451
<sys:AssociatedEntity〉can be regarded as acting on behalf of the entity of the value in the association manager; The value of acting on behalf of is by<sys:AssociatedEntity〉the Data driving parameter.
Notice that although associated entity in this example is Data Sources (data source), the type of associated entity can be arbitrarily, for example Event Handler (button.onrelease).
Figure A200680014594D01452
Figure A200680014594D01453
Figure A200680014594D01454
2.16 label documentation
With the form of scanning, method in order to the XAF of XAD label documentation is the method for quoting documentation that imitation C# is used for managed API: quote the .xad code that note can be incorporated into the XAD label, and this note can be extracted and aftertreatment by instrument similar with the instrument of the MS inside generation that is used for managed API reference document in notion and design.
Three additional specifications contain XAD quotes documentation:
XAD label: document content and aftertreatment situation
XAD label: document markup and demonstration
XAD label: document Core Generator
The content of these standards should be distinguished easily based on its title.
Following formal language standard chapters and sections comprise the argumentation of quoting the documentation markup tags of control being quoted the structure of documentation.For the full details of all documentation respective labels, referring to aforesaid document markup and demonstration standard.
3. formal language standard
This section provides and has been used for the more not form statement of many language construct of form ground introduction of last joint." language construct " means the label (http://schemas.microsoft.com/2005/xad/system) of surviving in the System name space.
As mentioned above, the XAD code is written as the good Xml of form.First labeling requirement of XAD file is<sys:Xad 〉.File common (but not necessarily) has the .xad extension name.Packing and deployment structure while for this language basis only exist The 5th jointMiddle formal definition.
The local XSD standard of XAD language can Http:// xafteam/xafenv/doc/Platform/Application%20Components/xad .xdsObtain.It mainly is because XSD does not have enough expressiveness to catch many structural constraints that this standard is considered to " part ".
3.1 boolean properties
All boolean properties on the XAD System label all are optional.It is false that default value is always.In fact this mean and need not to specify boolean properties, unless its value is necessary for very.In other words, lack attribute and always mean its value, exist to mean that then its value is for true for false.For consistance and readable reason, suggestion framework expansion person follows this agreement when boolean's parameter of definition its oneself.
3.2 qualified name
XAD is a kind of language based on Xml, and uses the Xml qualified name in a large number.Qualified name belong to the specific names space with guarantee uniqueness and avoid conflict (referring to Http:// www.w3.org/TR/REC-xml-names/ to obtain more details).Use the XAD language construct of qualified name to be:
Type
Label definition
Signature
Publicly-owned parameter group
For given XAD application program, each example in each structure bucket (bucket) listed above must have strides the unique qualified name of whole bucket.For example, two signatures that have two types of same name or have same name can not be arranged.Yet, can have identical name from the item of different buckets.For example, label can have identical name with signature, and perhaps parameter group can have identical name with type.
3.3 key word
3.3.1?<Xad>
Describe The root of definition XAD file
Child node <Type><TagDefinition><Signature><ParamGroup>
3.3.2?<Doc>
Describe The document label, can add the root label to following four crucial XAD language construct: <Signature 〉, <TagDefinition 〉, <Type 〉With<ParamGroup 〉.<Doc〉label allows list of references is carried out structural markup.Referring to XAD Tags:doc markup and presentation specTo obtain more information.Noting, below is that example has dissolved<Doc〉four the legal subtabs and the relevant document label<description of label 〉, they are used for the parameter documenting with the Main label.
Child node <summary 〉, <remarks 〉, <example 〉, <seealso 〉The meaning that provides in the meaning of these labels and use and the C# document markup reference is consistent.These are defined in and are linked to the C# reference on the MSDN.
Example:
3.3.3?<Description>
Describe Maintenance is about the containers labels of the reference of its father node.
Child node <Choice 〉, <ParamGroupRef 〉, <Param 〉, <OutParam 〉, <Const 〉, <Assembly 〉, <File 〉, <dependentAssembly 〉
Referring to preceding example right to understand<description the simple use of label.Referring to XAD Tags:Docmarkup and presentation spec right to obtain<description the processing more comprehensively of use of label.
3.3.4?<Type>
Figure A200680014594D01482
Figure A200680014594D01491
3.3.5?<TagDefinition>
Figure A200680014594D01492
Figure A200680014594D01501
3.3.6?<Signature>
Figure A200680014594D01502
3.3.7<ParamGroup〉(<Xad〉under)
Figure A200680014594D01503
3.3.8?<Const>
Figure A200680014594D01512
3.3.9?<Param>
Figure A200680014594D01513
Figure A200680014594D01521
3.3.10?<OutParam>
Figure A200680014594D01522
Figure A200680014594D01531
3.3.11<ParamGroup〉(<Choice〉under)
Figure A200680014594D01532
3.3.12?<ParamGroupRef>
3.3.13?<Choice>
Describe The mutual exclusion of the parameter in definition label definition or the signature is alternative.It is one independent alternative that each child node has defined.Can be to having the alternative use group of an above parameter.Choice can be by nested.
Child node <Description 〉, <Const 〉, <Param 〉, <OutParam 〉, <ParamGroup 〉, <ParamGroupRef 〉, <Choice 〉
3.3.14?<ParamDefaultValue>
Figure A200680014594D01541
3.3.15?<ConstDefaultValue>
3.3.16?<Entity>
Figure A200680014594D01543
Figure A200680014594D01551
3.3.17?<Function>
Figure A200680014594D01552
3.3.18?<Body>
Describe Comprising will be as the abstract XAD that falls of another label.Body must have at least one child node, thereby obtains entity.The type of the entity under the body, other possible constraint of cardinal sum must be mated type, the cardinal sum constraint of definition in label definition or the signature.
Child node
3.3.19?<ScopeVariable>
Figure A200680014594D01553
Figure A200680014594D01561
3.3.20?<AttachedParam>
Figure A200680014594D01562
Figure A200680014594D01571
3.4 built-in entity
3.4.1?<InlineData>
Figure A200680014594D01572
3.4.2?<Binding>
Figure A200680014594D01573
Figure A200680014594D01581
3.4.3?<XPath>
Figure A200680014594D01582
3.4.4?<Mapping>
3.4.5?<DynamicEntity>
Figure A200680014594D01583
Figure A200680014594D01591
Notice that when specifying Namespace, the value of Tag must be local name, that is, the value of Tag can not be " scal:DatePicker ", and on the contrary, it must be " DatePicker ".Consider following Xad:
Figure A200680014594D01592
Figure A200680014594D01593
Error situation
Figure A200680014594D01594
Mistake 1 is checked the mistake that is associated with DyanmicEntity
Situation: when attempting to load transaction, a series of inspection mistake takes place, these check that mistake is placed into and this DynamicEntity associated state plate.
3.4.6?<AssociatedEntity>
Figure A200680014594D01595
Error situation
Mistake 1 invalid association
Situation: use the tabulation association manager, the author is imported the back end that is not resolved to this manager association into.
3.4.7?<AssociatedDataEntities>
3.4.8?<SwitchEntity>
3.4.9?<SwitchEntities>
Figure A200680014594D01612
Figure A200680014594D01621
3.4.10?<Case>
Figure A200680014594D01622
3.4.11?<Condition>
Figure A200680014594D01623
3.5 entity makes up device
It is to be used to create entity and/or to the user-defined .NET class of its line (wiring) that entity makes up device.Entity makes up device and is used to realize primitive XAD label.XAD language definition be used for entity is made up the requirement of device line because they are the interaction point between the self-defined expansion of XAD working time and this language.Depend on entity structure and line, have following four kinds of methods to realize defining the primitive label of novel entities:
N: the class that the structure line will be created makes up the device class description
Whether 1 simply do not create entity as a new example creating class
Simply.Constructor has not been got XAD working time not
Any parameter of separating.The label signature does not define any
Parameter, so entity does not require any to parameter
Line.
2 simply is to create entity as a new example creating class
Simply.The label signature is specified and is imported parameter into, and because of
This entity requires to be wired to them.Must specify
Entity makes up device and realizes line.
3 complexity be entity structure to a certain extent (use factory,
Transmit constructor parameter etc.) be complicated.Necessary
Designated entities makes up device and realizes structure.Label is signed
Name is designated parameter not, therefore need not by making up device real
Incumbent what line.
4 complexity whether be entity structure to a certain extent (use factory,
Transmit constructor parameter etc.) be complicated.Label
Signature is specified and is imported parameter into.Must the designated entities structure
Build device and realize the structure and the line of entity.
In attention 3 kinds in 4 kinds of situations, must designated entities make up the device class.XAD has defined and has been used for two interfaces that entity makes up device:
Figure A200680014594D01631
Depend on entity structure and line, entity makes up device can realize one of this interface or both:
N: structure line ICreateEntity IWireEntity
Simply whether 1 be
Whether 2 complexity deny
3 complexity are
Entity is made up the requirement of device:
Stateless.Do not allow entity to make up device and between Create and/or Wire method twice called, keep local state.XAD can create the object pool that entity makes up device for efficiency reasons working time.Therefore, order that calls and the number that makes up the device method do not guaranteed.
There is not the behavior of when broadcast.Entity makes up device can finish two things---create entity and to the entity line.Do not allow other anything.Do not allow entity to make up any other interface that device uses the entity of their establishments or line.
Following example shows the label definition of primitive label and the realization that corresponding entity makes up device:
Figure A200680014594D01641
Figure A200680014594D01642
Figure A200680014594D01651
It is an example of the simple version of same label herein.Because entity need not to visit constant parameter and without any special constructor parameter, so entity makes up device and need not to realize entity structure, only realizes line:
Figure A200680014594D01652
3.6 action
Generally speaking, action is an entity, and it realizes entity type " fwk:EventHandler ".
Figure A200680014594D01653
Figure A200680014594D01654
Order can realize as any other entity---by the realization entity class and to the label definition line.
Yet action is identified as one of modal entity, and XAD supports to realize replacing their more plain mode.XAD allows action is embodied as function rather than entity.On the backstage, XAD working time with the XAD parameter maps to C# parameter and call function.
The function of realizing as order must satisfy following requirement:
Be defined as the method for entity class.Entity class provides the visit to the entity domains service.Can on same entity class, realize an above command functions.Yet this only is that packing is convenient, and and does not mean that any mutual between the action.
Stateless.How when operation, to determine XAD working time the example of administration order entity.For example, may be the new example of the entity class of command calls establishment each time.Do not allow action once calling hold mode between another time.All information about application program that they need be understood must be transmitted as parameter.
Do not have and quote and spread out of parameter.The action that realizes as function can not have output parameter.XAD does not generally support reference parameter, so command functions can not be used them.But action is by coming the application programs state to make a change to carrying out line as the write data of importing the parameter transmission into.
Command functions is got entity as parameter.Usually, parameter is a data entity.XAD is convenient to visit to data entity by the visit that allows strong typing.Except using generic data entity type ICRange, the order author has the option of the memory access of use strong typing as parameter type.
Figure A200680014594D01661
Notice that replacement is used filename and spread out of or reference parameter, use and upgrade memory access.
The unsupported memory access of specific data entity is wrong.Except command functions, must write corresponding label definition.Parameter name in the label definition must mate the tag name in the command functions fully.XAD comes matching parameter according to name working time, and it is wrong therefore having the parameter name of not matching.The parameter order is unimportant.
Figure A200680014594D01671
But allow optional parameter (Min=" 0 ").But the default value of optional parameter can be specified in label definition.If there is not the specify default value, then XAD will transmit sky working time, and client code must be ready to handle it.It is wrong that but definition does not have the value type optional parameter of default value.
Allow setup parameter (Max=" unbounded ").Setup parameter must be turned to ICollection by type in function.Can come to specialize in this set using generic in the future with this type.
What interface should 4) self-defined detector realize?
5) the how conflict between processing parameter name and the additional parameter name?
6) do you wish to support the parameter that spreads out of on the dynamic instance entity?
7) to use generic to make that the entity of passing to Wire is a strong typing in some way? about the value of parameter how about?
4. common framework entity
Figure A200680014594D01672
5. deployment model
5.1 XAD application program
The XAD application program is made of various relevant segments.XAD packing and deployment model have defined the rule that is used for for following purpose these segments being combined and being defined the relation between them:
All parts of identification application (composition of application program)
The integrality of verifying application programs
Run application explaining and compile in two kinds of patterns
Disposing application program
Versioned
XAD uses packing and the deployment model based on subassembly, it follow the Microsoft deployment strategy (see Fusion, Http:// fusionTo obtain its details).Fusion handles as versioned, install side by side, problems such as " DLL hell ", management, strategy, so it is useful for making full use of its deployment model and serving.
Various application program segments are combined into bigger bag, are called subassembly.Subassembly is combined to form application program:
Each XAD application program has one entrance-application program and handles from its label that begins.The requirement of application programs entrance is:
Label must define in the root subassembly.
The local name of label must be Main.Name space must be http://schemas.microsoft.com/2005/xad/system
If label is got parameter, then they must be simple data type (string, Integer, Boolean etc.), so they can be transmitted from order line.
5.2 XAD subassembly
The XAD subassembly is minimum deployment unit.It is fusion (fusion) subassembly with XAD semanteme.
The XAD subassembly is made of following two parts:
Component list (seeing 5.3)
The composition file
Figure A200680014594D01691
Subassembly composition file (listing in the component list) comprises actual XAD code (label definition, entity type, signature etc.) and as any out of Memory of the part (data-selected scheme, metadata, resource etc.) of application program.In case XAD or scheme file are listed in component list as composition, its content becomes and can use the following:
All XAD files in the subassembly
Rely on all the XAD files in the XAD subassembly
Type, signature, parameter group and label definition can be defined as " inside ", and they are sightless in its subassembly outside in this case.
The XAD file is not quoted other XAD or scheme file.Dependence (using label from other file, type etc.) is on the subassembly level but not handle on the file-level.
Yet the other Languages that uses in the XAD application program can be supported file include.For example, XSD supports to comprise and derive pseudoinstruction (directive).The file that comprises or derive does not become the part of subassembly automatically.They must be listed as the composition file clearly.
What should 8) protection do about intellecture property (IP)? the subassembly of compiling may be answer.
All composition files must be arranged in residing identical file folder of component list or sub-folder (supporting any dark nested rank of sub-folder).
The XAD subassembly there are following two kinds of forms:
Non-PE multifile subassembly.
PE represents " portable can be carried out ".This form is easily between development stage.The single file that does not comprise whole subassembly.The composition file is used when they are created by XAD author and are kept on the dish.XAD finds them by the fetch unit inventory working time.Any change to the composition file is reflected on the subassembly when preserving file immediately.Do not need compile step to use subassembly in the XAD application program.
.NET subassembly
This is the compiling form of XAD subassembly, is easily to deployment.Compiling provides more performance.The XAD subassembly stores with binary format, and can sign with strong name, so it can be disposed in GAC (global group component high-speed cache) as other .NET subassembly.It is essential, so the reason of meaningful Watson dump is handled and generated to the XAD subassembly of compiling for mistake, with allowing error correction is gone back to original XAD source.
5.3 subassembly component list
XAD subassembly component list is the Fusion component list, and can be consumed by Fusion.It has intactly described the XAD subassembly.Component list is the Xml file with " .manifest " extension name.Up-to-date Fusion component list scheme can Http:// teamweb/manifest/Shared%20Documents/Latest%20ManOn find.
Component list can use text editor to come manual creation, or creates by developing instrument.When exploitation, component list has been played the part of the role of configuration file---and it has write down all parts and the dependence thereof of subassembly.In when operation, component list has played the part of that XAD is used to find out working time and the role of the catalogue of all parts of loading application programs.
XAD does not understand that whole Fusion component list scheme---it is discerned its some part and ignores remainder working time.
The component list of XAD identification partly has:
The subassembly identity
Describe
Dependence to other subassembly
The composition listed files
Fusion component list scheme destination name word space is " urn:schemas-microsoft-com:asm.v2 ".This scheme is extendible---can add element and attribute from other name space.XAD only adds several attribute conducts Http:// schemas.microsoft.com/2005/xad/assemblyThe expansion that defines in the name space.XAD need not unit widening parts inventory scheme usually.
Attribute below with reference to the Fusion component list Xml element of having described XAD identification and attribute and XAD interpolation.
5.3.1 component list label
Figure A200680014594D01712
Figure A200680014594D01721
Is 9) what the purposes of " culture " attribute? it only uses for the combinations of satellites part in .NET.How to handle the localization resource?
10) problem of the current purposes of type attribute:
-quilt is filed for " being used for backwards compatibility " and can removed in the future
-there is not method to come retention " xad " globally
It is just meaningful when-type is only specified on relying on item
Should change the extended attribute of definition oneself on the dependentAssembly element into?
Figure A200680014594D01722
Figure A200680014594D01723
Figure A200680014594D01731
Be 11) what the future of behavior mapped file?
5.3.2 exemplary components inventory
This exemplary components inventory has been described the subassembly that has name " Demo " and version " 1.0.0.0 ".
" Demo " subassembly depends on following two other subassemblies:
" Microsoft.XAF.XAD.Framework "---XAD subassembly (type=" xad ")
" DemoEntityBuilders "---.NET subassembly (not specified type)
" Demo " subassembly has following two composition files:
DemoTags.xad-XAD file finally can comprise label definition, signature, entity type and publicly-owned parameter group.
DemoDataSchema.xsd-scheme file
5.4 subassembly dependence
By setting up the dependence to another subassembly, the XAD subassembly can use its non-inside:
Entity type
Signature
Label definition
Parameter group
Scheme
Dependence to another XAD subassembly is by comprising that in component list its identity and specified attribute type=" xad " in the tabulation of dependence subassembly sets up.Need not specified file or routing information.The subassembly identity when operation resolve and will load correspondence subassembly (see " Subassembly binding, loading and unloading").
The XAD subassembly also can be dependent on the .NET subassembly.To the dependence of .NET subassembly with the identical mode of the dependence of XAD subassembly is set up, have the different value except not specifying type attribute or this attribute.Must when in the following, quoting the .NET type, set up the dependence of .NET subassembly by the XAD subassembly at every turn:
The entity type definition
Entity reference in the primitive label definition
Entity in the primitive label definition makes up device and quotes
Order class reference in the primitive label definition
Metadata
Figure A200680014594D01751
Be to be applied to the dependent rule of XAD subassembly herein:
A subassembly can depend on a plurality of subassemblies (A can be dependent on B, C, D etc.)
A plurality of subassemblies can depend on same subassembly (B, C, D etc. can be dependent on A)
The subassembly dependence is that (if A depends on B and B depends on C, then A does not rely on C in non-transmission.If necessary, A must quote C clearly.)
Do not support circular dependency (if A depends on B and B depends on C, then C can not depend on A)
5.5 subassembly binding, loading and unloading
Binding is the process that the subassembly identity is resolved to its physical location.
The subassembly identity does not comprise the positional information as path and file.Fusion has defined the subassembly binding algorithm that .NET uses working time.XAD will use this binding algorithm as the service that is provided by Fusion for a long time.It realizes its subalgorithm (Childrenet) in short-term.
Require all non-strong name subassemblies (not having the PKI mark) under Application Folder, to exist.Application Folder is the file that comprises the component list of root/main subassembly.
Given subassembly identity, XAD uses following algorithm to find out subassembly working time:
1., suppose that then it is the .NET subassembly and loading entrusted to the .NET framework if the subassembly type is not " XAD ".
2. to the XAD subassembly, check in the Application Folder to have the component list file of subassembly title and load it.
3., then check the sub-folder that has the subassembly title in the Application Folder if do not find.If find, then check to have the component list file of subassembly title and load it.
4. if do not find and this is that debugging makes up, then to each the file repeating step 2 and 3 of appointment among the environmental variance XADPATH.Instrument when this only is exploitation.Path among the XADPATH separates with branch.
In case find, add carrier package and all working time by XAD and rely on.This process is a recurrence---it is to relying on a repetition.Each content that relies on item can be used relying on subassembly.Be important to note that, do not make the content of subassembly available to all subassembly overall situations, it is available only it directly to be relied on item.
Scheme is the exception of this rule.When loading had the subassembly of scheme composition file, loading scheme also added it to global scheme and gathers, thereby makes them can use all subassemblies.Yet this is to the restriction of current realization and should not be considered to requirement.Its most probable is changing in the future.
Have two kinds of methods to add carrier package:
By the static dependencies in another subassembly component list.
In program design.
Pass through LoadAssemblyCommand.
By rudimentary publicly-owned API.
From root subassembly (set of applications component) begin and arrive that it relies on, dependence item that it relies on or the like, form any dark figure of static dependencies subassembly.XAD loads all these subassemblies working time when application program launching.The developer also can load the subassembly that is not designated as the static dependencies item.The feature of the subassembly that loads in the programming is support to plug-in unit (seeing that plug-in model is to obtain more details) as the main situation of target.
Set of applications component (root) and all programmings are gone up the subassembly that loads and have been formed one group of top layer subassembly.Only top layer subassembly application programs metadata has contribution.The top layer subassembly that only has the exception of root subassembly can unloading in programming.If subassembly does not load as the static dependencies item, even then it also loads in programming as the top layer subassembly after a while, it can not be unloaded.Unload that this subassembly only causes it is removed but from the subassembly that static state loads, do not remove from the top layer subassembly.
5.6 packing situation
5.6.1 monofile application program
" Hello world " is an example of simple monofile application program.The monofile application program has single XAD file, and it comprises all required information of this application program of operation.This document must comprise the label definition of main label at least---the application program entry point.Need not to create subassembly or subassembly component list.
Requirement to the monofile application program is:
Only depend on standard card cage.The standard card cage acquiescence is available, and need not to be appointed as in the subassembly component list dependence item.If application program is only used label, type and signature from standard card cage, then it need not to specify any dependence (not having the dependence part in the component list) in its component list.
In single file, have all labels.If a file is only arranged, then application program does not require the composition file part of component list file.In case have more than a file, then regardless of its type, application program all requires component list to describe the composition file.
If satisfy these requirements, then application program does not require the subassembly component list fully, because all piths all are empty.It is the monofile application program.
5.6.2 derive the storehouse of label
XAD allows XAD author to expand language by defining its oneself label.The simplest mode is that label is derived in definition because they be realize by XAD and do not need rudimentary programming technique.XAD author proposes one group of reusable customized label the most at last and a plurality of subassemblies are striden in hope and application program is shared them.This can finish by packing label in the subassembly that separates, and should can be quoted by other subassembly then by subassembly separately.
In following example, two reusable derivation labels are arranged, they define in the MyTags.xad file and pack in the MyLibrary subassembly.The MyLibrary subassembly is quoted by the MyApplication subassembly, and the label that is provided by this storehouse is provided the latter.
Figure A200680014594D01781
Figure A200680014594D01791
Figure A200680014594D01801
Below be how it works:
Two label-TextWithLabel of MyTags.xad document definition and Hyperlink.
The MyTags.xad file is listed in the MyLibrary component list as the composition file.This makes all labels in the file can use MyLibrary subassembly client.
The MyApplication subassembly is quoted the MyLibrary subassembly, and therefore can visit all labels that define among the MyLibrary.
The MyApplication file uses the Hyperlink label that defines in the MyLibrary subassembly.
5.6.3 the storehouse of primitive label
XAD can be by defining self-defined primitive or deriving label and expand.Be easier to definition although derive label, because they are to use XAD to realize, the primitive label can provide more rich functions, because they are to use and realize as the rudimentary programming language of VB and C#.These language provide the visit fully to OS and machine resources.Assembly, instrument and platform developer definable primitive label, this label can be reused in a plurality of XAD application programs by XAD author.Packing primitive label is almost identical with packing derivation label (seeing above example).Following two main differences are arranged:
Label definition comprises entity is made up the device class but not the quoting of XAD main body
The component list that comprises the subassembly of primitive label must be specified comprising the additional dependence that entity makes up the .NET subassembly of device
It is the .NET assembly that entity makes up device, and this assembly knows how to create corresponding to the entity of primitive label and to its line (making up the more details of device referring to language concept with acquisition about entity).
Following example is embodied as the primitive label with Hyperlink:
Figure A200680014594D01811
Figure A200680014594D01821
Client code is identical as the code of deriving label with use Hyperlink.The realization details that the groups of clients component neither represents to the label that comes from other subassembly does not represent to its dependence item yet.
Figure A200680014594D01822
Figure A200680014594D01831
6. plug-in model
6.1 what is plug-in unit?
Plug-in unit (being also referred to as interpolation annex or insert) is self-contained software package, and it has been expanded the essential characteristic collection of given software application and need not upgrade applications.But plug-in unit allows incrementally to add them and need not to wait for and experience expensive upgrading circulation in new feature or third party's expansion time spent that becomes.
Figure A200680014594D01841
For making plug-in architecture work that four important requirements be arranged:
Must definition and announcement extensibility agreement
The application program of expansion must correctly realize the extensibility agreement
Plug-in unit must correctly be realized the extensibility agreement
Application program must be supported the discovery and the loading of plug-in unit
6.2 XAD plug-in model
The XAD plug-in model is based on following key:
The dynamic load of subassembly
The extensibility agreement of metadata driven
The transaction instantiation
6.2.1 the dynamic load of subassembly
Plug-in unit is packed in subassembly.This is not wonderful, because all parts of XAD application program are all packed in subassembly.Usually subassembly by the static dependencies item of appointment in the subassembly component list load (referring to The subassembly dependence).
XAD loads all static dependencies items working time automatically.In this case, subassembly is not listed in any component list as the static dependencies item.On the contrary, but the order<loadAssembly of application program using system definition 〉, add carrier package by specifying its component list path.The path only is a data fragments, and can obtain from user's input, Application Status, configuration file etc.In case loaded subassembly, update metadata and its entity become and can be used for dynamic instanceization.
6.2.2 the extensibility agreement of metadata driven
Can expand the XAD application program and in independent subassembly, define its extensibility agreement, so it can be announced and quote with the third party who writes expansion by application program.The extensibility agreement has following two parts:
Metadata proposal: term " metadata " generally refers to " about the data of data ".In the context of the present specification, metadata is as the description to feature that is realized by plug-in unit.Metadata can comprise tag name, the parameter that will transmit, be used for the readable text of people of UI etc.Extensible application has defined metadata proposal (desired from plug-in unit).Plug-in unit provides content.
The label signature: plug-in unit is realized its feature by definition XAD label.Application program uses these labels to visit the plug-in unit feature.Application program definition label signature (plug-in unit should cause what entity type and them to get what parameter), and plug-in unit provides label definition (tag name and actual the realization).Signature can be compared with interface, and label definition can be realized comparing with interface.
XAD supports can be by the label of system definition <Matadata 〉The global metadata tree that visits.Metadata tree be from the union of all metadata composition files of the subassembly of all dynamic load (referring to File typeTo obtain details) about composition.When operation, automatic update metadata is set when load or unload has the subassembly of metadata composition file at every turn.Send suitable change notice, so application program is dynamically upgraded himself.Use metadata tree, application program can find to load what plug-in unit and use the feature that they provide.
6.2.3 transaction instantiation
Usually, XAD author directly uses XAD code compiling XAD label.By using the XAD label, the author has stated to create what entity working time by XAD statically.
Plug-in unit has defined the label that is used to visit the feature that their realize.Because plug-in unit is disabled when writing application program, so XAD author's there is no telling also uses the label by the plug-in unit definition.The author only knows and defines label signature statically.Physical tags name and final parameter value are provided by metadata by plug-in unit.Application program knows fully what metadata proposal is, because it is the part of the extensibility agreement of application program definition.It reads metadata and according to tag name instantiation entity dynamically.XAD supports to be used for being undertaken by tag name the label of the system definition of transaction instantiation: <DynamicEntity 〉The entity that only has agency's type can be by dynamic instantiation.Entity only could be by dynamically instantiation when they define in the following:
The subassembly of dynamic load
The static dependencies subassembly of subassembly uses the DynamicEntity label
6.3 plug-in unit situation
Following situation has been described can be by the plug-in unit expansion to support the application of file of new file type.The thinking of this application program is the file that it could open and show any kind, as long as it has the plug-in unit of supporting this document type.This example has 3 parts:
The FileExtensionProtocol subassembly
The Extended Protocol of defined file application program.This Extended Protocol is made of metadata proposal that is used for each file label and signature.It defines in independent subassembly, so application program and various plug-in unit all can be quoted it.
The File subassembly
The subassembly that is used for the application of file code.
The SmartFilesAddIn subassembly.
The plug-in unit subassembly that provides of the Smarts.com of company by imagination.
6.3.1 FileExtensionProtocol subassembly
Figure A200680014594D01871
Figure A200680014594D01881
6.3.2 File subassembly
Figure A200680014594D01891
Figure A200680014594D01901
6.3.3 SmartFilesAddIn subassembly
Figure A200680014594D01911
Figure A200680014594D01921
Figure A200680014594D01922
7. appendix A: code compiling agreement
It below is the tabulation of the XAD code compiling agreement of suggestion.Standard x AD framework is followed all these agreements.The third party can select to adopt in these agreements partly or entirely.
These agreements are forced by XADCop.XADCop is the special-purpose detector of XAD that is similar to the FxCop in the .Net framework in essence.
12) $ waits to finish: in case available, to the link of XADCop document
7.1 be used for " sys " prefix of System name space
13) $ waits to finish
7.2 the Pascal external packing of name
14) $ waits to finish
7.3 the signature name must finish with " Signature "
15) $ waits to finish
7.4 the name of " Set " parameter must finish with " s "
16) $ waits to finish
7.5 the name of " Singular " entity tag must not finish with " s "
17) $ waits to finish
7.6 the name of selector switch label must finish with " Selector "
18) $ waits to finish
7.7 Param (if appointment) must be first attribute of entity
19) $ waits to finish
7.8 Name (if appointment) must be Param (if appointment) first attribute afterwards of entity
20) $ waits to finish

Claims (20)

1. computer-readable medium that stores computer executable instructions on it, described instruction are realized the method for a kind of configuration software application program with one or more functions of realizing described software application when being carried out by computing machine, comprising:
A plurality of application components are provided;
Determine that based on the one or more data events that receive by described application program the structure of coupling assembling figure and in described a plurality of assembly which are connected to other assembly in described a plurality of assembly to form described coupling assembling figure;
The part of described a plurality of application components is configured to described coupling assembling figure so that first function of described application program to be provided;
In response to receiving data event, handle by one or more other component call one in described a plurality of assemblies by one of described a plurality of assemblies; And
In response to handling, reconfigure described coupling assembling figure to carry out second function of described application program by one or more other component call one in described a plurality of assemblies.
2. computer-readable medium as claimed in claim 1 is characterized in that, the described part of described a plurality of application components is configured to described coupling assembling figure also comprises:
Describe engine by application program in described a plurality of assemblies each is connected to one or more other assemblies in described a plurality of assembly via a common interface, to allow via described common interface Data transmission between dissimilar assemblies; And
Describe the described coupling assembling figure of engine instanceization by described application program, comprise any connection between the coupling assembling among the described coupling assembling figure, make described coupling assembling figure when being performed, realize first function of described application program.
3. computer-readable medium as claimed in claim 1 is characterized in that:
Determine that based on the one or more data events that received by described application program other assembly that the structure of coupling assembling figure and in described a plurality of assembly which are connected in described a plurality of assembly comprises to form described coupling assembling figure: determine that in described a plurality of assembly which should be combined in together as the coupling assembling unit among the described coupling assembling figure, wherein said coupling assembling unit is in response to the one or more data events that received by described application program and realizes that the function of described application program is required; And
The described part of described a plurality of application components is configured to described coupling assembling figure to be comprised with first function that described application program is provided: described a plurality of arrangement of components that should be combined in together are the coupling assembling unit, as the assembly territory that is used for realizing the function of described application program in response to the one or more data events that received by described application program.
4. computer-readable medium as claimed in claim 1 is characterized in that:
Handle by one or more other component call in described a plurality of assemblies one and to comprise: read the data that are associated with the data event of being responsible for calling described processing in first the processing stage, and any desired any data that reconfigure of the described coupling assembling figure of request expression; And
Reconfigure described coupling assembling figure to realize second function of described application program in second the processing stage.
5. computer-readable medium as claimed in claim 3 is characterized in that, also comprises:
Comprise by one or more other component call one processing in described a plurality of assemblies: call a processing by the assembly territory that is associated with described data event;
In described assembly territory first the processing stage in, read the data that are associated with the data event of being responsible for calling described processing, and any data that reconfigure of any requirement in the described assembly of request expression territory; And
In described assembly territory second the processing stage in, reconfigure described assembly territory to realize second function of described application program.
6. computer-readable medium as claimed in claim 3, it is characterized in that, be configured in together as the described assembly that is used in response to the assembly territory of the function that realizes described application program by one or more data events of described application program reception, be used as the unit that application program is carried out, this unit is used for spanning to the life cycle that reconfigures the moment in described assembly territory in response to the data event that requires described assembly territory to reconfigure from the moment of disposing described assembly territory.
7. computer-readable medium as claimed in claim 2 is characterized in that:
Describing the described coupling assembling figure of engine instanceization by described application program comprises: come the described coupling assembling figure of instantiation by can be used for describing engine from the application program that one or more application programs that described first function is described in described application program reception are described, and comprise that describing engine by described application program explains that described one or more application program describes, should be connected to form described coupling assembling figure to determine in described a plurality of assemblies which.
8. computer-readable medium as claimed in claim 7, it is characterized in that, comprise that also describing reception via described application program is used to make up also one or more declarative rules of the described coupling assembling figure of structuring, wherein said application program is described engine and also is used for coming the described coupling assembling figure of instantiation according to describing the described declarative rule that receives via described application program.
9. computer-readable medium as claimed in claim 7, it is characterized in that, comprise: come the described coupling assembling figure of instantiation by can be used for describing engine according to the application program of the structurized one or more application programs descriptions of the extend markup language of describing described first function from described application program reception by can be used for describing the described coupling assembling figure of engine instanceization from the application program that one or more application programs that described first function is described in described application program reception are described; And wherein said application program is described engine and also is used for according to described extend markup language structural data to pass to the one or more of described a plurality of assemblies.
10. computer-readable medium as claimed in claim 2 is characterized in that:
Describe the described coupling assembling figure of engine instanceization by described application program before, from the Component Gallery that comprises described a plurality of assemblies, constitute the part of described coupling assembling figure in the described a plurality of assemblies of retrieval.
11. computer-readable medium as claimed in claim 10, it is characterized in that the part that constitutes described coupling assembling figure from the Component Gallery that comprises described a plurality of assemblies in the described a plurality of assemblies of retrieval comprises: the part of the described a plurality of assemblies of retrieval from the Component Gallery that constitutes by user interface connector, action component, data connector, memory access assembly, rod changer assembly and interface module.
12. computer-readable medium as claimed in claim 10, it is characterized in that, the part that constitutes described coupling assembling figure from the Component Gallery that comprises described a plurality of assemblies in the described a plurality of assemblies of retrieval comprises: retrieve at least one user interface (UI) connector, described user interface connector receives one or more UI incidents and described one or more UI incidents are converted to described data event, and reception is represented corresponding to the standard data of the data of any change and be connected with the data with described any change with UI and offer described UI.
13. computer-readable medium as claimed in claim 12, it is characterized in that, the part that constitutes described coupling assembling figure from the Component Gallery that comprises described a plurality of assemblies in the described a plurality of assemblies of retrieval comprises: retrieval is connected at least one action component of UI connector, and described action component receives described data event and it is transformed into the standard format action.
14. computer-readable medium as claimed in claim 13, it is characterized in that, the part that constitutes described coupling assembling figure from the Component Gallery that comprises described a plurality of assemblies in the described a plurality of assemblies of retrieval comprises: retrieval is connected at least one data connector of described action component and described UI assembly simultaneously, described data connector acceptance criteria form moves and is connected to data storage and moves with the standard format of finishing on described data, and described standard data is represented to send to described UI connector.
15. computer-readable medium as claimed in claim 14, it is characterized in that the part that constitutes described coupling assembling figure from the Component Gallery that comprises described a plurality of assemblies in the described a plurality of assemblies of retrieval comprises: retrieval is represented described standard data to be processed at least one transducer of UI custom formats.
16. computer-readable medium as claimed in claim 15, it is characterized in that the part that constitutes described coupling assembling figure from the Component Gallery that comprises described a plurality of assemblies in the described a plurality of assemblies of retrieval comprises: retrieval is processed into described standard format action at least one memory access assembly of standard data customization action.
17. computer-readable medium as claimed in claim 10, it is characterized in that the part that constitutes described coupling assembling figure from the Component Gallery that comprises described a plurality of assemblies in the described a plurality of assemblies of retrieval comprises: the interface between two or more other assemblies of retrieval realization is to allow third party's assembly of described two or more other communication between components.
18. computer-readable medium as claimed in claim 17, it is characterized in that, also comprise the interface of realizing between two or more other assemblies to allow described two or more other communication between components, comprise according to being used to realize that offering described application program by described third party's assembly describes one or more declarative rules of the interface of engine and realize described interface.
19. a configuration software application program comprises with the method for one or more functions of realizing described software application:
A plurality of application components are provided;
Describe engine by application program in described a plurality of assemblies each is connected to one or more other assemblies in described a plurality of assembly via a common interface, to allow via described common interface Data transmission between dissimilar assemblies; And
By described application program the coupling assembling figure that engine instanceization is made of described a plurality of assemblies is described, comprise any connection between the coupling assembling among the described coupling assembling figure, make described coupling assembling figure when being performed, realize first function of described application program.
20. a configuration software application program comprises with the method for one or more functions of realizing described software application:
A plurality of application components are provided;
Describe engine by application program in described a plurality of assemblies each is connected to one or more other assemblies in described a plurality of assembly via a common interface, to allow via described common interface Data transmission between dissimilar assemblies;
By described application program the coupling assembling figure that engine instanceization is made of described a plurality of assemblies is described, comprise any connection between the coupling assembling among the described coupling assembling figure, make described coupling assembling figure when being performed, realize first function of described application program;
In response to receiving a data event, handle by one or more other component call one in described a plurality of assemblies by one of described a plurality of assemblies; And
In response to handling, reconfigure described coupling assembling figure to realize second function of described application program by one or more other component call one in described a plurality of assemblies.
CN200680014594.5A 2005-04-29 2006-04-20 Xml application framework Expired - Fee Related CN101512503B (en)

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
US67613705P 2005-04-29 2005-04-29
US60/676,137 2005-04-29
US70322005P 2005-07-28 2005-07-28
US60/703,220 2005-07-28
US11/360,457 2006-02-23
US11/360,457 US8132148B2 (en) 2005-04-29 2006-02-23 XML application framework
PCT/US2006/015161 WO2006118823A2 (en) 2005-04-29 2006-04-20 Xml application framework

Publications (2)

Publication Number Publication Date
CN101512503A true CN101512503A (en) 2009-08-19
CN101512503B CN101512503B (en) 2013-03-27

Family

ID=39334892

Family Applications (4)

Application Number Title Priority Date Filing Date
CN200680014092.2A Expired - Fee Related CN101542457B (en) 2005-04-29 2006-04-20 Transaction transforms
CN200680014637XA Expired - Fee Related CN101167052B (en) 2005-04-29 2006-04-20 Application framework phasing model
CN200680014594.5A Expired - Fee Related CN101512503B (en) 2005-04-29 2006-04-20 Xml application framework
CN2006800146187A Expired - Fee Related CN101248405B (en) 2005-04-29 2006-04-20 Multithreading with concurrency domains

Family Applications Before (2)

Application Number Title Priority Date Filing Date
CN200680014092.2A Expired - Fee Related CN101542457B (en) 2005-04-29 2006-04-20 Transaction transforms
CN200680014637XA Expired - Fee Related CN101167052B (en) 2005-04-29 2006-04-20 Application framework phasing model

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN2006800146187A Expired - Fee Related CN101248405B (en) 2005-04-29 2006-04-20 Multithreading with concurrency domains

Country Status (1)

Country Link
CN (4) CN101542457B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793384A (en) * 2012-10-26 2014-05-14 上海宝信软件股份有限公司 Commonly used client-side and server-side data binding method
CN104408120A (en) * 2014-11-26 2015-03-11 北京国双科技有限公司 Source code processing method and device
CN105843789A (en) * 2016-04-01 2016-08-10 乐视控股(北京)有限公司 Rich text monitoring method and device
CN107402768A (en) * 2017-07-31 2017-11-28 四川长虹电器股份有限公司 A kind of Android application and development methods of reusable extension
CN107450725A (en) * 2017-07-31 2017-12-08 科大讯飞股份有限公司 Man-machine interaction application platform, method and storage medium
CN108153223A (en) * 2016-12-06 2018-06-12 因特利格雷特总部有限责任公司 The stage subordinate applied for the scalable real-time network of material handling system
CN108604199A (en) * 2016-08-23 2018-09-28 甲骨文国际公司 For supporting quickly to mix the system and method reconfigured in high-performance computing environment
CN110032718A (en) * 2019-04-12 2019-07-19 广州广燃设计有限公司 A kind of table conversion method, system and storage medium
CN110393918A (en) * 2019-07-26 2019-11-01 网易(杭州)网络有限公司 A kind of method and apparatus of game trigger production
CN110727703A (en) * 2019-09-23 2020-01-24 苏宁云计算有限公司 Method and device for automatically identifying comments in JSON (Java Server object notation) code
CN111897529A (en) * 2020-06-08 2020-11-06 华人运通(江苏)技术有限公司 Front-end component conversion method, device, equipment and readable storage medium
CN112817573A (en) * 2019-11-18 2021-05-18 北京沃东天骏信息技术有限公司 Method, apparatus, computer system, and medium for building streaming computing applications
CN112965838A (en) * 2021-03-16 2021-06-15 支付宝(杭州)信息技术有限公司 Data race checking method and device for concurrent program
CN113110941A (en) * 2016-01-15 2021-07-13 谷歌有限责任公司 Managing delivery of code and dependency data using application containers
CN114610725A (en) * 2022-05-11 2022-06-10 成都九洲电子信息系统股份有限公司 Data center assembly, application method thereof and storage medium
CN112965838B (en) * 2021-03-16 2024-04-19 支付宝(杭州)信息技术有限公司 Concurrent program data competition checking method and device

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102455933B (en) * 2010-10-22 2014-01-15 深圳市科陆电子科技股份有限公司 Method for increasing multi-tasking efficiency through thread management
CN102831053B (en) * 2011-06-17 2015-05-13 阿里巴巴集团控股有限公司 Scheduling method and device for test execution
US20150248203A1 (en) * 2014-03-03 2015-09-03 Microsoft Technology Licensing, Llc Portable business logic with branching and gating
CN110347516B (en) * 2019-06-27 2023-03-24 河北科技大学 Fine-granularity read-write lock-oriented software automatic reconstruction method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2061117C (en) * 1991-12-02 1998-09-29 Neta J. Amit Apparatus and method for distributed program stack
US5940828A (en) * 1997-11-18 1999-08-17 International Business Machines Corporation Locking contention resolution for shared resources
US6083276A (en) * 1998-06-11 2000-07-04 Corel, Inc. Creating and configuring component-based applications using a text-based descriptive attribute grammar
US20050091576A1 (en) * 2003-10-24 2005-04-28 Microsoft Corporation Programming interface for a computer platform
US6670969B1 (en) * 2000-06-29 2003-12-30 Curl Corporation Interface frames for threads
SG99941A1 (en) * 2000-08-30 2003-11-27 Ibm Transaction support on logical disks
CN100347675C (en) * 2004-06-29 2007-11-07 北京大学 Property optimizing method for applying server

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793384A (en) * 2012-10-26 2014-05-14 上海宝信软件股份有限公司 Commonly used client-side and server-side data binding method
CN104408120A (en) * 2014-11-26 2015-03-11 北京国双科技有限公司 Source code processing method and device
CN104408120B (en) * 2014-11-26 2019-04-12 北京国双科技有限公司 The processing method and processing device of source code
CN113110941A (en) * 2016-01-15 2021-07-13 谷歌有限责任公司 Managing delivery of code and dependency data using application containers
CN105843789A (en) * 2016-04-01 2016-08-10 乐视控股(北京)有限公司 Rich text monitoring method and device
CN108604199A (en) * 2016-08-23 2018-09-28 甲骨文国际公司 For supporting quickly to mix the system and method reconfigured in high-performance computing environment
CN108153223B (en) * 2016-12-06 2023-04-18 因特利格雷特总部有限责任公司 Staged deployment of scalable real-time web applications for material handling systems
CN108153223A (en) * 2016-12-06 2018-06-12 因特利格雷特总部有限责任公司 The stage subordinate applied for the scalable real-time network of material handling system
CN107450725B (en) * 2017-07-31 2020-09-11 科大讯飞股份有限公司 Man-machine interaction application platform, method and storage medium
CN107402768B (en) * 2017-07-31 2020-06-30 四川长虹电器股份有限公司 Reusable and extensible Android application development method
CN107450725A (en) * 2017-07-31 2017-12-08 科大讯飞股份有限公司 Man-machine interaction application platform, method and storage medium
CN107402768A (en) * 2017-07-31 2017-11-28 四川长虹电器股份有限公司 A kind of Android application and development methods of reusable extension
CN110032718A (en) * 2019-04-12 2019-07-19 广州广燃设计有限公司 A kind of table conversion method, system and storage medium
CN110032718B (en) * 2019-04-12 2023-04-18 广州广燃设计有限公司 Table conversion method, system and storage medium
CN110393918A (en) * 2019-07-26 2019-11-01 网易(杭州)网络有限公司 A kind of method and apparatus of game trigger production
CN110727703B (en) * 2019-09-23 2022-10-11 苏宁云计算有限公司 Method and device for automatically identifying comments in JSON codes
CN110727703A (en) * 2019-09-23 2020-01-24 苏宁云计算有限公司 Method and device for automatically identifying comments in JSON (Java Server object notation) code
CN112817573A (en) * 2019-11-18 2021-05-18 北京沃东天骏信息技术有限公司 Method, apparatus, computer system, and medium for building streaming computing applications
CN112817573B (en) * 2019-11-18 2024-03-01 北京沃东天骏信息技术有限公司 Method, apparatus, computer system, and medium for building a streaming computing application
CN111897529A (en) * 2020-06-08 2020-11-06 华人运通(江苏)技术有限公司 Front-end component conversion method, device, equipment and readable storage medium
CN111897529B (en) * 2020-06-08 2023-11-14 华人运通(江苏)技术有限公司 Front-end component conversion method, device, equipment and readable storage medium
CN112965838A (en) * 2021-03-16 2021-06-15 支付宝(杭州)信息技术有限公司 Data race checking method and device for concurrent program
CN112965838B (en) * 2021-03-16 2024-04-19 支付宝(杭州)信息技术有限公司 Concurrent program data competition checking method and device
CN114610725B (en) * 2022-05-11 2022-08-16 成都九洲电子信息系统股份有限公司 Computer equipment, application method thereof and storage medium
CN114610725A (en) * 2022-05-11 2022-06-10 成都九洲电子信息系统股份有限公司 Data center assembly, application method thereof and storage medium

Also Published As

Publication number Publication date
CN101542457A (en) 2009-09-23
CN101167052B (en) 2012-05-16
CN101248405A (en) 2008-08-20
CN101167052A (en) 2008-04-23
CN101542457B (en) 2015-11-25
CN101248405B (en) 2010-09-15
CN101512503B (en) 2013-03-27

Similar Documents

Publication Publication Date Title
CN101512503B (en) Xml application framework
JP5042993B2 (en) How to configure a software application
JP5021193B2 (en) Declarative representation of an extensible workflow model
US8046737B2 (en) XML application framework
US7793255B1 (en) System and method for maintaining alternate object views
US8375351B2 (en) Extensible rapid application development for disparate data sources
KR101120815B1 (en) Method and apparatus for generating user interfaces based upon automation with full flexibility
CN101114299B (en) Method for programmatically hiding and displaying wiki page layout sections, data processing system
CN101777004B (en) Method and system for realizing BPEL sub-process multiplexing based on template in service-oriented environment
US8418125B2 (en) Incremental model refinement and transformation in generating commerce applications using a model driven architecture
US20040015834A1 (en) Method and apparatus for generating serialization code for representing a model in different type systems
CN101310271B (en) Interfaces for a productivity suite application and a hosted user interface
WO2006118872A2 (en) Application description language
US20140304214A1 (en) Navigable semantic network definition, modeling, and use
WO1999060478A1 (en) Proposal based architecture system
CN101965561A (en) Declarative support for asynchronous methods
Volz et al. Towards an open meta modeling environment
WO2009055759A2 (en) Declarative model interpretation
Kalnins et al. Metamodel specialization for graphical language support
Kalnins et al. Metamodel specialization for graphical modeling language support
Radjenovic et al. The role of dependency links in ensuring architectural view consistency
US20150355903A1 (en) Visualization of code units across disparate systems
Nytun et al. Metalevel representation and philosophical ontology
Barbier et al. Deliverable D3. 3 REMICS Recover Toolkit, Interim release
Lan et al. Study on unified metamodeling framework based on down-up mechanism

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: MICROSOFT TECHNOLOGY LICENSING LLC

Free format text: FORMER OWNER: MICROSOFT CORP.

Effective date: 20150429

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20150429

Address after: Washington State

Patentee after: Micro soft technique license Co., Ltd

Address before: Washington State

Patentee before: Microsoft Corp.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130327

Termination date: 20190420