[go: up one dir, main page]

JP5010625B2 - Recording medium and system storing program for controlling user interface property by data - Google Patents

Recording medium and system storing program for controlling user interface property by data Download PDF

Info

Publication number
JP5010625B2
JP5010625B2 JP2009032012A JP2009032012A JP5010625B2 JP 5010625 B2 JP5010625 B2 JP 5010625B2 JP 2009032012 A JP2009032012 A JP 2009032012A JP 2009032012 A JP2009032012 A JP 2009032012A JP 5010625 B2 JP5010625 B2 JP 5010625B2
Authority
JP
Japan
Prior art keywords
binding
user interface
source data
data value
property
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.)
Expired - Fee Related
Application number
JP2009032012A
Other languages
Japanese (ja)
Other versions
JP2009151810A (en
Inventor
ダブリュ.ベント サムエル
グプタ ナミタ
ジェイ.ジェニー デービッド
ホップマン ザ ファースト アレキサンダー
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 Corp
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 PCT/US2003/015708 external-priority patent/WO2004107200A1/en
Application filed by Microsoft Corp filed Critical Microsoft Corp
Priority to JP2009032012A priority Critical patent/JP5010625B2/en
Publication of JP2009151810A publication Critical patent/JP2009151810A/en
Application granted granted Critical
Publication of JP5010625B2 publication Critical patent/JP5010625B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K47/00Medicinal preparations characterised by the non-active ingredients used, e.g. carriers or inert additives; Targeting or modifying agents chemically bound to the active ingredient
    • A61K47/50Medicinal preparations characterised by the non-active ingredients used, e.g. carriers or inert additives; Targeting or modifying agents chemically bound to the active ingredient the non-active ingredient being chemically bound to the active ingredient, e.g. polymer-drug conjugates
    • A61K47/51Medicinal preparations characterised by the non-active ingredients used, e.g. carriers or inert additives; Targeting or modifying agents chemically bound to the active ingredient the non-active ingredient being chemically bound to the active ingredient, e.g. polymer-drug conjugates the non-active ingredient being a modifying agent
    • A61K47/62Medicinal preparations characterised by the non-active ingredients used, e.g. carriers or inert additives; Targeting or modifying agents chemically bound to the active ingredient the non-active ingredient being chemically bound to the active ingredient, e.g. polymer-drug conjugates the non-active ingredient being a modifying agent the modifying agent being a protein, peptide or polyamino acid
    • A61K47/64Drug-peptide, drug-protein or drug-polyamino acid conjugates, i.e. the modifying agent being a peptide, protein or polyamino acid which is covalently bonded or complexed to a therapeutically active agent
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K38/00Medicinal preparations containing peptides
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K47/00Medicinal preparations characterised by the non-active ingredients used, e.g. carriers or inert additives; Targeting or modifying agents chemically bound to the active ingredient
    • A61K47/30Macromolecular organic or inorganic compounds, e.g. inorganic polyphosphates
    • A61K47/42Proteins; Polypeptides; Degradation products thereof; Derivatives thereof, e.g. albumin, gelatin or zein
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61KPREPARATIONS FOR MEDICAL, DENTAL OR TOILETRY PURPOSES
    • A61K48/00Medicinal preparations containing genetic material which is inserted into cells of the living body to treat genetic diseases; Gene therapy
    • CCHEMISTRY; METALLURGY
    • C07ORGANIC CHEMISTRY
    • C07KPEPTIDES
    • C07K2319/00Fusion polypeptide

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Proteomics, Peptides & Aminoacids (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Theoretical Computer Science (AREA)
  • Molecular Biology (AREA)
  • Epidemiology (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Chemical & Material Sciences (AREA)
  • Medicinal Chemistry (AREA)
  • Pharmacology & Pharmacy (AREA)
  • General Physics & Mathematics (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Description

本発明は、ユーザインターフェースプロパティをデータにより制御するためのプログラムを格納した記録媒体およびシステムに関する。   The present invention relates to a recording medium and a system storing a program for controlling user interface properties by data.

ユーザに情報がどのように提示されるかにより、ユーザが情報をどの程度理解し把握できるかが決まる。コンピュータの表示装置では、色、フォントのスタイルなどを使用することにより、情報に強調(emphasis)を加えるのが標準的慣例となっている。このような強調を加えると、ユーザは情報の重要性を容易に把握することができる。情報(ユーザインターフェース)の表示を処理するコードおよび情報に対しアプリケーションのロジックを実行するコードは、通常、密接に結びついている。例えば、ロジックは、ユーザインターフェースのプロパティ(例えば、色、フォント、位置、サイズ)に直接データを割り当てる。したがって、ユーザインターフェースに変更があれば、ロジックも変わらなければならない。例えば、テキストボックス(text box)の場合、ユーザインターフェースコード(user interface code)はリッスン(listen)してテキストが変更(change)されたかどうかを判定(determine)し、変更(a change)があった場合、ユーザインターフェースコードは変更されたテキスト(changed text)が有効かどうかを確認(validate)し、その後、変更されたテキスト(changed text)を表示(display)する。ユーザインターフェースとロジックがこのように密接に結びついているという性質(nature)のため、コードは非常に脆弱(fragile)なものとなる。この脆弱なコード(fragile code)のメンテナンス(maintaining)は、非常にコストがかかり、時間も要する。   How the information is presented to the user determines how much the user can understand and grasp the information. In computer display devices, it is standard practice to add emphasis to information by using colors, font styles, and the like. By adding such emphasis, the user can easily grasp the importance of information. The code that handles the display of information (user interface) and the code that executes application logic on the information are usually closely tied. For example, the logic directly assigns data to user interface properties (eg, color, font, position, size). Therefore, if the user interface changes, the logic must change. For example, in the case of a text box, the user interface code is listened to determine if the text has changed, and there has been a change. If so, the user interface code validates whether the changed text is valid, and then displays the changed text. Because of this close nature of the user interface and logic, the code is very fragile. The maintenance of this fragile code is very expensive and time consuming.

本発明は、ユーザインターフェースプロパティをデータにより制御するプログラムを格納した記録媒体およびシステムを提供する。   The present invention provides a recording medium and system storing a program for controlling user interface properties by data.

本発明は、データをユーザインターフェースに関連付けるメカニズムを用意することにより、ユーザインターフェースとデータをそのアプリケーションロジック(application logic)とともに分離(decouple)する。本発明により、アプリケーションロジックを書くユーザインターフェース設計者(user interface designers)およびアプリケーション作成者(application authors)は独立に作業することができる。設計者(designers)も作成者(authors)も、互いに相手のコード(other's code)を理解する必要がないか、あるいは相手のコード開発(other's code development)に影響を与える(impact)こともない。本発明では、さらに、ユーザインターフェースへの変更をまったく簡単に行うことができる。例えば、新しい、よりユーザに訴える力のあるユーザインターフェースプラットフォーム(user interface platform)が使用可能になった場合、またはユーザインターフェース設計者がアプリケーションの外観(look of the application)を変更したくなった場合でも、設計者はアプリケーションロジック(application logic)を変更(change)する必要はない。さらに、データをユーザインターフェースに関連付けるメカニズムは、動的(dynamic)である。これにより、データの変更を自動的にプレゼンテーションに反映させることができる。さらに、ユーザインターフェースを介してユーザが行った入力により自動的にデータをアップデートすることができる。本発明を使用すると、ユーザインターフェースのデータ表示態様(data display aspect)(例えば、テキスト)だけでなく視覚的態様(visual aspect)(例えば、背景、フォントサイズなど)の関連付け(association)を行えるので、データの記述的な、視覚的効果の高い、柔軟性の高いプレゼンテーションが可能になる。例えば、株価が上昇しているときに、負数は赤色で表示されるか、または矢印は上方向を指すように表示できる。   The present invention provides a mechanism for associating data with a user interface, thereby decoupling the user interface and data along with its application logic. The present invention allows user interface designers and application authors who write application logic to work independently. Neither designers nor authors need to understand each other's code or affect other's code development. In the present invention, it is also possible to make changes to the user interface quite simply. For example, if a new, more user-friendly user interface platform becomes available or the user interface designer wants to change the look of the application The designer does not need to change the application logic. Furthermore, the mechanism for associating data with the user interface is dynamic. Thereby, the data change can be automatically reflected in the presentation. Furthermore, the data can be automatically updated by the input made by the user via the user interface. Using the present invention, it is possible to associate not only the data display aspect (eg, text) of the user interface, but also the visual aspect (eg, background, font size, etc.) Allows descriptive, highly visual and flexible presentation of data. For example, when the stock price is rising, negative numbers can be displayed in red, or arrows can be displayed pointing up.

したがって、本発明によれば、アプリケーション(an application)は、独立したパーツ(independent parts)と、ロジック部分(a logic portion)と、UI部分(UI portion)とに分けられる。ロジック部分では、アプリケーション内のデータバリュー(data values)を操作(manipulate)する。UI部分は、データのプレゼンテーション(presentation of the data)を受け持つ。バインディング仕様(binding specification)により、UIプロパティ(UI property)とデータバリュー(data value)との間の関係を記述(describe)する。バインディング仕様は、データバリューに変更(a change)が生じたときに通知される方法と、その変更をUIプロパティに反映(reflect)するようにUI部分を指令する方法を決定するために、システムレベルコード(system level code)により使用される。バインディング仕様は、ソースデータ項目(source data item)、ソースデータ項目内のデータバリューへのパス(a path to the data value)、ターゲットUIエレメント(target UI element)、およびターゲットUIエレメントのUIプロパティ(UI property on the target element)を識別(identify)する。バインディング(binding)は、コードまたはマークアップ言語(markup language)を使用して特定(specify)される。   Therefore, according to the present invention, an application is divided into independent parts, a logic portion, and UI portion. In the logic part, data values in the application are manipulated. The UI part is responsible for the presentation of the data. A relationship between a UI property and a data value is described by a binding specification. The binding specification is system level to determine how to be notified when a change occurs in the data value and how to instruct the UI part to reflect that change in the UI properties. Used by system level code. The binding specification includes a source data item, a path to the data value in the source data item, a target UI element, and a UI property (UI for the target UI element). property on the target element). A binding is specified using code or a markup language.

本発明の実施例で使用できるコンピューティングデバイスの一例を示す図である。FIG. 6 illustrates an example of a computing device that can be used in an embodiment of the present invention. 本発明にしたがってユーザインターフェースプロパティをデータで制御するための一実施形態を例示した機能ブロック図である。FIG. 6 is a functional block diagram illustrating one embodiment for controlling user interface properties with data in accordance with the present invention. 本発明の一実施形態によりユーザインターフェースプロパティをデータバリューにとバインドするプロセスを例示した論理流れ図である。5 is a logic flow diagram illustrating a process for binding user interface properties to data values according to one embodiment of the invention. 本発明にしたがってユーザインターフェースプロパティをデータと関連付ける複数の構文例を例示した図である。FIG. 6 illustrates a plurality of example syntaxes that associate user interface properties with data in accordance with the present invention.

本発明は、ユーザインターフェースをデータにより制御するシステムおよび方法を対象とする。本発明は、データをユーザインターフェースに関連付けるメカニズムを用意することにより、ユーザインターフェースとアプリケーションロジックとを分離する。後に詳述するが、関連するロジックとともに、ユーザインターフェースとデータとの間で行われるこのような分離により、さまざまな開発者グループは、他のグループのコード開発に影響を与えることなく、ユーザインターフェースおよびロジックの両方を取り扱うことができる。さらに、後に詳述するが、本発明は、データソースからユーザインターフェースへ、ユーザインターフェースからデータソースへデータを自動的に転送するシステムをおよびメカニズムを実現する。以下の説明全体を通して、「データバインディング(databinding)」という用語は、データバリュー(data value)をUIプロパティに関連付け、データバリューを転送(transfer)しアップデート(update)するなどのプロセスを指す。   The present invention is directed to a system and method for controlling a user interface with data. The present invention separates the user interface and application logic by providing a mechanism for associating data with the user interface. As detailed below, this separation between the user interface and the data, along with the associated logic, allows various groups of developers to interact with the user interface and without affecting the other groups' code development. Both logic can be handled. Further, as described in detail below, the present invention implements a system and mechanism for automatically transferring data from a data source to a user interface and from the user interface to the data source. Throughout the following description, the term “databinding” refers to processes such as associating a data value with a UI property, transferring and updating the data value.

コンピューティング環境
図1は、本発明を実施する際に使用することが可能なコンピューティングデバイスの一例を示す。図1を参照すると、非常に基本的な構成では、コンピューティングデバイス100は、少なくとも1つの処理ユニット102およびシステムメモリ104を備えるのがふつうである。コンピューティングデバイス100の正確な構成と種類に応じて、システムメモリ104は揮発性(RAMなど)、不揮発性(ROM、フラッシュメモリなど)、またはこれら2つの何らかの組み合わせとすることができる。システムメモリ104は、通常、オペレーティングシステム105、1つまたは複数のプログラムモジュール106を格納し、プログラムデータ107を含むこともある。プログラムモジュール106の例としては、ブラウザアプリケーション、財務管理アプリケーション、ワードプロセッサなどがある。基本構成は、図1において点線108内のコンポーネントにより示されている。
Computing Environment FIG. 1 illustrates an example of a computing device that can be used in practicing the present invention. With reference to FIG. 1, in a very basic configuration, computing device 100 typically includes at least one processing unit 102 and system memory 104. Depending on the exact configuration and type of computing device 100, system memory 104 may be volatile (such as RAM), non-volatile (such as ROM, flash memory, etc.), or some combination of the two. The system memory 104 typically stores an operating system 105, one or more program modules 106, and may include program data 107. Examples of the program module 106 include a browser application, a financial management application, and a word processor. The basic configuration is illustrated in FIG. 1 by the components within dotted line 108.

コンピューティングデバイス100は、さらに特徴または機能を追加することもできる。例えば、コンピューティングデバイス100は、磁気ディスク、光ディスク、またはテープなどの追加データ記憶デバイス(取り外し可能および/または取り外し不可能)を備えることもできる。このような追加ストレージ(additional storage)は、図1では、取り外し可能ストレージ109および取り外し不可能ストレージ110により例示されている。コンピュータ記憶媒体は、コンピュータ可読命令、データ構造体、プログラムモジュール、またはその他のデータなどの情報を格納する方法または技術で実施される揮発性および不揮発性、取り外し可能および取り外し不可能媒体を含むことができる。システムメモリ104、取り外し可能ストレージ109、および取り外し不可能ストレージ110は、コンピュータ記憶媒体のすべての例である。コンピュータ記憶媒体としては、RAM、ROM、EEPROM、フラッシュメモリまたはその他のメモリ技術、CD−ROM、デジタル多目的ディスク(DVD)またはその他の光ストレージ、磁気カセット、磁気テープ、磁気ディスクストレージまたはその他の磁気記憶デバイス、または目的の情報を格納するために使用されることができコンピューティングデバイス100によりアクセスされることが可能なその他の媒体がある。このような任意のコンピュータ記憶媒体をデバイス100の一部とすることができる。さらにコンピューティングデバイス100は、キーボード、マウス、ペン、音声入力デバイス、タッチ入力デバイスなどの入力デバイス112を備えることもできる。表示装置、スピーカー、プリンタなどの出力デバイス114を備えることもできる。これらのデバイスは、当業ではよく知られているため、本明細書でさらに詳しい説明をする必要はない。   The computing device 100 may add further features or functions. For example, the computing device 100 may include additional data storage devices (removable and / or non-removable) such as magnetic disks, optical disks, or tapes. Such additional storage is illustrated in FIG. 1 by removable storage 109 and non-removable storage 110. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in methods or techniques for storing information such as computer readable instructions, data structures, program modules, or other data. it can. System memory 104, removable storage 109, and non-removable storage 110 are all examples of computer storage media. Computer storage media include RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital multipurpose disk (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage There are devices, or other media that can be used to store information of interest and that can be accessed by computing device 100. Any such computer storage media can be part of device 100. Further, the computing device 100 may include an input device 112 such as a keyboard, mouse, pen, voice input device, touch input device, or the like. An output device 114 such as a display device, a speaker, or a printer may be provided. These devices are well known in the art and need not be described in further detail here.

また、コンピューティングデバイス100は、デバイスがネットワークなどで他のデバイス118と通信するために使用する通信接続(communication connection)116も含むことができる。通信接続116は、通信媒体の一例である。通信媒体は、通常、搬送波またはその他のトランスポートメカニズムなどの変調データ信号を介して、コンピュータ可読命令、データ構造体、プログラムモジュール、またはその他のデータによって実現されることができ、情報配信媒体を含む。「変調データ信号(modulated data signal)」という用語は、信号内の情報を符号化する方法によりその特性のうち1つまたは複数が設定または変更された信号を意味する。例えば、通信媒体としては、有線ネットワークまたは直接配線接続などの有線媒体、および音響、RF、赤外線、およびその他の無線媒体などの無線媒体がある。本明細書で使用されているコンピュータ可読媒体という用語は、記憶媒体と通信媒体の両方を含む。   The computing device 100 may also include a communication connection 116 that the device uses to communicate with other devices 118, such as over a network. Communication connection 116 is an example of a communication medium. Communication media typically can be implemented with computer readable instructions, data structures, program modules, or other data via a modulated data signal such as a carrier wave or other transport mechanism and includes information delivery media. . The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. For example, communication media include wired media such as a wired network or direct wire connection, and wireless media such as acoustic, RF, infrared, and other wireless media. The term computer readable media as used herein includes both storage media and communication media.

実施例
図2は、本発明によりユーザインターフェースプロパティをデータにより制御するシステム200の一実施形態を例示する機能ブロック図である。システム200は、アプリケーション202、プラットフォーム220、およびデータソース230を含む。アプリケーション202は、図1に示されているコンピューティングデバイス100上の複数のアプリケーション106のうちの1つとすることができる。アプリケーション202は、データバリュー(例えば、ソースデータバリュー(source data value)238)を操作するためのコード(これ以降、ロジック204と呼ぶ)を含む。一般に、ロジック204はデータバリューに対し検証(validation)を実行し、データバリューをアップデートする。データバリュー(例えば、データバリュー238)は、データ項目(例えば、データ項目232)のプロパティ(つまり、データソースプロパティ)の内容を表す。データ項目232は、データソース(例えば、データソース230)内に配置されている。それぞれのデータソース230は、複数のデータ項目を含むことができ、それぞれのデータ項目は、1つまたは複数のプロパティを備え、ソースデータバリューがそのプロパティに格納される。ロジック203は、複数のデータソースからのデータバリューを操作することができる。データソースは、XMLドキュメント、オブジェクト、データセットなどを含むことができる。後で詳述するが、データ項目のそれぞれのプロパティは、ユーザインターフェース(UI)を制御するために使用されることが可能である。
Example FIG. 2 is a functional block diagram illustrating one embodiment of a system 200 for controlling user interface properties with data in accordance with the present invention. System 200 includes an application 202, a platform 220, and a data source 230. The application 202 can be one of a plurality of applications 106 on the computing device 100 shown in FIG. Application 202 includes code (hereinafter referred to as logic 204) for manipulating data values (eg, source data value 238). In general, the logic 204 performs validation on the data value and updates the data value. The data value (eg, data value 238) represents the content of the property (ie, data source property) of the data item (eg, data item 232). Data item 232 is located in a data source (eg, data source 230). Each data source 230 can include a plurality of data items, each data item having one or more properties, and the source data value is stored in the properties. The logic 203 can manipulate data values from multiple data sources. Data sources can include XML documents, objects, datasets, and the like. As will be described in detail later, each property of the data item can be used to control a user interface (UI).

アプリケーション202はさらに、情報を表示するためのコード(これ以降ユーザインターフェース206と呼ぶ)も含む。ユーザインターフェース206は、複数のユーザインターフェースエレメント(例えば、ユーザインターフェースエレメント208)を含む。それぞれのユーザインターフェースエレメント208は、表示されるテキスト、色、フォント、位置、サイズなどの1つまたは複数のプロパティ(例えば、UIプロパティ210および212)を含む。次に、後で詳述するが、これらのUIプロパティ210および212は、本発明により、データバリュー238および242の1つまたは複数に関連付けられる。一般に、関連付けは、プラットフォーム220内のバインディングエンジン(binding engine)224を介して実行される。プラットフォーム220は、オペレーティングシステム、仮想エンジンなどのシステムレイヤのサービスを表す。プラットフォーム220は、さらに、データバリュー234および242に関係する階層情報を保持し、関連付けられているプロパティをデータバリューでアップデートする役割を持つプロパティエンジン222を備える。バインディングエンジン224およびプロパティエンジン222は別々のコンポーネントとして示されているとしても、当業者であれば、それぞれに備えられている機能は、本発明から逸脱することなく、1つのコンポーネント内に収められることを理解するであろう。   The application 202 further includes code for displaying information (hereinafter referred to as the user interface 206). User interface 206 includes a plurality of user interface elements (eg, user interface element 208). Each user interface element 208 includes one or more properties (eg, UI properties 210 and 212) such as displayed text, color, font, position, size, and the like. Next, as described in detail below, these UI properties 210 and 212 are associated with one or more of the data values 238 and 242 in accordance with the present invention. In general, the association is performed via a binding engine 224 in the platform 220. The platform 220 represents system layer services such as an operating system and a virtual engine. The platform 220 further includes a property engine 222 that holds hierarchical information related to the data values 234 and 242 and serves to update the associated properties with the data values. Even though the binding engine 224 and the property engine 222 are shown as separate components, those skilled in the art will appreciate that the functionality provided for each can be contained within a single component without departing from the invention. Will understand.

データバリュー238および242とそのUIプロパティ210および212との関連付け(つまり、バインディング)は、図2において、データバリューからUIプロパティへの点線で表されている(これ以降バインディング226および228と呼ぶ)。以下の説明では、「データバリュー」という用語は「ソースデータバリュー」という用語に言い換えられることができる。同様、UIプロパティという用語は、「ターゲットプロパティ」という用語に言い換えられることもできる。これらのバインディング226および228を使用すると、動的プロパティ(つまり、ターゲットプロパティ)は任意のオブジェクトのプロパティなどのデータバリュー(つまり、ソースデータバリュー)から自動的に設定されるようにできる。これらのバインディングは動的であり、ソースデータバリューの変更を反映するようにバインドされたターゲットプロパティは自動的にアップデートされる。   The association (that is, binding) between the data values 238 and 242 and the UI properties 210 and 212 is represented by a dotted line from the data value to the UI property in FIG. 2 (hereinafter referred to as bindings 226 and 228). In the following description, the term “data value” can be rephrased as the term “source data value”. Similarly, the term UI property can be rephrased as the term “target property”. Using these bindings 226 and 228, dynamic properties (ie, target properties) can be automatically set from data values (ie, source data values) such as properties of any object. These bindings are dynamic and target properties that are bound to reflect changes in the source data value are automatically updated.

この自動的にアップデート機能を実現するために、本発明では、さらに、通知メカニズム(notification mechanism)を用意している(例えば、図2において、ノーティファイヤ(notifier)236および240とノーティファイヤからプラットフォーム220までの矢印で表されている)。各データ項目232および234にはそれぞれ、対応するノーティファイヤ236および240がある。通知メカニズムは、ソースデータバリューが変更されたこと、およびデータバリューはターゲットプロパティ(つまり、UIプロパティ)に伝搬されることが可能であることをシステムに通知する役割を持つ。   In order to realize this automatic update function, the present invention further provides a notification mechanism (for example, in FIG. 2, notifiers 236 and 240 and notifier to platform 220). Up to the arrow). Each data item 232 and 234 has a corresponding notifier 236 and 240, respectively. The notification mechanism is responsible for notifying the system that the source data value has changed and that the data value can be propagated to the target property (ie, UI property).

マークアップ、コードなどを通じてバインディング226および228が作成されると、バインディングエンジン224はバインディングに関連付けられているバインディングオブジェクト(例えば、バインディングオブジェクト250および252)を作成する。例えば、バインディングオブジェクト252は、バインディングエンジン224内のバインディング228を表すことができる。それぞれのバインディングオブジェクトは、複数のプロパティを含む(例えば、バインディングプロパティ260〜272)。これらのバインディングプロパティ260〜272は、プログラムによる設定が可能である。以下の説明では、これらのプロパティのそれぞれについて説明し、図4に、それらプロパティのいくつかを特定(specify)するバインディングをアクティブにするコード例を示す。   When bindings 226 and 228 are created through markup, code, etc., binding engine 224 creates binding objects (eg, binding objects 250 and 252) associated with the binding. For example, the binding object 252 can represent a binding 228 within the binding engine 224. Each binding object includes a plurality of properties (for example, binding properties 260 to 272). These binding properties 260 to 272 can be set by a program. The following discussion describes each of these properties, and FIG. 4 shows an example code that activates a binding that specifies some of those properties.

バインディングプロパティの1つ(one of the binding properties)(これ以降、パス(path)260と呼ぶ)は、(ソースオブジェクトを介して)ソースデータバリューを特定する方法を識別する。パス260は、ソースオブジェクト上のプロパティ、サブプロパティ、またはインデクサ(indexer)、ADO(ActiveX Data Objects)内の列、XML上のXPathなどを参照することができる。それとは別に、パスによりリフレクションまたはADOパスを参照することもできる。   One of the binding properties (hereinafter referred to as path 260) identifies the way to identify the source data value (via the source object). The path 260 can refer to a property, sub-property or indexer on the source object, a column in ADO (ActiveX Data Objects), an XPath on XML, or the like. Alternatively, reflection or ADO path can be referred to by path.

バインディングプロパティのもう1つ(これ以降、バインドタイプ(bindtype)262と呼ぶ)により、バインディング226および228の型を定義する。一実施形態では、バインドタイプは、単方向(oneWay)の、双方向(twoWay)の、および一度だけ(oneTime)の、ものを含む。図のように、バインディング226は、双方向バインディング(twoWay binding)を表し、バインディング228は、単方向バインディング(oneWay binding)を表す。これらのバインディングタイプの1つはデフォルトとして設定される。一実施形態では、双方向バインディングが、デフォルトバインディングタイプとして設定されている。   The types of bindings 226 and 228 are defined by another binding property (hereinafter referred to as a bind type 262). In one embodiment, bind types include one-way (oneWay), two-way (twoWay), and one-time (oneTime). As shown, the binding 226 represents a two-way binding, and the binding 228 represents a one-way binding. One of these binding types is set as the default. In one embodiment, bi-directional binding is set as the default binding type.

バインドタイプ262が単方向(oneWay)として指定されている場合、これは、バインディングエンジン224に、関連するソースデータバリューに変更が生じる毎にターゲットプロパティ(例えば、UIプロパティ210)をアップデートするよう通知する。OneWayバインドタイプは、データバリューを、テキスト色、テキスト背景色などの編集不可能なUIプロパティにバインドする場合に使用される。単方向バインドタイプを使用すると、後述するように、双方向バインドタイプのオーバーヘッドを避ける(avoid)ことができる。このようにオーバーヘッドの減少は、レイアウト内容に関するUIプロパティの変更をリッスン(listen)している場合に最も顕著である。これらのUIプロパティに対して、UIプロパティの子のそれぞれの動的プロパティは、UIプロパティ変更に関してリッスンされなければならない。単方向バインドタイプもまた、UIプロパティの変更が単に他の表示の詳細を示すためだけであれば、有用であると思われる。   If the bind type 262 is specified as one-way (oneWay), this informs the binding engine 224 to update the target property (eg, UI property 210) whenever there is a change in the associated source data value. . The OneWay bind type is used when data values are bound to non-editable UI properties such as text color and text background color. Using the unidirectional bind type avoids the overhead of the bidirectional bind type, as described below. Thus, the reduction in overhead is most noticeable when listening to changes in UI properties related to layout contents. For these UI properties, the dynamic properties of each of the UI property children must be listened for UI property changes. The unidirectional bind type may also be useful if the UI property changes are merely to show other display details.

バインドタイプ262が双方向として指定されている場合、これは、バインディングエンジン224に、ソースデータバリューに変更が生じる毎にターゲットプロパティをアップデートし、またその逆を行うよう通知する。双方向バインディングは、ユーザが編集ボックスで行った変更がソースデータバリューに伝搬される必要がある場合にデータを編集ボックスにバインドするときに特に有用である。双方向バインディングの別のシナリオは、他のアプリケーションがソースデータフィールドを受け持ち、変更が編集ボックスの中に反映される場合である。   If the bind type 262 is specified as bidirectional, this informs the binding engine 224 to update the target property each time the source data value changes and vice versa. Bidirectional binding is particularly useful when binding data to an edit box when changes made by the user in the edit box need to be propagated to the source data value. Another scenario for bidirectional binding is when other applications are responsible for the source data field and the changes are reflected in the edit box.

バインドタイプ262が一度だけのものとして指定されている場合、これは、バインディングエンジン224に、関連するソースデータバリューが変更された場合でも、ターゲットプロパティを1回アップデートしてからそのまま終了するよう通知する。一度だけのバインドタイプ(oneTime bindtype)は、一部のターゲットプロパティがソースフィールドからの何らかのバリューで初期化される必要があり、データコンテキストがあらかじめ知られていない場合に使用される。さらに、一度だけのバインドタイプは、ソースデータバリューを変更せずに読み取り専用で使用する場合に有用である。データソースが本発明のプロパティ通知メカニズムをサポートしていない場合(例えば、IPropertyChangeインターフェース)、単方向として指定されているターゲットプロパティは、バインディングがバインドタイプとして一度だけを指定している場合と同様にアップデートされる。   If the bind type 262 is specified as only once, this informs the binding engine 224 to update the target property once and exit immediately even if the associated source data value has changed. . The one-time bind type (oneTime bindtype) is used when some target properties need to be initialized with some value from the source field and the data context is not known in advance. In addition, the one-time bind type is useful for read-only use without changing the source data value. If the data source does not support the property notification mechanism of the present invention (eg, IPropertyChange interface), the target property specified as unidirectional is updated as if the binding specified only once as the bind type. Is done.

バインディングプロパティのもう1つ(これ以降、アップデートタイプ264と呼ぶ)により、バインドタイプ262が双方向を指定する場合に対するアップデートの種類を定義する。通常、双方向バインディングは、ターゲットプロパティの変更をリッスンし、その変更をソースデータバリューに伝搬させて返す。このプロセスは、ソースをアップデートすると言われる。通常、ターゲットプロパティが変更されると必ずアップデートすることが望ましい。しかし、状況によっては、キーを押す毎にアップデートするのでは無駄なサイクルが発生し、ユーザには入力エラーなどを訂正するチャンスがない。アップデートタイプ(updatetype)264では、ユーザはアップデートを実行する時期を特定することができる。一実施形態では、アップデートタイプ264により、Immediate、OnLostFocus、およびExplicitを特定(specify)することができる。Immediateを特定すると、バインディングエンジンは、ターゲットプロパティが変更される毎に、ソースデータバリューをアップデートする。OnLostFocusを特定すると、バインディングエンジンは、ターゲットエレメントがキーボードのフォーカスを失った後、ソースデータバリューをアップデートする。Explicitを特定すると、バインディングエンジンは、アプリケーションがアップデートを明示的に要求した場合のみ、ソースデータバリューをアップデートする。通常、この明示的な要求はメソッドを介して実行される。このメソッドはアップデートタイプ264の設定のため呼び出されることが可能であっても、このメソッドは、アップデートタイプがExplicitに設定されている場合に使用される。方法例を1つ以下に示す。
Binding.GetBinding(myElement, myProperty).Update();
Another type of binding property (hereinafter referred to as update type 264) defines the type of update for the case where the bind type 262 specifies bidirectional. Usually, a bi-directional binding listens for changes in target properties and propagates the changes back to the source data value. This process is said to update the source. It is usually desirable to update whenever the target property changes. However, in some situations, updating every time a key is pressed results in a useless cycle, and the user has no chance to correct an input error or the like. The update type (updatetype) 264 allows the user to specify when to perform the update. In one embodiment, update type 264 may specify Immediate, OnLostFocus, and Explicit. When Immediate is specified, the binding engine updates the source data value every time the target property is changed. Specifying OnLostFocus causes the binding engine to update the source data value after the target element loses keyboard focus. When Explicit is specified, the binding engine updates the source data value only when the application explicitly requests an update. Usually, this explicit request is performed via a method. Even though this method can be called to set the update type 264, this method is used when the update type is set to Explicit. One example method is shown below.
Binding.GetBinding (myElement, myProperty) .Update ();

バインディングプロパティのもう1つ(これ以降、ソース(source)266と呼ぶ)により、バインディングに対するソースデータ項目を識別する。簡単にいうと、図4に示され、それに関して説明されているように、ソース266は、プログラムにより、またはマークアップを使用して、設定されることが可能である。プログラムに関しては、開発者は、バインディングでソースデータ項目として使用しなければならないオブジェクトへのobjectrefを用意する。簡単にいうと、図4に関して詳細に説明していうように、マークアップでは、ソースプロパティを設定するさまざまな方法がある。   Another of the binding properties (hereinafter referred to as source 266) identifies the source data item for the binding. Briefly, as shown and described in FIG. 4, source 266 can be set programmatically or using markup. For the program, the developer prepares an objectref to the object that must be used as the source data item in the binding. In brief, as described in detail with respect to FIG. 4, there are various ways to set source properties in markup.

バインディングプロパティのもう1つ(これ以降、トランスフォーマ(transformer)268と呼ぶ)は、クラス参照(class reference)を受け入れる。クラス参照は、<Namespace>.<Class>,<Assembly>を使用して特定されることが可能である。特定されているクラス参照は、バインディングエンジン224により呼び出され、ソースデータバリューをターゲットプロパティによって受け入れられる形式にトランスフォームする。クラス参照内のメソッドはこのトランスフォームを呼び出すが、図2にトランスフォーム244として表されている。クラス参照では、さらに、ターゲットプロパティをソースデータバリューにより受け入れられる形式にトランスフォームする逆トランスフォーム(inverse transform)(図に示されていない)も特定することができる。トランスフォーム244は、UIの意味を供給するか、またはカスタムタイプのコンバータとすることができる。   Another of the binding properties (hereinafter referred to as transformer 268) accepts a class reference. The class reference is <Namespace>. It can be specified using <Class>, <Assembly>. The identified class reference is invoked by the binding engine 224 to transform the source data value into a form that is accepted by the target property. The method in the class reference calls this transform, which is represented as transform 244 in FIG. The class reference can also specify an inverse transform (not shown) that transforms the target property into a form that is accepted by the source data value. The transform 244 can provide UI meaning or can be a custom type converter.

バインディングプロパティのもう1つ(これ以降カルチャー270と呼ぶ)は、ソースデータバリューをトランスフォームする前/後にソースデータバリューが処理されるべき方法を定義する。カルチャー270は、トランスフォーマ268とともに動作し、開発者はいソースデータバリューをトランスフォームする規則を特定することができる。例えば、カルチャーでは、数バリュー、日付などに対する特定の形式を特定することができる。一実施形態では、カルチャー270は、CultureInfo型のバリューを受け入れる。開発者は、トランスフォームを実行する際にカルチャー270により特定された規則を使用するオプションを用意する。   Another of the binding properties (hereinafter referred to as culture 270) defines how the source data value should be processed before / after transforming the source data value. Culture 270 works with transformer 268 to allow developers to specify rules that transform source data values. For example, in culture, a specific format for several values, dates, etc. can be specified. In one embodiment, culture 270 accepts a value of CultureInfo type. Developers have the option to use the rules specified by culture 270 when performing the transform.

バインディングプロパティのもう1つ(これ以降、バインドフラグ272と呼ぶ)は、イベントを受信し、データの転送を通知するイベントを受信するメカニズムを備える。データバインディングの上述の方法は非同期であるが、バインドフラグ272では、開発者はいつターゲットが新しいバリューでアップデートされているかを知ることができる。このメカニズムを使用するために、バインドフラグ272は「NotifyOnTransfer」に設定される。その後、いつもの方法を使用しイベントに関してハンドラを登録する。このようなメカニズムの一使用例を以下に示す。

Public static void main()
{
//ハンドラを追加する
elem.AddAttachedHandler(Binding.DataTranferEvent,
new DataTranferEventHandler(OnDataTransfer),
RoutedEventArgs.EventStage.Direct);

//イベントハンドラ
private static void OnDataTransfer(Element e, DataTransferEventArgs args)
{
DynamicProperty DP=args.DP;
v=e.GetValue(DP);
DoSomething(v);
}
source.field="new value";
}.
Another of the binding properties (hereinafter referred to as the bind flag 272) has a mechanism for receiving an event and receiving an event notifying the transfer of data. Although the above method of data binding is asynchronous, the bind flag 272 allows the developer to know when the target is updated with a new value. In order to use this mechanism, the bind flag 272 is set to “NotifyOnTransfer”. Then use the usual method to register a handler for the event. An example of the use of such a mechanism is shown below.

Public static void main ()
{
// add a handler
elem.AddAttachedHandler (Binding.DataTranferEvent,
new DataTranferEventHandler (OnDataTransfer),
RoutedEventArgs.EventStage.Direct);

//Event handler
private static void OnDataTransfer (Element e, DataTransferEventArgs args)
{
DynamicProperty DP = args.DP;
v = e.GetValue (DP);
DoSomething (v);
}
source.field = "new value";
}.

上記のコード例に示されているように、OnDataTransferイベントが発生すると、開発者は動的プロパティがアップデートされていることが通知される。したがって、開発者は、さらに処理を進めるためターゲットバリューを使用することが可能である。   As shown in the code example above, when the OnDataTransfer event occurs, the developer is notified that the dynamic property has been updated. Therefore, the developer can use the target value for further processing.

図3は、本発明の一実施形態によるバインディングメカニズムを例示する論理流れ図である。概して、バインディングメカニズムは、バインディングをセットアップするアクションを実行し(ブロック302〜306)、その後、バインディングで特定されているようにターゲットプロパティまたはソースデータバリューの変更に関係するアクションを実行する(ブロック310〜338)。処理は、ブロック302に続く。   FIG. 3 is a logic flow diagram illustrating a binding mechanism according to one embodiment of the invention. In general, the binding mechanism performs an action to set up the binding (blocks 302-306), and then performs an action related to changing the target property or source data value as specified in the binding (blocks 310-306). 338). Processing continues at block 302.

ブロック302において、作成時に特定された引数(argument)に基づいてバインディングオブジェクトが作成される。簡単に言うと、バインディングオブジェクト252に対する各プロパティ(つまり、図2に示されているプロパティ260〜272)は、作成時に引数として特定されることが可能である。バインディングは、マークアップを通じて、プログラムで、および類似の方法で作成されることが可能である。図4は、バインディングを作成し、プロパティ260〜272を特定する構文例を示している。それぞれの作成方法で、ソースデータ項目、ソースデータ項目内のデータバリューへのパス、ターゲットUIエレメント、およびおUIエレメント上のターゲット動的プロパティを特定する。現在の流れ図には示されていないが、バインディングオブジェクトのプロパティも、アプリケーションプログラミングインターフェース(API)を使用するなどして、実行時に動的に修正されることが可能である。処理はステップ306に進む。   In block 302, a binding object is created based on the arguments specified at creation time. In short, each property for the binding object 252 (ie, the properties 260-272 shown in FIG. 2) can be specified as an argument at the time of creation. Bindings can be created through markup, programmatically, and in a similar manner. FIG. 4 shows a syntax example for creating a binding and specifying the properties 260 to 272. Each creation method identifies the source data item, the path to the data value in the source data item, the target UI element, and the target dynamic property on the UI element. Although not shown in the current flow diagram, the properties of the binding object can also be modified dynamically at runtime, such as using an application programming interface (API). The process proceeds to step 306.

ブロック304において、バインディングがアクティブにされる。一実施形態では、バインディングは、バインディングエンジンがソースオブジェクトを存在させる、ターゲットエレメントを表示できる状態にするなど、バインディングに十分なコンテキストがあることを通知した後、自動的にアクティブ化されることが可能である。バインディングエンジンは、バインディングのアクティブ化を認識することを受け持つ。処理は、ブロック304に続く。   In block 304, the binding is activated. In one embodiment, the binding can be activated automatically after notifying that the binding has sufficient context, such as allowing the binding engine to have the source object present and the target element ready to be displayed. It is. The binding engine is responsible for recognizing binding activation. Processing continues at block 304.

ブロック306において、特定されたソースプロパティのバリューが見つけられる。一実施形態では、バリューを見つけるためにリフレクションが使用される。リフレクションは、要求されたオブジェクトに関する情報を呼び出し側が取得するために使用する一般的なメカニズムである。この情報は、サポートされているオブジェクト、パブリックプロパティなどを含む。他の実施形態では、データ項目がコレクションである場合、バインディングエンジンは、発見的手法を何度も実行して、現在のレコードまたはデータオブジェクト(コレクション)自体を使用しているかどうかを判別する。第1の発見的手法は、バインディングがプロパティまたはインデクサを参照したときに適用される。このような状況では、コレクションオブジェクト上の対応するプロパティまたはインデクサは、そのようなプロパティまたはインデクサが存在する場合に使用される。それとは別に、コレクションの現在のレコードはデータ項目として使用される。プロパティまたはインデクサが存在しない場合、他の発見的手法が適用される。このような状況では、コレクションオブジェクトは、コレクションオブジェクトは有効である限り、ターゲットプロパティに使用される。そうでない場合、現在のレコードが使用される。ブロック308に進む前に、バインディングでトランスフォームを特定している場合(ブロック307)、トランスフォームがバリューに適用される。トランスフォームの適用については、以下のブロック316に関して詳しく説明されている。処理は、ブロック308に続く。   At block 306, the value of the identified source property is found. In one embodiment, reflection is used to find value. Reflection is a common mechanism that a caller uses to obtain information about a requested object. This information includes supported objects, public properties, etc. In other embodiments, if the data item is a collection, the binding engine performs a heuristic many times to determine whether it is using the current record or the data object (collection) itself. The first heuristic is applied when the binding references a property or indexer. In such a situation, the corresponding property or indexer on the collection object is used if such a property or indexer exists. Apart from that, the current record of the collection is used as a data item. If the property or indexer does not exist, other heuristics are applied. In such a situation, the collection object is used for the target property as long as the collection object is valid. Otherwise, the current record is used. Before proceeding to block 308, if the transform identifies a transform (block 307), the transform is applied to the value. The application of the transform is described in detail with respect to block 316 below. Processing continues at block 308.

ブロック308において、見つかったバリューは、ターゲットプロパティに割り当てられる。一実施形態では、プロパティの階層保持する役割を持つプロパティエンジンがバリューを割り当てることができる。他の実施形態では、ターゲットプロパティにバリューを割り当てる前に、バリューをトランスフォームするためにバインディングの作成時に特定されたトランスフォームを呼び出すことが可能である。他の精密化では、プロパティエンジンはプロパティに新しいバリューを持つというマークをつけることができる。ブロック302〜308が実行された後、バインディングエンジンは、ターゲットプロパティおよびソースデータバリューを必要に応じてアップデートする用意ができている。一般に、バインディングメカニズムは非同期である。   At block 308, the found value is assigned to the target property. In one embodiment, a value can be assigned by a property engine that is responsible for maintaining a hierarchy of properties. In other embodiments, prior to assigning a value to the target property, it is possible to invoke the transform specified when creating the binding to transform the value. In other refinements, the property engine can mark a property as having a new value. After blocks 302-308 are executed, the binding engine is ready to update the target properties and source data values as needed. In general, the binding mechanism is asynchronous.

したがって、ブロック308から、処理は2つの非同期パスを辿る。第1のパス(ブロック310〜318)は、ターゲットプロパティをアップデートすることに関連付けられており、第2のパス(ブロック330〜338)は、ソースデータバリューをアップデートすることに関連付けられている。これらのパスのそれぞれについて以下で説明する。第1に、ターゲットプロパティをアップデートする役割を持つパスについて示される。   Thus, from block 308, the process follows two asynchronous paths. The first path (blocks 310-318) is associated with updating the target property, and the second path (blocks 330-338) is associated with updating the source data value. Each of these paths is described below. First, it shows the path that has the role of updating the target property.

決定ブロック(decision block)310において、バインディングエンジンは、ソースデータバリューおよびターゲットプロパティに関連付けられているバインディングでバインドタイプを一度だけとして特定しているかどうかを判別する。バインドタイプが一度だけの場合、そのバインドに関して処理は完了しており、終了に進む。当業者であれば、バインドタイプが一度だけの場合、バインディングエンジンはソースプロパティの変更イベントをリッスンしないことを理解するであろう。したがって、実際の運用では、バインディングエンジン内のロジックは必ずしも、ブロック310で示されているようにチェックを実行しない。さらに、データ項目がIPropertyChangeを実施しない場合、処理は完了する。しかし、バインドタイプが一度だけでない場合には、処理はブロック312に続く。   In a decision block 310, the binding engine determines whether the binding type is specified as only once in the binding associated with the source data value and the target property. If the bind type is only once, the process for the bind is complete and the process proceeds to the end. One skilled in the art will understand that if the bind type is only once, the binding engine will not listen for source property change events. Thus, in actual operation, the logic within the binding engine does not necessarily perform a check as indicated by block 310. Further, if the data item does not implement IPropertyChange, the process is complete. However, if the bind type is not only once, processing continues at block 312.

ブロック312において、バインディングエンジンはバインディングに関連付けられている通知をリッスンする。データバインディングでソースデータバリューを使用してターゲットを直接アップデートしないため、本発明では通知メカニズムを実施する。プロパティ変更通知およびコレクションビュー「CurrentChanged」通知などの通知メカニズムは、当業では知られており、ここではさらに詳しい説明を要しない。異なるアクションにより、データバリュー変更、ページナビゲーション、シャットダウン、データコレクション内の注目するレコードの変更などの通知が実行される。本発明はデータコレクション内の注目するレコードの変更があるとアップデートをトリガするので、本発明は、ユーザインターフェースおよびロジックをさらに分離する便利なメカニズムを備える。例えば、本発明により、開発者は、データコレクション内の注目する次のレコードにどのように変更を加えるかを特定するコードをロジック内に作成するだけでよい。変更が実行されると、バインディングエンジンは、本発明により、すでに特定されているバインディングに基づき、ユーザインターフェースをアップデートする。すでに述べたように、ユーザインターフェースとロジックとのこのような分離により、ユーザインターフェースおよびロジックが相互に関連していたときに比べてアプリケーションはより堅牢になり、また保守も容易になっている。   At block 312, the binding engine listens for notifications associated with the binding. The present invention implements a notification mechanism because the target is not directly updated using the source data value in data binding. Notification mechanisms such as property change notifications and collection view “CurrentChanged” notifications are known in the art and need no further explanation here. Different actions can trigger notifications such as data value changes, page navigation, shutdown, and changes to records of interest in the data collection. Since the present invention triggers an update when there is a change in a record of interest in the data collection, the present invention provides a convenient mechanism for further separating the user interface and logic. For example, in accordance with the present invention, the developer need only write code in the logic that specifies how to make changes to the next record of interest in the data collection. When the change is performed, the binding engine updates the user interface based on the already identified binding according to the present invention. As already mentioned, this separation of user interface and logic makes the application more robust and easier to maintain than when the user interface and logic are interrelated.

以下のコードは、通知メカニズムの一実施例である。以下で作成されたコード例はC#で書かれているが、当業者であれは、通知メカニズムを実施するためにさまざまな言語および構文が使用されることが可能であることを理解するであろう。このような実施については、各データ項目で使用できるようにインターフェースが定義される。各データ項目は、動的アップデートを実施するためにこのインターフェースを継承する。

Public interface IPropertyChange
{
event PropertyChangedEventHandler PropertyChanged;
}.
The following code is an example of a notification mechanism. The code examples created below are written in C #, but those skilled in the art will understand that various languages and syntaxes can be used to implement the notification mechanism. Let's go. For such implementations, an interface is defined for use with each data item. Each data item inherits this interface to perform a dynamic update.

Public interface IPropertyChange
{
event PropertyChangedEventHandler PropertyChanged;
}.

次に、イベントハンドラ(event handler)およびその引数(argument)が定義される。

public delegate void PropertyChangedEventHandler(object sender, PropertyChangedEventArgs e);

public class PropertyChangedEventArgs:EventArgs
{
public virtual string PropertyName { get ;}
}.
Next, an event handler and its arguments are defined.

public delegate void PropertyChangedEventHandler (object sender, PropertyChangedEventArgs e);

public class PropertyChangedEventArgs: EventArgs
{
public virtual string PropertyName {get;}
}.

クラスPropertyChangedEventArgsは型文字列を持つPropertyNameという名前の読み取り専用プロパティを1つ含む。PropertyNameプロパティは、変更されたプロパティに対する名前を含む。次に、各ソースデータ項目は、そのプロパティの1つが変更された場合に必ず、PropertyChangedデリゲートを呼び出すことによりこのインターフェースを実施する。以下は、通知メカニズムの実施形態により、ソースオブジェクト(例えば、データ項目232)を実施する例である。

public class myClass : IPropertyChange
{
private string foo = "Hello World";
public string Foo
{
get {return foo;}
set {if(foo ! = value)
{
foo = value;
NotifyPropertyChanged("foo");
}
}
public event PropertyChangedEventHandler Property Changed;
private void NotifyPropertyChanged(string propName)
{
PropertyChanged(this, new
PropertyChangedEventArgs(propName));
}
}.
The class PropertyChangedEventArgs contains one read-only property named PropertyName with a type string. The PropertyName property contains the name for the changed property. Next, each source data item implements this interface by calling the PropertyChanged delegate whenever one of its properties changes. The following is an example of implementing a source object (eg, data item 232) according to an embodiment of a notification mechanism.

public class myClass: IPropertyChange
{
private string foo = "Hello World";
public string Foo
{
get {return foo;}
set (if (foo! = value)
{
foo = value;
NotifyPropertyChanged ("foo");
}
}
public event PropertyChangedEventHandler Property Changed;
private void NotifyPropertyChanged (string propName)
{
PropertyChanged (this, new
PropertyChangedEventArgs (propName));
}
}.

上記のコード例に示されているように、「foo」プロパティの「set」メソッドは、新しいバリューが旧いバリューと異なるかどうかを判別する。バリューが異なる場合、ハンドラが呼び出される。PropertyInfoを取得するためリフレクションが実行される。他の精密化では、バインディングエンジンは、リフレクションを通じて取得されたプロパティの型をキャッシュすることができる。したがって、リフレクションは1回実行され、プロパティについて通知が受信される毎に実行されるわけではない。他の精密化では、引数で空文字列が渡され、データ項目のデータバリューのそれぞれに対するすべてのバインディングをアップデートすべきであることを通知することができる。これは、ソースオブジェクトで、どのプロパティが変更され、各バインディングをアップデートしたいかがはっきりしない場合に実行できる。バインディングエンジンが、データソースバリューが変更されたという通知を受信すると、処理は決定ブロック314に進む。   As shown in the code example above, the “set” method of the “foo” property determines whether the new value is different from the old value. If the values are different, the handler is called. Reflection is performed to get PropertyInfo. In other refinements, the binding engine can cache property types obtained through reflection. Thus, reflection is performed once and not every time a notification is received about a property. In other refinements, an empty string can be passed in as an argument to signal that all bindings for each data value of the data item should be updated. This can be done if the source object is not sure which properties have changed and each binding needs to be updated. When the binding engine receives a notification that the data source value has changed, processing proceeds to decision block 314.

決定ブロック314において、変更されたソースデータバリューに関連付けられているバインディングでバインディングに対するトランスフォームを特定していたかどうかを判別する。バインディングでトランスフォームを特定していない場合には、処理はブロック318に続く。しかし、バインディングでトランスフォームを特定している場合には、処理はブロック316に続く。   At decision block 314, it is determined whether the binding associated with the changed source data value has identified a transform for the binding. If the binding does not specify a transform, processing continues at block 318. However, if the binding specifies a transform, processing continues at block 316.

ブロック316において、バインディングで特定されているトランスフォームが実行される。一実施形態では、トランスフォーマ268は後述のようなオブジェクトである。

Public interface IDataTransformer
{
Public object Transform(object o, DynamicProperty dp, CultureInfo c) {;}
}.
At block 316, the transform specified in the binding is executed. In one embodiment, transformer 268 is an object as described below.

Public interface IDataTransformer
{
Public object Transform (object o, DynamicProperty dp, CultureInfo c) {;}
}.

上記のインターフェースでは、oはソースバリューを表し、dpはターゲットの動的プロパティを表し、cはトランスフォーム時(transfomation)に使用するカルチャー(culture)を表す。Transform()メソッドは、ソースバリューoを型dpの動的プロパティに割り当てるのに適しているオブジェクトにトランスフォームする。Transform()メソッドは、バインディングのソースからターゲットプロパティにデータバリューを伝搬させるとき呼び出される。Transform()メソッドがnullバリューを返した場合、バインディングエンジンに対し、バリューの伝搬を停止することが通知される。   In the above interface, o represents the source value, dp represents the dynamic property of the target, and c represents the culture used for transformation. The Transform () method transforms the source value o into an object suitable for assigning to a dynamic property of type dp. The Transform () method is called when the data value is propagated from the binding source to the target property. When the Transform () method returns a null value, the binding engine is notified that value propagation is to be stopped.

トランスフォーマは、さらに、バインディングで特定された関連ソースデータバリューに基づいて幅、高さ、フォント、位置(x、y)などの他のUIプロパティを制御するために使用されることも可能である。トランスフォーマでは、複数の方法でデータを表示するためデータバリューに対しロジックを実行することができる。他の精密化では、カルチャーは、バインディングで特定されているようにトランスフォーム時に適用されることも可能である。処理は、ブロック318に続く。   The transformer can also be used to control other UI properties such as width, height, font, position (x, y) based on the associated source data value specified in the binding. Transformers can perform logic on data values to display data in multiple ways. In other refinements, the culture can also be applied at the time of transformation as specified in the binding. Processing continues at block 318.

ブロック318において、ターゲットプロパティがアップデートされる。一実施形態では、プロパティエンジンはバリューをターゲットプロパティに割り当てる。さらに、ターゲットプロパティは新しいバリューを持つとマーク付けされることも可能である。その後処理はブロック312に続き、バインディングに関連付けられている次のプロパティ変更通知をリッスンする。アプリケーションが終了するか、またはバインディングが他の何らかの手段により打ち切られると、処理は終わりに進む。   At block 318, the target property is updated. In one embodiment, the property engine assigns a value to the target property. In addition, the target property can be marked as having a new value. Processing then continues to block 312 to listen for the next property change notification associated with the binding. When the application terminates or the binding is aborted by some other means, processing proceeds to the end.

上述のように、処理は、ブロック308から第2のパスへと続くことが可能である。したがって、ブロック308から、処理は決定ブロック330に続く。上述のように、決定ブロック310に関して、バインディングエンジン内のロジックは決定ブロック310でバインドタイプのチェックを必ずしも実行することはできないが、むしろ、バインディングエンジンはバインディングが作成されたときに通知をリッスンするように指示されていたため、プロセスは第2のパス内を流れない。しかし、流れの説明を明確にするために、バインドタイプを反映する決定ブロックが示されている。したがって、決定ブロック330において、バインディングが双方向(twoWay)のバインドタイプとして特定したかどうかの判別が行われる。すでに述べたように、双方向では、ターゲットプロパティの変更をソースデータバリューに伝搬させることができる。バインディングで双方向バインドタイプとして特定していない場合、処理は終わりに進む。しかし、バインディングで双方向バインドタイプとして特定している場合には、処理はブロック332に続く。   As described above, processing can continue from block 308 to a second pass. Thus, from block 308, processing continues to decision block 330. As described above, with respect to decision block 310, the logic in the binding engine cannot necessarily perform a binding type check at decision block 310, but rather the binding engine listens for notifications when a binding is created. The process does not flow in the second pass. However, to clarify the flow description, a decision block reflecting the bind type is shown. Accordingly, at decision block 330, a determination is made whether the binding has been identified as a two-way binding type. As already mentioned, bi-directionally, target property changes can be propagated to the source data value. If the binding is not specified as a bidirectional bind type, processing proceeds to the end. However, if the binding specifies as a bidirectional bind type, processing continues to block 332.

ブロック332において、バインディングエンジンは、ソースデータバリューのアップデートをトリガするいくつかのアクションを認識する。トリガが発生すると、処理は決定ブロック334に続く。   At block 332, the binding engine recognizes several actions that trigger an update of the source data value. When the trigger occurs, processing continues at decision block 334.

決定ブロック334において、バインディングがバインドに対し逆トランスフォームを特定したかどうかの判別が行われる。バインディングで逆トランスフォームを特定していない場合には、処理はブロック338に続く。しかし、バインディングで逆トランスフォームを特定している場合には、処理はブロック336に続く。   At decision block 334, a determination is made as to whether the binding has identified an inverse transform for the binding. If the binding does not specify a reverse transform, processing continues at block 338. However, if the binding identifies a reverse transform, processing continues at block 336.

ブロック336において、逆トランスフォームがソースプロパティに適用される。一実施形態では、逆トランスフォーマは後述のようなオブジェクトである。

Public interface IDataTransformer
{
Public object InverseTransform(object o, PropertyInfo pinfo, CultureInfo c){;}
}.
At block 336, the inverse transform is applied to the source property. In one embodiment, the inverse transformer is an object as described below.

Public interface IDataTransformer
{
Public object InverseTransform (object o, PropertyInfo pinfo, CultureInfo c) {;}
}.

上記のインターフェースでは、oはソースバリューを表し、cはトランスフォーム時に使用するカルチャーを表し、pinfoはターゲットプロパティのPropertyInfoを表す。InverseTransform()メソッドは、ソースバリューoを型infoのプロパティに割り当てるのに適しているオブジェクトにトランスフォームする。このメソッドは、バインディングのターゲットからソースにバリューを伝搬させるとき呼び出される。InverseTransform()メソッドがnullバリューを返した場合、バインディングエンジンはバリューを伝搬しない。InverseTransformが実行されると、処理は決定ブロック338に続く。   In the above interface, o represents the source value, c represents the culture to be used at the time of transformation, and pinfo represents the target property PropertyInfo. The InverseTransform () method transforms the source value o into an object suitable for assigning to a property of type info. This method is called when propagating value from the binding target to the source. If the InverseTransform () method returns a null value, the binding engine does not propagate the value. Once InverseTransform is executed, processing continues to decision block 338.

ブロック338において、アップデートタイプに応じてソースプロパティがアップデートされる。上述のように、アップデートタイプは、即時、フォーカスの喪失、明示的、およびその他をきっかけとしてよい。ソースプロパティがアップデートされた後、処理は終了へ進む。   At block 338, the source property is updated according to the update type. As described above, the update type may be triggered by immediate, loss of focus, explicit, and others. After the source property is updated, the process proceeds to end.

図4は、バインディングを作成するいくつかの例を示している。作成手段(creation means)400〜410では、マークアップを通じてバインディングを作成する。作成手段410では、コードを通じてバインディングを作成する。図4に示されている手段例は網羅的ではない。他の手段(構文)は、本発明の範囲から逸脱することなく、使用されることが可能である。   FIG. 4 shows some examples of creating bindings. In creation means 400-410, the binding is created through markup. The creation unit 410 creates a binding through code. The example means shown in FIG. 4 are not exhaustive. Other means (syntax) can be used without departing from the scope of the present invention.

作成手段400は、エレメント424に対しDataContext名/バリューのペア(これ以降、DataContext 422と呼ぶ)およびId名/バリューのペア(これ以降、Id 420と呼ぶ)を含む。作成手段400はさらに、DataContext 422も含むため、Id 420は不要である。Id 420は、マークアップでElementSourceを使用したり、コード内でIdObjectRegを使用したりするなど、明示的なソースを参照するのが望ましい場合に必要である。これらの両方の用途について後で説明される。DataContext 422は、エレメント(例えば、エレメント424)で定義されている動的プロパティである。DataContext 422に関連付けられているバリューは、デフォルトのソースデータ項目を表し、継承可能なプロパティである。バインディングエンジンは、DataContext 422にクエリを実行し、エレメント424および子孫エレメント(例えば、Buttonエレメント426)のバインディングを作成するときにDataContext 422を使用する。バインディングエンジンは、さらに、DataContext 422の変更についてもリッスンするし、そのトリガによりアップデートを実行する。したがって、必要はないけれども、DataContext 422は共通データ項目にバインドされるすべてのプロパティについてスコープを確立する便利なメカニズムを備える。子孫エレメントは、自DataContextを持つことができ、これは親エレメントのDataContext 422に優先する。バインディングは、作成手段402に関して後述するnullでないソースを供給することにより、DataContext 422をオーバーライドすることができる。   The creation means 400 includes a DataContext name / value pair (hereinafter referred to as a DataContext 422) and an Id name / value pair (hereinafter referred to as an Id 420) for the element 424. Since the creation unit 400 further includes a DataContext 422, the Id 420 is not necessary. Id 420 is necessary when it is desirable to reference an explicit source, such as using ElementSource in markup or using IdObjectReg in code. Both of these applications will be described later. DataContext 422 is a dynamic property defined in an element (eg, element 424). The value associated with DataContext 422 represents the default source data item and is an inheritable property. The binding engine queries DataContext 422 and uses DataContext 422 when creating bindings for element 424 and descendant elements (eg, Button element 426). The binding engine also listens for changes in DataContext 422 and performs an update with that trigger. Thus, although not necessary, DataContext 422 provides a convenient mechanism for establishing a scope for all properties bound to a common data item. A descendant element can have its own DataContext, which overrides the parent element's DataContext 422. The binding can override DataContext 422 by providing a non-null source as described below with respect to creation means 402.

Buttonエレメント426は、ターゲットプロパティで例示されている(例えば、 Button.Text 428)。本発明では、バインディングエンジンは、「Data:Bind」を見つけると、バインディングが特定されていることを認識する。後の名前/バリューのペアは、図2で特定されているように、バインディングプロパティ260〜272を設定する。当業者であれば、バインディングを示す「Data:Bind」という用語は任意の用語であり、本発明を逸脱することなく用語はいくつ使用されていてもかまわない。作成手段400は、詳細マークアップ形式を表す。   Button element 426 is illustrated with a target property (eg Button. Text 428). In the present invention, when the binding engine finds “Data: Bind”, it recognizes that the binding is specified. The latter name / value pairs set binding properties 260-272 as specified in FIG. Those skilled in the art will understand that the term “Data: Bind” indicating binding is an arbitrary term, and any number of terms may be used without departing from the present invention. The creation means 400 represents a detailed markup format.

作成手段402は、コンパクトマークアップ形式を表す。UIプロパティ(例えば、Button Text)は、さらにコンパクトな方式で表される。ここでもまた、「Data:Bind」は、バインディングエンジンに対し後に続くのがバインディングであることを知らせるシグナルとして使用される。さらに、名前/バリューのペアと後に続く「Data:Bind」は、図2でバインディングオブジェクト250についてすでに説明している所望のプロパティ260〜272に対応する。例えば、ElementSource名/バリューのペア(これ以降ElementSource 434と呼ぶ)はソース266に対応している。   The creation unit 402 represents a compact markup format. UI properties (eg Button Text) are represented in a more compact manner. Again, “Data: Bind” is used as a signal to inform the binding engine that what follows is binding. Further, the name / value pair and the following “Data: Bind” correspond to the desired properties 260-272 already described for the binding object 250 in FIG. For example, an ElementSource name / value pair (hereinafter referred to as ElementSource 434) corresponds to the source 266.

マークアップでは、ソースプロパティを設定する方法は、ElementSourceおよびDataSourceの2つがある。これらのいずれも使用されない場合、ソースのデフォルトバリューはnullであり、作成後、エレメントのDataContextプロパティのバリューを取得し、そのバリューをソースオブジェクトとして使用するようバインディングエンジンに通知する。   In markup, there are two methods for setting a source property: ElementSource and DataSource. If none of these are used, the default value of the source is null, and after creation, the value of the DataContext property of the element is obtained and the binding engine is notified to use that value as the source object.

作成手段(例えば、作成手段402)でElementSourceを特定した場合、バインディングエンジンは、ElementSourceプロパティにより特定されているIDを持つエレメントを見つける。その後、エレメントのDataContextisは、ソースオブジェクトとして使用される。/Parent/Parentおよび/Previous/Previousなどの相対パス名は、データソースを特定するために使用されることが可能である。バインディングエンジンは、/Parentを見つけると、オブジェクト階層に関して現在のエレメントの親であるエレメントを探す。例えば、エレメントが顧客注文である場合、/Parentを特定すると、現在の注文に対する顧客に対応するエレメントを探すようにバインディングエンジンに通知することができる。/Parentを特定するのは、内側リピータのスコープ内にある外側リピータからのバリューを使用するのが望ましいネストされているリピータの場合に役立つ。/Previousを特定すると、バインディングエンジンはRepeaterの下にある現在のエレメントの前のエレメントを探す。/Previousを特定するのは、棒グラフなど、現在の項目の他に現在のn項目にアクセスするのが望ましい場合に便利である。連続する/Previousと/Parentは、本発明に従って使用されることが可能である。   When the ElementSource is specified by the creation means (for example, the creation means 402), the binding engine finds an element having the ID specified by the ElementSource property. The element DataContext is then used as the source object. Relative pathnames such as / Parent / Parent and / Previous / Previous can be used to identify the data source. When the binding engine finds / Parent, it looks for the element that is the parent of the current element with respect to the object hierarchy. For example, if the element is a customer order, specifying / Parent can inform the binding engine to look for the element corresponding to the customer for the current order. Specifying / Parent is useful for nested repeaters where it is desirable to use the value from the outer repeater that is within the scope of the inner repeater. When / Previous is specified, the binding engine looks for the element before the current element under Repeater. Specifying / Previous is useful when it is desirable to access the current n items in addition to the current item, such as a bar graph. The sequence / Previous and / Parent can be used according to the present invention.

他の実施形態では、マークアップでDataSourceを特定することができる。DataSourceが特定された場合、バインディングエンジンはResourceのリソースIDを受け入れる。Resourceがデータプロパティを公開する場合、バインディングエンジンは、バインディングのソースを、DataSourceリソースのデータプロパティによって返されるオブジェクトに設定する。そうでない場合、バインディングエンジンはバインディングのソースをリソースオブジェクト自体に設定する。   In other embodiments, the DataSource can be identified in the markup. If the DataSource is specified, the binding engine accepts the Resource ID of the Resource. When the Resource exposes a data property, the binding engine sets the source of the binding to the object returned by the data property of the DataSource resource. Otherwise, the binding engine sets the binding source to the resource object itself.

当業者であれば、マークアップ言語を使用してプロパティ260〜272が表現され、したがって、これは他のプロパティのそれぞれがマークアップ言語を使用して表現されることが可能であることを理解するであろうし、ここで詳細には説明しない。   One skilled in the art will appreciate that the properties 260-272 are expressed using a markup language, and thus this allows each of the other properties to be expressed using a markup language. It will not be described in detail here.

次の3つの作成手段404〜410は、本発明でバインドすることができる項目の種類に関して例を与える。作成手段404は、サブプロパティおよびインデクサへのバインディングのサポートを示している。作成手段404は、di.a.b[3].cのようにC#で書かれているバインディングに対応しており、diは関連するデータ項目である。データ項目、di.aを実施するクラス、di.a.bを実施するクラス、およびdi.a.b[3].cを実施するクラスが本発明の通知メカニズム(例えば、IPropertyChange)をサポートし、プロパティが変更されたときに通知する限り、作成手段404を使用して特定されたバインディングにより、バインディングエンジンは自動的にバインドされているプロパティ(例えば、ターゲットプロパティ)をアップデートし、ソースデータバリューの変更を反映する。   The next three creation means 404-410 give examples regarding the types of items that can be bound in the present invention. The creation means 404 shows support for binding to sub-properties and indexers. The creation means 404 is di. a. b [3]. It corresponds to the binding written in C # like c, and di is a related data item. Data item, di. a class that implements a. a. a class that implements b, and di. a. b [3]. As long as the class that implements c supports the notification mechanism of the present invention (eg, IPropertyChange) and notifies when a property has changed, the binding specified using the creation means 404 will cause the binding engine to automatically Update bound properties (eg, target properties) to reflect changes in the source data value.

作成手段406は、データコレクションへのバインディングのサポートを示している。バインディングエンジンは、自動的に、各レベルでコレクションの現在のレコードを使用する(a、b、およびcは異なるレベルを表す)。例えば、di.aがIDataCollection型であれば、バインディングでは、「b」プロパティをフェッチするためにコレクションの現在のレコードを使用する。したがって、バインディングエンジンは、現在のレコードが変更された場合に必ず、データコレクションに関連付けられているバリューを自動的にアップデートする。   Creation means 406 shows support for binding to a data collection. The binding engine automatically uses the current record of the collection at each level (a, b, and c represent different levels). For example, di. If a is an IDataCollection type, the binding uses the current record of the collection to fetch the “b” property. Thus, the binding engine automatically updates the value associated with the data collection whenever the current record changes.

作成手段408は、XMLノードへのバインディングのサポートを示している。バリューへのパス260は、図4に示されているように、「/Customer/Order[@OrderID=10]/Amount)」などのxpath表現を使用して与えられる。作成手段410は、ADOデータテーブルへのバインディングのサポートを示している。この実施に関しては、バリューへのパス260は、図4に示されているように、「OrderlD」などの特定の行に対するフィールド名として与えられる。   The creation means 408 indicates support for binding to an XML node. The path 260 to the value is given using an xpath expression such as “/ Customer / Order [@ OrderID = 10] / Amount)” as shown in FIG. The creation means 410 shows support for binding to the ADO data table. For this implementation, the path 260 to value is given as the field name for a particular row, such as “OrderD”, as shown in FIG.

作成手段410では、プログラムによりバインディングを作成する。開発者は、バインディングでソースデータ項目として使用しなければならないオブジェクトへのobjectrefを用意する。作成手段412に示されているプログラムのステートメントは、作成手段410により例示されているのと同じ動作でバインディングを作成する。SetBindingメソッドは、プログラマが上述のバインディングプロパティを特定する際に使用できるより精巧な変更形態を多数備える。上の単純な例では、ボタンのDataContextをソースオブジェクトとして使用する。以下のプログラムのステートメントは、特定のオブジェクト(実行時に知られる)をソースとして使用する単方向バインディングを作成する。

Object source = ... 何らかの任意のオブジェクト ...;
Binding.SetBinding(myButton, Element.BackgroundProperty, "Color", BindType.OneWay, new ExplicitObjectRef(source));
The creation unit 410 creates a binding by a program. The developer provides an objectref to the object that must be used as the source data item in the binding. The statement of the program shown in the creation means 412 creates a binding with the same operation as exemplified by the creation means 410. The SetBinding method provides a number of more sophisticated modifications that can be used by programmers to specify the binding properties described above. In the simple example above, the button's DataContext is used as the source object. The following program statement creates a unidirectional binding that uses a specific object (known at runtime) as a source.

Object source = ... any arbitrary object ...;
Binding.SetBinding (myButton, Element.BackgroundProperty, "Color", BindType.OneWay, new ExplicitObjectRef (source));

以下のコード例は、本発明のバインディングメカニズムを介してデータによりユーザインターフェースプロパティを制御するための一実施を示している。この例では、データバリュー(例えば、myInteger)およびUIプロパティ(例えば、TextContent)は、バインディングとしてアクティブ化にされる。さらに、トランスフォーム(例えば、MyTranformer)は、このバインディングに対して特定される。

<Test TextContent="*Data:Bind(Path=myInteger)"
Foreground="*Data:Bind(Path=MyInteger;
Transformer=MyTransformer)"/>

public class MyTransformer:IDataTransformer
{
public object Transform(object o, DynamicProperty dp, CultureInfo culture)
{
if ((int)o <0) return Red;
else return Black;
}
public object InverseTransform(object o, PropertyInfo info, CultureInfo culture)
{
return null;
}
}.
The following code example illustrates one implementation for controlling user interface properties with data via the binding mechanism of the present invention. In this example, the data value (eg, myInteger) and UI property (eg, TextContent) are activated as bindings. In addition, a transform (eg, MyTransformer) is specified for this binding.

<Test TextContent = "* Data: Bind (Path = myInteger)"
Foreground = "* Data: Bind (Path = MyInteger;
Transformer = MyTransformer) "/>

public class MyTransformer: IDataTransformer
{
public object Transform (object o, DynamicProperty dp, CultureInfo culture)
{
if ((int) o <0) return Red;
else return Black;
}
public object InverseTransform (object o, PropertyInfo info, CultureInfo culture)
{
return null;
}
}.

したがって、説明したように、本発明は、ユーザインターフェースおよびロジックのコーディングの変更が分離されるようにソースデータバリューをターゲットプロパティに関連付けるメカニズムを備える。したがって、本発明により、開発者はアプリケーションの基本ロジックを修正することなく、ユーザインターフェースを容易に修正し、機能強化することができる。   Thus, as described, the present invention provides a mechanism for associating source data values with target properties such that user interface and logic coding changes are isolated. Thus, the present invention allows a developer to easily modify and enhance the user interface without modifying the basic logic of the application.

上記の明細、実施例、およびデータにより、本発明の構成の製造および使用に関する説明が完全になされている。本発明の多くの実施形態は、本発明の精神と範囲を逸脱することなく実施できるため、本発明は付属の請求項によって定められる。   The above specification, examples and data provide a complete description of the manufacture and use of the composition of the invention. Since many embodiments of the invention can be made without departing from the spirit and scope of the invention, the invention is defined by the appended claims.

Claims (16)

1つ又は複数のユーザインターフェースプロパティをそれぞれ含むユーザインターフェースエレメントを有するユーザインターフェース部分と、ソースデータバリューを操作するように構成されたロジック部分とを備えるコンピュータ実行可能プログラムを格納したコンピュータ可読記録媒体であって、前記プログラムは、記憶手段を備えるコンピュータに
前記ユーザインターフェース部分のユーザインターフェースプロパティを前記記憶手段に記憶されたソースデータバリューと関係付けるバインディングのバインディングオブジェクトであって、前記ソースデータバリューを特定するための方法を含むパスと、バインディングのタイプを定義するバインディングタイプと、前記ユーザインターフェースプロパティに対するアップデートが発生した時期を特定するアップデートタイプと、前記ソースデータバリューをトランスフォームするための規則を特定するためのカルチャープロパティとを含むバインディングプロパティを有するバインディングオブジェクトを作成するステップと、
前記ソースデータバリューが変更された通知を受けたとき、当該ソースデータバリューに係る前記バインディングオブジェクトに基づいて前記ユーザインターフェースプロパティに前記変更を反映させ、ユーザインタフェースをアップデートするステップと、を実行させ、
前記バインディングタイプは、前記ソースデータバリューを編集不可能な前記ユーザインターフェースプロパティに前記バインディングにより関係付ける場合に使用される「単方向」、又は前記ソースデータバリューを編集可能な前記ユーザインターフェースプロパティに前記バインディングにより関係付ける場合に使用される「双方向」を含み、
前記受ける通知は、前記変更されたソースデータバリューに係る前記バインディングオブジェクトの前記バインディングタイプに基づいていること
を特徴とするコンピュータ可読記録媒体。
A computer-readable recording medium storing a computer-executable program comprising a user interface portion having user interface elements each including one or more user interface properties and a logic portion configured to manipulate source data values. The program is a binding object for binding that associates the user interface property of the user interface part with the source data value stored in the storage means, and specifies the source data value. Updates to the user interface properties, the path that contains the method, the binding type that defines the type of binding, and Creating a binding object having a binding property including an update type that identifies when it occurred and a culture property for identifying rules for transforming the source data value;
When said source data value is notified that have changed, on the basis of the binding object according to the source data value to reflect the changes to the user interface property, it is executed and step you update the user interface, and
The binding type is “unidirectional” used when the source data value is related to the user interface property that cannot be edited by the binding, or the binding to the user interface property that can edit the source data value. Including "bidirectional" used when relating by
The received notification is based on the binding type of the binding object related to the changed source data value.
前記ユーザインターフェースプロパティに前記変更を反映させる前に、前記カルチャープロパティに基づいて前記ソースデータバリューをトランスフォームすることを特徴とする請求項1に記載のコンピュータ可読記録媒体。   The computer-readable recording medium of claim 1, wherein the source data value is transformed based on the culture property before the change is reflected in the user interface property. 前記プログラムは、前記コンピュータに
前記ユーザインターフェースプロパティが変更されたときに、前記ユーザインターフェースプロパティに関連付けられた前記ソースデータバリューを更新するステップを実行させること
を特徴とする請求項1又は請求項2に記載のコンピュータ可読記録媒体。
3. The program according to claim 1, wherein the program causes the computer to execute a step of updating the source data value associated with the user interface property when the user interface property is changed. The computer-readable recording medium as described.
前記ソースデータバリューを更新するステップは、前記ユーザインターフェースプロパティの変更の後に非同期で実行されることを特徴とする請求項3に記載のコンピュータ可読記録媒体。   The computer-readable medium of claim 3, wherein the step of updating the source data value is performed asynchronously after the change of the user interface property. 前記ソースデータバリューを更新するステップは、前記ユーザインターフェースエレメントに対するフォーカスが失われた後に非同期で実行されることを特徴とする請求項3に記載のコンピュータ可読記録媒体。   The computer-readable medium of claim 3, wherein the step of updating the source data value is performed asynchronously after the focus on the user interface element is lost. 前記バインディングは、コードを使用して特定されることを特徴とする請求項1から請求項5のいずれか1つに記載のコンピュータ可読記録媒体。   The computer-readable recording medium according to claim 1, wherein the binding is specified using a code. 前記バインディングは、マークアップ言語を使用して特定されることを特徴とする請求項1から請求項5のいずれか1つに記載のコンピュータ可読記録媒体。   The computer-readable recording medium according to claim 1, wherein the binding is specified using a markup language. 前記ソースデータバリューは、前記記憶手段から、XML上のXPath、ADOのカラム、およびリフレクションのうちの1つを通じて特定されることを特徴とする請求項1から請求項のいずれか1つに記載のコンピュータ可読記録媒体。 The source data value is described from the storage unit, XPath on XML, to any one of claims 1 to 7, characterized in that it is identified through one of the ADO column and Reflection Computer-readable recording medium. 1つ又は複数のユーザインターフェースプロパティをそれぞれ含むユーザインターフェースエレメントを有するユーザインターフェース部分と、
ソースデータバリューを操作するように構成されたロジック部分と、
記憶手段と、
前記ユーザインターフェース部分のユーザインターフェースプロパティを前記記憶手段に記憶されたソースデータバリューと関係付けるバインディングのバインディングオブジェクトであって、前記ソースデータバリューを特定するための方法を含むパスと、バインディングのタイプを定義するバインディングタイプと、前記ユーザインターフェースプロパティに対するアップデートが発生した時期を特定するアップデートタイプと、前記ソースデータバリューをトランスフォームするための規則を特定するためのカルチャープロパティとを含むバインディングプロパティを有するバインディングオブジェクトを作成する手段と、
前記ソースデータバリューが変更された通知を受けたとき、当該ソースデータバリューに係る前記バインディングオブジェクトに基づいて前記ユーザインターフェースプロパティに前記変更を反映させ、ユーザインタフェースをアップデートする手段とを備え、
前記バインディングタイプは、前記ソースデータバリューを編集不可能な前記ユーザインターフェースプロパティに前記バインディングにより関係付ける場合に使用される「単方向」、又は前記ソースデータバリューを編集可能な前記ユーザインターフェースプロパティに前記バインディングにより関係付ける場合に使用される「双方向」を含み、
前記受ける通知は、前記変更されたソースデータバリューに係る前記バインディングオブジェクトの前記バインディングタイプに基づいていること
を特徴とするコンピュータシステム。
A user interface portion having user interface elements each including one or more user interface properties;
A logic part configured to manipulate the source data value;
Storage means;
A binding object of a binding that associates a user interface property of the user interface part with a source data value stored in the storage means, including a path including a method for identifying the source data value, and a type of binding A binding object having a binding property including a binding type, an update type specifying when an update to the user interface property occurs, and a culture property for specifying a rule for transforming the source data value Means to create,
When receiving the notification that the source data value is changed, on the basis of the binding object according to the source data value to reflect the changes to the user interface property, and means you update the user interface,
The binding type is “unidirectional” used when the source data value is related to the user interface property that cannot be edited by the binding, or the binding to the user interface property that can edit the source data value. Including "bidirectional" used when relating by
The received notification is based on the binding type of the binding object related to the changed source data value.
前記ユーザインターフェースプロパティに前記変更を反映させる前に、前記カルチャープロパティに基づいて前記ソースデータバリューをトランスフォームすることを特徴とする請求項に記載のコンピュータシステム。 10. The computer system of claim 9 , wherein the source data value is transformed based on the culture property before reflecting the change to the user interface property. 前記ユーザインターフェースプロパティが変更されたときに、前記ユーザインターフェースプロパティに関連付けられた前記ソースデータバリューを更新する手段を備えることを特徴とする請求項又は請求項10に記載のコンピュータシステム。 The computer system according to claim 9 or 10 , further comprising means for updating the source data value associated with the user interface property when the user interface property is changed. 前記ソースデータバリューを更新する手段は、前記ユーザインターフェースプロパティの変更の後に非同期で実行されることを特徴とする請求項11に記載のコンピュータシステム。 The computer system according to claim 11 , wherein the means for updating the source data value is executed asynchronously after the change of the user interface property. 前記ソースデータバリューを更新する手段は、前記ユーザインターフェースエレメントに対するフォーカスが失われた後に非同期で実行されることを特徴とする請求項11に記載のコンピュータシステム。 The computer system of claim 11 , wherein the means for updating the source data value is performed asynchronously after focus on the user interface element is lost. 前記バインディングは、コードを使用して特定されることを特徴とする請求項から請求項13のいずれか1つに記載のコンピュータシステム。 The binding, the computer system according to any one of claims 13 claim 9, characterized in that it is identified using code. 前記バインディングは、マークアップ言語を使用して特定されることを特徴とする請求項から請求項13のいずれか1つに記載のコンピュータシステム。 The computer system according to any one of claims 9 to 13 , wherein the binding is specified using a markup language. 前記ソースデータバリューは、前記記憶手段から、XML上のXPath、ADOの列、およびリフレクションのうちの1つを通じて特定されることを特徴とする請求項から請求項15のいずれか1つに記載のコンピュータシステム。 The source data value is described from the storage unit, in any one of claims 15 claim 9, characterized in that the specified XPath on XML, through one of the ADO column and Reflection Computer system.
JP2009032012A 2003-05-17 2009-02-13 Recording medium and system storing program for controlling user interface property by data Expired - Fee Related JP5010625B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009032012A JP5010625B2 (en) 2003-05-17 2009-02-13 Recording medium and system storing program for controlling user interface property by data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
PCT/US2003/015708 WO2004107200A1 (en) 2003-05-17 2003-05-17 System and method for controlling user interface properties with data
JP2009032012A JP5010625B2 (en) 2003-05-17 2009-02-13 Recording medium and system storing program for controlling user interface property by data

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2005500405A Division JP2006526192A (en) 2003-05-17 2003-05-17 System and method for controlling user interface properties with data

Publications (2)

Publication Number Publication Date
JP2009151810A JP2009151810A (en) 2009-07-09
JP5010625B2 true JP5010625B2 (en) 2012-08-29

Family

ID=56291106

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009032012A Expired - Fee Related JP5010625B2 (en) 2003-05-17 2009-02-13 Recording medium and system storing program for controlling user interface property by data

Country Status (1)

Country Link
JP (1) JP5010625B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12394191B2 (en) * 2021-07-14 2025-08-19 Google Llc Neural networks based multimodal transformer for multi-task user interface modeling

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11191062A (en) * 1997-12-26 1999-07-13 Hitachi Ltd Application screen development support system
WO2000057271A1 (en) * 1999-03-24 2000-09-28 Fujitsu Limited Apparatus for assisting in writing graphical user interface program, and write-assisting method, and recording medium on which write-assisting program is recorded
JP3506087B2 (en) * 2000-01-25 2004-03-15 日本電気株式会社 Style and data structure simultaneous creation device

Also Published As

Publication number Publication date
JP2009151810A (en) 2009-07-09

Similar Documents

Publication Publication Date Title
US7519969B2 (en) System and method for controlling user interface properties with data
KR101331260B1 (en) Metadata driven user interface
US8799857B2 (en) XML application framework
US8793649B2 (en) XML application framework
JP5882829B2 (en) Programmability for binding data
US9483257B2 (en) Universal and adaptive software development platform for data-driven applications
US7577938B2 (en) Data association
US20050188350A1 (en) Data binding
US20090077091A1 (en) System for development and hosting of network applications
AU2004208330A2 (en) XML types in Java
JP2006526192A (en) System and method for controlling user interface properties with data
US7506341B2 (en) System and method for controlling user interface properties with data
US7212212B2 (en) Context attribute determination
JP5010625B2 (en) Recording medium and system storing program for controlling user interface property by data
WO2025145849A1 (en) Application program processing method and apparatus, computer device and storage medium
RU2358307C2 (en) System and method of controlling user interface properties using data
KR20060059335A (en) System and method for controlling user interface attributes in accordance with data
ZA200405128B (en) System and method for controlling use interface properties with data.
Hashimi et al. Using Resources, Content Providers, and Intents
Pulakhandam et al. ODP. NET Developers Guide: Oracle Database 10g Development with Visual Studio 2005 and the Oracle Data Provider for. NET
Horspool et al. The Scripting Language

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120502

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120525

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120601

R150 Certificate of patent or registration of utility model

Ref document number: 5010625

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150608

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees