CoML Component Markup Language Birngruber Dietrich System Software - - PowerPoint PPT Presentation
CoML Component Markup Language Birngruber Dietrich System Software - - PowerPoint PPT Presentation
CoML Component Markup Language Birngruber Dietrich System Software Group Johannes Kepler University of Linz Austria / Europe Story of Beana and Applicato Beana is a Software Engineer she develops software components (e.g.: JavaBeans)
Birngruber, System Software Group, Univ. Linz
Story of Beana and Applicato
- Beana is a Software Engineer
– she develops software components (e.g.: JavaBeans)
c
- m pone
nt s doc um e nt a t i
- n
Be a nade ve l
- ps
whi c h a r epa c ka ge d f
- rde
l i ve r y
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
Appl i c a t
- buyst
hec
- m pone
nt s ,a ddst he m t
- hi
sc
- m pone
nt r e pos i t
- r
y a nd wi r e st he m t
- ane
w a ppl i c a t i
- n.
New App Fi l e Edi t Hel p
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
Gener at
- r
Tool s ( I DE) CoPL Pl an XM L Descr i pt i
- n
e. g. :CoM L bi nar y f i l es
<coml> <meta/> <comps> <..../> </comps> </coml> plan P1 { spot x = { .... } } 001010010 110100100 110100101 111110011
Ti t l e X Ti t l e X Ti t l e X
Com pos i t i
- nPr
- c
e s s
„ dyna m i c “ de s i gnvi a „ De c i s i
- n
Spot s “ „ s t a t i c / f i xe d“ de s i gn,but s t i l la bs t r a c t „ c
- nc
r e t e “ e xe c ut a bl e c
- de
Birngruber, System Software Group, Univ. Linz
Example
- JavaBeans platform
- wiring of TableModel, JTable, JButton and a
container JPanel
JPanel
R ef r esh
Tabl eM odel JTabl e
1 2 3 4
Birngruber, System Software Group, Univ. Linz
< com l n am e= “ J Tab leView ” > < m eta> < in fo typ e= “ java” version = “ 1 .2 ” /> < /m eta> < com p on en ts> < com p on en t id = “ tab leM od el” in terface= “ javax .sw in g .tab le.Tab leM od el” class= “ m yFileA ccess.Tab leM od el” /> < com p on en t id = “ tab leView ” class= “ javax .sw in g .J Tab le” > < p rop erty n am e= “ au toCreateColu m n sFrom M od el” access= “ set” > < b ool> tru e< /b ool> < /p rop erty> < p rop erty n am e= “ m od el” access= “ set” > < com p on en t id Ref= “ tab leM od el” /> < /p rop erty> /
CoML Code
1 2
Birngruber, System Software Group, Univ. Linz
CoML Code
< com p on en t id = “ refresh Btn ” class= “ javax .sw in g .J Bu tton ” > < p rop erty n am e= “ m od el” access= “ set” > < strin g > Refresh < /strin g > < /p rop erty> < on -even t n am e= “ action ” filter= “ action Perform ed ” > < call-m eth od n am e= “ rep ain t” id Ref= “ tab leView ” /> < /on -even t> < /com p on en t> < com p on en t id = “ con tain er” class= “ javax .sw in g .J Pan el” > < ad d > < com p on en t id Ref= “ jScrollPan e1 ” /> < in t> 0 < /in t> < /ad d > < ad d > < com p on en t id Ref= “ refresh B tn ” /> < in t> 1 < /in t> < /ad d > < /com p on en t> < /com p on en ts> < /com l>
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 datatypes primitive DT aggregation-based composition
add
connection-based composition
- n-event
calls a method
method-call
sets or gets a property of a specific component
property
declares a component
component
list of composed components; contains < component ...> elements
components
contains the meta information
meta
root element
coml
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