The Cover PagesThe OASIS Cover Pages: The Online Resource for Markup Language Technologies
Advanced Search
Site Map
CP RSS Channel
Contact Us
Sponsoring CP
About Our Sponsors

Cover Stories
Articles & Papers
Press Releases

XML Query

XML Applications
General Apps
Government Apps
Academic Apps

Technology and Society
Tech Topics
Related Standards
Last modified: March 16, 1999
Bean Markup Language (BML)

The Bean Markup Language (BML) was released by the IBM alphaWorks lab in conjunction with several other XML tools and technologies at the XML '98 Conference, November 1998. BML and the other software tools were distributed on CDROM, and are available for download as well. Written in Java for all Java platforms, BML is "an XML-based component configuration or wiring language customized for the JavaBean component model. The language is designed to be directly executable; i.e., processing a BML script will result in a running application configured as described in the script. The BML language can be used to create new beans, access, and configure beans by setting/getting their properties and fields, bind events from some beans to other beans, and call arbitrary methods in beans."

The developers of the Bean Markup Language have provided two implementations of BML: "the first is an interpreter that 'plays' a BML script to create the desired bean hierarchy (which is then a running application). This is implemented using reflection and is very small approximately a 35K jar file (without class compression). The second implementation is a compiler that compiles any BML script into reflection-free Java code. The advantage of this is that it allows one to capture the inter-component structure of the application using a first-class language designed for that purpose and yet be able to compile it into 'regular' Java code with basically no performance loss."

"The motivation for BML came from wanting to use XSL to generate Java user interfaces from some XML content. [The designers] needed a way to describe the beans they wanted to create to form the UI, and BML was born. BML has now evolved to being a wiring language to wire together totally arbitrary beans, not just visual components. There are no assumptions made about the nature of the beans in any way. Application generation via XSL still remains as a major use of BML. This allows one to generate (from a server say) a Java application instead of an HTML application in response to a query against the server for some XML content."

Sanjiva Weerawarana [creator and architect of BML,] wrote on November 27, 1998: "['Q: Does someone is using XSL (or something else) for automaticaly generating a Graphical User Interface (in Java AWT/SWING) from an XML document?'] - A: I am using XSL in that way and have developed a tool that you can use to do it. I use XSL to generate an XML description of the set of UI components (beans, in general) that I want to create and configure to be the UI. The XML I generate is Bean Markup Language (BML) . . . BML allows you to describe a set of beans that you want to create and configure and also comes with a small (35k jar file) 'player' that 'plays' BML documents to create the actual running UI. It also comes with a compiler that'll compile the BML document to reflection-free Java code (the player has to rely on reflection to interpret the document). . . You can take any XML and render it by translating it to an appropriate BML document - just like how you can take any XML and render it by translating it to an appropriate HTML document. Yes, in some sense its an alternative renderer; if you want to consider creating a UI as rendering. Its not a total alternative though; by using the Java Plug-In from Sun you can embed the player in both the browsers and play arbitrary BML files. In other words, you can 'render' to Java just as easily as you can render to HTML - in one case you use HTML components, in the other Java components. BML doesn't support scripting yet, but we're working on it; then DBML will allow you to use say JavaScript scripts to define event handlers etc."

Contributors to BML include Sanjiva Weerawarana, Matthew J. Duftler, Francisco Curbera, Joseph Kesselman, Richard F. Boehme, Rania Khalaf, and David A. Epstein.


Hosted By
OASIS - Organization for the Advancement of Structured Information Standards

Sponsored By

IBM Corporation
ISIS Papyrus
Microsoft Corporation
Oracle Corporation


XML Daily Newslink
Receive daily news updates from Managing Editor, Robin Cover.

 Newsletter Subscription
 Newsletter Archives
Globe Image

Document URI:  —  Legal stuff
Robin Cover, Editor: