使用者介面標記式語言

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書

使用者介面標記式語言user interface markup language)是一類彩現和描繪圖形化使用者介面控制項標記式語言。此類標記式語言很多都是XML的方言,並且依賴於已經存在的手稿語言引擎(通常為JavaScript引擎)來彩現控制項和額外的指令碼。

使用者介面標記式語言的概念主要基於使用者介面的設計,避免使用者介面設計、開發和功能上的「重造輪子」,諸如重新編寫、發明整個使用者介面。典型的使用者介面標記式語言以標記形式固化經常重用的程式或指令碼代碼,使其更容易以可理解的語言來設計使用者介面,而不是專注於具體的功能。

使用者介面標記式語言如大多數標記和程式語言一樣,依賴著子應用程式執行時來將標記代碼解釋和呈現為可以處理和植入所需形式的程式碼。在基於XML的使用者介面標記式語言中,則傾向於依賴網路瀏覽器排版引擎作為執行時,大多數代碼被重新解釋為JavaScript交給排版引擎。這意味著JavaScript可以用於將使用者介面標記式語言擴充到未被排版引擎當前功能所覆蓋的範圍。

使用者介面標記式語言[編輯]

XFD[編輯]

XFD,表示XML Form Definition,是支撐STARLIMS英語STARLIMS產品 (http://www.starlims.com頁面存檔備份,存於網際網路檔案館)) 的使用者介面標記式語言,由Abbott Informatics開發。STARLIMS產品具有執行時和設計時工具的整套生態系統,使用XFD語言執行和建立視覺化表單。STARLIMS v10 is powered by an XFD runtime developed using Microsoft .NET Framework and hosted in Internet Explorer browser. STARLIMS v11 introduces an additional XFD engine based on a server-side transformation engine that transforms the XFD into HTML5 compatible data designed to run on any HTML5 compliant browser. XFD is programmable in JavaScript based language.

QML[編輯]

QML是一種跨平台標記式語言,用於為行動裝置和桌面裝置建立有硬體加速OpenGL驅動的使用者介面。QML介面使用JavaScript語言操縱。QML是Qt Project英語Qt Project的一部分,,最初由諾基亞擁有,現在由Digia擁有。

MXML[編輯]

MXML是基於XML的使用者介面標記式語言,由是Macromedia於2004年3月推出。它目前是開放原始碼 (http://opensource.adobe.com頁面存檔備份,存於網際網路檔案館)) Apache Flex SDK第四版的一部分。MXML檔案通過Flex SDK編譯成Flash Swf,在網路瀏覽器上通過Adobe Flash呈現,或者通過開源的Adobe AIR SDK作為獨立的跨平台應用程式。

UIML[編輯]

UIML英語UIML是使用者介面標記式語言的最早開拓者。[來源請求]它是一個開源標準,其實現不局限於單一供應商。

XUL[編輯]

Mozilla基金會產品主要使用的介面語言是XUL。XUL文件由Gecko引擎呈現,並也呈現XHTMLSVG文件。它與許多現有標準和技術相結合,包括CSSJavaScriptDTDRDF

UsiXML[編輯]

UsiXML英語UsiXML (which stands for User Interface Extensible Markup Language) is a XML-compliant markup language that describes the UI for multiple contexts of use such as Character User Interfaces (CUIs), Graphical User Interfaces (GUIs), Auditory User Interfaces, and Multimodal User Interfaces. In other words, interactive applications with different types of interaction techniques, modalities of use, and computing platforms can be described in a way that preserves the design independently from peculiar characteristics of physical computing platform.

WTKX[編輯]

WTKX是一種基於XML的標記式語言,用於構建Apache Pivot英語Apache Pivot應用程式。。儘管它最常用於定義應用程式使用者介面的結構,它也可以用來聲明性地構造任何類型的Java對象階層。

XAL[編輯]

eXtensible應用程式語言是Nexaweb's英語Nexaweb Enterprise Web 2.0套件的標記式語言。開發人員可以使用這種語言來定義將作為Java客戶端或AJAX客戶端執行的應用程式。

SVG[編輯]

可縮放向量圖形(SVG)是一種用於圖像的標記式語言,由W3C提議,可為Web和行動應用程式支援豐富圖形。雖然SVG不是使用者介面語言,但它包括向量/光柵圖形、動畫、與DOM和CSS互動、嵌入式媒體、事件以及可指令碼化的支援。如果組合使用這些功能,有可能製作出豐富的使用者介面。

SVG也可以疊加在另一個XML相容的使用者介面標記式語言上(如XULXForms),作為使用者介面的富圖形部分。

TUIX[編輯]

TUIX英語TUIX是一個基於XML的標記式語言,用於定義Tribiq英語Tribiq CMS的使用者介面。開發人員可以定義介面的外觀及其相互作用。不同外掛程式的TUIX檔案在彩現之前被合併,便於修改現有介面和添加新功能。

XAML[編輯]

XAML是微軟.NET框架3.0及更高版本的建構使用者介面組件的一種標記系統。它的範圍比大多數使用者介面標記式語言更有抱負,其程式邏輯和風格也被嵌入到了XAML文件。在功能上,它可以被看作是XUL、SVG、CSS和JavaScript被組合到一種XML模式。

有些人[誰?]批評這個設計,因為許多標準(例如上文列出的標準)已經在做這些事。但是,預計將會開發一個視覺化工具,開發人員甚至不需要了解底層標記。

I3ML[編輯]

I3ML英語I3ML is a proprietary thin client Application Delivery mechanism developed by CoKinetic Systems Corp頁面存檔備份,存於網際網路檔案館), with client support provided by a browser plugin that will render windows-like applications over an HTTP infrastructure with minimal bandwidth needs.

OpenLaszlo (LZX)[編輯]

OpenLaszlo英語OpenLaszlo is a runtime environment that comprises a runtime environment and an interface definition language (Laszlo XML - LZX). LZX is a declarative user interface language which defines the widgets, application layout and scripting elements (using JavaScript) to create your application. LZX is runtime agnostic with the currently supported runtime being within Macromedia/Adobe Flash. An experimental runtime called Laszlo "Legals" that will allow OpenLaszlo (LZX) applications run in multiple runtime environments, such as DHTML/AJAX.

HMVCUL[編輯]

分層模型視圖控制器使用者介面語言英語Hierarchical Model View Controller User Interface LanguageHMVCUL)是一種XML標記使用者介面語言,其支援建立和連結用於構建HMVC GUI應用程式的原子MVC三元組件。The associated runtime provides methods which enable configuration of properties, data binding and events of each of the MVC triad elements (widget, controller, model). The runtime accomplishes this by mapping XML elements defined in an HMVCUL file to objects inside the framework, attributes to properties or to events. Chaining is accomplished by following the tree structure described inside the HMVCUL file.

WasabiXML[編輯]

WasabiXML是一種XML標記式語言,用於定義Wasabi英語Wasabi (software)驅動的應用程式的圖形介面。它最常見的用途是為Winamp製作Winamp外觀。WasabiXML由Nullsoft為Winamp開發,但也可使用Wasabi SDK用於其他應用程式。

WasabiXML中的根元素是<WasabiXML>(對於Winamp外觀來說,它是<WinampAbstractionLayer>。)<skininfo>元素顯示外觀的資訊。圖形介面依託<container>元素和,基礎可見的GUI元素為<layout>。下面是一個簡單的例子,展示有一個按鈕元素的圖形化使用者介面

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<WinampAbstractionLayer version="1.2">
  <skininfo>
    <version>1</version>
    <name>mySkin</name>
    <comment>Ooo Lala</comment>
    <author>Some Person</author>
    <email>info@example.org</email>
    <homepage>http://www.example.org</homepage>
  </skininfo>
  <include file="xml/color-sys.xml"/> <!-- Include a file -->
  <container id="normal">
    <layout id="normal" desktopalpha="true">
      <button
        x="0" y="0"
        id="button.normal"
        image="mybutton.image"
        hoverimage="mybutton.himage"
        downimage="mybutton.dimage"
      />
    </layout>
  </container>
</WinampAbstractionLayer>

WasabiXML支援許多GUI元素,包括:

  • <button>
  • <text>
  • <vis>
  • <eqvis>
  • <layer>
  • <animatedlayer>
  • <groupdef>,與<group>配合使用

<groupdef> allows the developer to define a group of GUI objects which can be re-used anywhere in the skin. Wasabi also supports XUI's which are nothing but <groups> powered by a MAKI script allowing developers to create GUI components (widgets) of their own adding to modularity.

WasabiXML有一個XML名字空間「Wasabi::」定義了常見的GUI,而不需聲明它們的圖像路徑。

MARIA[編輯]

MARIA英語MARIA XML是一種通用、宣告式、多抽象層、基於XML的語言,用於普適環境中建模英語User Interface Modeling的互動式應用程式。

FXML[編輯]

FXML英語FXML是一種基於XML的語言,用於定義JavaFX應用程式的使用者介面。

其他[編輯]

現有框架中的其他標記式語言有:

蘋果公司的Interface Builder .xib格式

其中一些被編譯為二進位形式。

航空電子領域中,ARINC 661英語ARINC 661標準規定了一個定義玻璃駕駛艙中使用者介面的二進位格式。

Borland VCL窗格(.dfm和.lfm)是描繪DelphiLazarus應用程式的窗口的文字檔案。它們在最終的可執行檔中被編譯為二進位形成,並使用RTTI來操縱。

參見[編輯]

參考資料[編輯]