260 likes | 382 Views
XCompose : An XML-based Component Composition Framework. Naiyana Tansalarak and Kajal T. Claypool University of Massachusetts, Lowell July 22 nd , 2003 In Workshop on Composition Languages (WCL) 2003 (conjunction with ECOOP 2003) Darmstadt, Germany. Introduction.
E N D
XCompose:An XML-based Component Composition Framework Naiyana Tansalarak and Kajal T. ClaypoolUniversity of Massachusetts, Lowell July 22nd, 2003 In Workshop on Composition Languages (WCL) 2003 (conjunction with ECOOP 2003) Darmstadt, Germany
Introduction Component-based Software Systems • pre-fabricated components • composition framework Advantages: • on-time development • higher quality • higher reliability
Flexible- plug-and-play Re-usable - make compositions available to all users Correct - provide system-level guarantees Portable-enable composition across component models Goal of Composition Framework New requirement Asset Specification New technology Extensible - tailor existing compositions
Outline • Previous Work • Our Approach • Discussion
Piccola BML/CoML Flexibility Extensibility Reusability Correctness Portability Previous Work • Piccola application = components + script • Bean Markup Language (BML) • Component Markup Language (CoML) XCompose
Hypothesis Complex Component Composition can be broken down into a sequence of a primitive composition operators glued together by a simple language
Paradigm Components Application = + Composition Language Operators Composition Language = + Glue Logic
Composition Operators Composition Templates Composition Contracts XDescriptors XCompose Basics Goals Ingredients New requirement Asset Specification New technology Flexibility Extensibility Reusability Correctness Portability Composition Patterns www.cs.uml.edu/~ntansala
Composition Operators Composition Templates Composition Contracts XDescriptors XCompose Basics Goals Ingredients New requirement Asset Specification New technology Flexibility Extensibility Reusability Correctness Portability Composition Patterns www.cs.uml.edu/~ntansala
Primitive Operators Primitive Composition Operators • Conjunction mi mj • Sequence mi; mj • Choice miV mj • Pipe mi| mj • Loop mi* V • Primitive Manipulation Operators: • addAttribute • addMethod • invokeMethod • addComponent
Complex Operators Complex Composition Operators • Connection-oriented Composition • addConnection • Aggregation-based Composition • addToContainer • Complex Manipulation Operators • configureProperty • addListener • addEvent • linkEvent
Composition Operators Composition Templates Composition Contracts XDescriptors XCompose Basics Goals Ingredients New requirement Asset Specification New technology Flexibility Extensibility Reusability Correctness Portability Composition Patterns www.cs.uml.edu/~ntansala
Composition Pattern A sequence of composition operators glued together by a simple language
ListMultiselector event(ListMultiselector) = event (GUIList) U event (Multiselector) Example : Composition Pattern ListMultiselector { addComponent(“java.awt.List”, “list”); addComponent (“java.awt.Multiselector”, “selector”); addToContainer(“list”, “selector”); linkEvent(“paint”, “list.paint”); linkEvent(“select”, “selector.select”); linkEvent(“deselect”, “selector.deselect”); linkEvent(“close”, “selector.close; list.close”); }
ListMultiselector FrameList event(ListMultiselector) = event (GUIList) U event (Multiselector) event(FrameList) = event (JFrame) U event (GUIList) Common Composition Pattern
Composition Operators Composition Templates Composition Contracts XDescriptors XCompose Basics Goals Ingredients New requirement Asset Specification New technology Flexibility Extensibility Reusability Correctness Portability Composition Patterns www.cs.uml.edu/~ntansala
Composition Pattern Template The parameterized and generalized composition patterns.
Example: Composition Template MergeMasterClient (master, client) { addComponent (“$master”, “container”); addComponent (“$client”, “part”); addToContainer (“container”, “part”); let $tmp = event (“container”) ∩ event(“part”) forall $eЄ event(“container”) and $e $tmp linkEvent (“$e”, “container.$e”); forall $eЄ event(“part”) and $e $tmp linkEvent (“$e”, “part.$e”); forall $eЄ $tmp linkEvent (“$e”, “part.$e; container.$e”); } ListMultiselector { addComponent (“java.awt.List”, “list”); addComponent (“java.awt.Multiselector”, “selector”); addToContainer (“list”, “selector”); linkEvent (“paint”, “list.paint”); linkEvent (“select”, “selector.select”); linkEvent (“deselect”, “selector.deselect”); linkEvent (“close”, “selector.close; list.close”); }
ListMultiselector GUIList, MultiSelector FrameList JFrame, GUIList Instantiation MergeMasterClient ($master, $client)
Composition Operators Composition Templates Composition Contracts XDescriptors XCompose Basics Goals Ingredients New requirement Asset Specification New technology Flexibility Extensibility Reusability Correctness Portability Composition Patterns www.cs.uml.edu/~ntansala
XDescriptor <class name=“GUIList”> <properties> </properties> <events> <event name=“”paint” refer=“”/> <event name=“”close” refer=“”/> </events> <methods> </methods> <composition> </composition> </class>
XDescriptor <class name=“ListMultiselector”> <properties> </properties> <events> <event name=“”paint” refer=“list”/> <event name=“”select” refer=“selector”/> <event name=“”deselect” refer=“selector”/> <event name=“”close” refer=“selector;list”/> </events> <methods> </methods> <composition> <component name=“java.awt.List” id=“list”/> <add id=“selector”/> </component> <component name=“java.awt.Multiselector” id=“selector”/> </composition> </class>
JavaBeans CORBA COM XDescriptor Library System Architecture XCompose Engine XDescriptor XDescriptor Wrapper GUIList XDescriptor Deployment Engine GUIList
Discussion ? • What is the complete set of operators and their semantics to provide flexibility and extensibility ? • What extensions are needed to make XCompose platform and component model independent ? • Is XML the right model? • What are the tradeoffs to achieve the five goals ? • Are the five goals sufficient ? Are there any other goals that need to be supported here ?