coml component markup language - iowa state...

14
CoML Component Markup Language Birngruber Dietrich System Software Group Johannes Kepler University of Linz Austria / Europe

Upload: dohanh

Post on 02-Dec-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

CoMLComponent Markup Language

Birngruber Dietrich

System Software Group Johannes Kepler University of Linz

Austria / Europe

Birngruber, System Software Group, Univ. Linz

Story of Beana and Applicato

• Beana is a Software Engineer– she develops software components (e.g.: JavaBeans)

components

documentationBeanadevelops whicharepackaged

fordelivery

Birngruber, System Software Group, Univ. Linz

Story of Beana and Applicato (2)

• Applicato is an Application Assembler – he wires prefabricated components to a new application

Applicatobuysthecomponents,addsthem tohiscomponentrepositoryandwiresthem toanew application.

New App

File Edit Help

Birngruber, System Software Group, Univ. Linz

Applicato‘s & Beana‘s Problems

• He does not like to read manuals– interfaces „must“ be self describing

• He wires nearly the same components „nearly“ the same way again and again– Uses “composition patterns”

• He wants to apply composition patterns automatically

• She spends a lot of time at the support line

Birngruber, System Software Group, Univ. Linz

Solutions

• Currently: Beana provides sample code

• New: CoPL + CoML Generator

Generator Tools(IDE)

CoPLPlan

XM L Descriptione.g.:CoM L

binaryfiles

<coml><meta/><comps><..../>

</comps></coml>

plan P1{spot x ={ .... }

}

001010010110100100110100101111110011

Title XTitle XTitle X

CompositionProcess„dynamic“designvia„DecisionSpots“

„static/fixed“design,butstillabstract

„concrete“executablecode

Birngruber, System Software Group, Univ. Linz

Example

• JavaBeans platform

• wiring of TableModel, JTable, JButton and acontainer JPanel

JPanel

R efresh

TableM odel

JTable

1 2

3

4

Birngruber, System Software Group, Univ. Linz

<coml name=“JTableView”><meta>

<info type=“java” version=“1.2”/></meta>

<components><component id=“tableModel”interface=“javax.swing.table.TableModel”class=“myFileAccess.TableModel”/>

<component id=“tableView”class=“javax.swing.JTable”>

<property name=“autoCreateColumnsFromModel”access=“set”>

<bool>true</bool></property><property name=“model” access=“set”>

<component idRef=“tableModel”/></property>/

CoML Code

1

2

Birngruber, System Software Group, Univ. Linz

CoML Code

<component id=“refreshBtn” class=“javax.swing.JButton”> <property name=“model” access=“set”><string>Refresh</string>

</property><on-event name=“action” filter=“actionPerformed”><call-method name=“repaint” idRef=“tableView”/>

</on-event></component><component id=“container” class=“javax.swing.JPanel”><add> <component idRef=“jScrollPane1”/><int>0</int>

</add><add><component idRef=“refreshBtn”/> <int>1</int>

</add></component>

</components></coml>

3

4

Birngruber, System Software Group, Univ. Linz

Requirements & Design Issues

• Platform independence

• Minimize the need for new tools

• Reduced learning process

• Recursive component construction

• Component framework

• XML

• Binary component– access via interfaces (only)– strongly typed– Events as main composition

technique– properties, methods– Design-Time vs. Run-Time

• Aggregation frameworks– Different containers require

different interfaces– hierarchical

Birngruber, System Software Group, Univ. Linz

Requirements & Design Issues (2)

• Extensibility & Versioning

• Connection and aggregation based composition

• Composition code reuse

• Interchangeable composition description– like resource scripts

• Meta information

• XML elements:<on-event>, <add>

• Still missing – Perhaps text replacement

• What about execution environments?– simple Java + .NET

interpreters

Birngruber, System Software Group, Univ. Linz

CoML Elements

several elements for primitive datatypesprimitive DT

aggregation-based compositionaddconnection-based compositionon-eventcalls a methodmethod-call

sets or gets a property of a specific component

propertydeclares a componentcomponent

list of composed components; contains <component ...> elements

componentscontains the meta informationmetaroot elementcoml

Birngruber, System Software Group, Univ. Linz

There are other XML based scripting languages

• Bean Markup Language (BML) from IBM– goal: XML based component composition language– Java Bean oriented (syntax & behaviour)– no meta information (no versioning, etc.)– byte code compiler or interpreter

• Java Beans Persistence from Sun Microsystem– goal: tool independent format for GUI composition– Java Bean oriented– No abstractions for events and aggregation;

no meta information– API for reading/writing object graphs

Birngruber, System Software Group, Univ. Linz

Conclusions

• CoML is an interchangeable composition description– CoML is component platform independent– <meta> tags for providing additional information– Java and .NET interpreters are available

• TODO:– error handling– formal parameter (in, out)– arrays– composition code reuse– tools, tools, tools

Birngruber, System Software Group, Univ. Linz

Questions & Contact

http://www.ssw.uni-linz.ac.at

[email protected]