160 likes | 336 Views
I Declare! Declarative UI for Eclipse. Bernd Kolb (SAP) Benjamin Pasero (IBM Rational) Yves Yang (Soyatec). Agenda. Declarative UI for Eclipse Introduction to the topic Demo of our prototype XWT - Declarative UI Designed for Eclipse Discussion Goal: Initiate the discussion in this area.
E N D
I Declare!Declarative UI for Eclipse Bernd Kolb (SAP) Benjamin Pasero (IBM Rational) Yves Yang (Soyatec)
Agenda • Declarative UI for Eclipse • Introduction to the topic • Demo of our prototype • XWT - Declarative UI Designed for Eclipse • Discussion Goal: Initiate the discussion in this area
Difficulties in UI development today • High technology pre-requisite as UI developer • Poor reusability – Boilerplate Code • Limited Dynamic UI • Difficult integration with developer tools • Visual Editor • Modeling Tools
Be Language and Widget Neutral • Execution • Generate code in target language (Compiler) • Or let an engine instantiate widgets (Interpreter) • Generate to various target widget toolkits • Raise Level of Abstraction • Enables better validation at compile time • Enables higher level concepts (e.g. Widget Library) • Reduce complexity of implementations
Simple Expressions • Ensure clear structure • Logical nesting of widgets • Can be different than physical nesting • e.g. SWT TabFolder and TabItem
1st Class Tooling • Tooling operates on description, not widgets • Higher level description allows higher level authoring • Different Roles = Different Tools • Visual Designer • Business Developer • Toolkit Expert
Separation of UI and Business • Roles involved • A Visual Designer with expertise in design • A Business Logic Expert for a specific domain • A Toolkit Expert with expertise in Toolkits involved • Often gap between domains • A software developer having a hard time implementing what the UI designer dreams of • Close the gap with common languages (DSL)
What is a DSL? • Domain Specific Language • Graphical • Textual • Form-based • XML is not well suited • It’s a persistence format but hard to edit • Must be “natural” to its user • Defines the vocabulary of the domain
Clearer Relationship to Data Model • Do not stop at the UI Level! • Establish clear relationship to the data model • Declarative Data Binding • Declarative Action Handling • Declarative Validation • Some might need escape to target language • See prototype demo later
Higher Level Expression • Support Components • Group widgets and state • e.g. Form field • Label • Input Field • Layout • Decoration (Validation) • Binding • Enhanced reusability
Higher Level Reasoning • Different levels of models • Matches exactly with SWT • Higher level abstraction of composites, elements • Semantic level description of UI requirements • Transformations • Create more concrete models from abstract ones
Benefit from existing solutions • Target Languages: Java, C++, HTML, ... • UI Technologies: SWT, Swing, Flex, Silverlight, ... • UI Frameworks: JFace, UFaceKit, JGoodies, ... • Data Binding: JFace, … • Styling: CSS, Model-To-Model Transformation, ... • Domain Models: EMF, POJO, ...
Work ongoing at Eclipse • E4 (http://wiki.eclipse.org/E4) • CSS Styles • Modelled Workbench • XWT (http://wiki.eclipse.org/E4/XWT) • PMF (http://www.eclipse.org/proposals/pmf/) • UFaceKit (http://wiki.eclipse.org/Incubator/Platform/UFacekit) • …
Demo • Prototype • Done in ~3 days • EMF (Domain Model) • SWT • XText (Textual DSL) • JFace Databinding • http://code.google.com/p/eclipsecon2009dui/