Download - Component Development for the Component Description Framework (CDF) Training Dr.-Ing. Ulrich Dinger
Component Developmentfor the
Component Description Framework (CDF)
Training
Dr.-Ing. Ulrich Dinger
Bildung ist die Fähigkeit, fast alles anhören zu können, ohne die Ruhe zu verlieren oder das Selbstvertrauen.
Robert Frost
Overview
• General concepts and terms
• The aloXerv MOT-language
• The Ecore modeling language
• The Component Description Framework and the CDF-Editor
• Tutorial
General concepts and terms
Model-Driven Software-Development key concepts
• Provide optimal level of abstraction for each role in the (development) process
• Separation of concerns (e.g. separate app-logic from ui)
• Avoid storing redundant information (use single source of information)
•Interprete the information during runtime
•Use Code-generators to create code-artifacts in concrete languages (e.g. Java)
=> Provide custom „languages“ and tools
Meta-Meta-Model(Bsp: Ecore)
Meta-Grammar (E)BNF
Meta-Model / Data Model / Schema / …
Grammar
Model(Instance)
Valid sentence of grammar
Domain specific lanuages (DSL)
Textual and graphical presentation
Model-Driven Software-Development (MDSD)
Concepts of the language independent of presentation (= „abstract syntax“)
General concepts and terms
Example
Instance of
ANTLR
Java ProgrammingLanguage
Java-Class (e.g. FireDetector.java)
FireDetector1 (object)
DocumentationProgramming Interface (API)
Persistency Presentation
UML-Class-DiagramsWIKIHTML/Web (MOT-Concept)Dokumente (Word/Open Office...)...
C++Java (=MOT-API)...
XMLBinary formatDatabase...
Web (Thin-Client)MOT-Editor (Fat-Cl.)...
The MOT-Language/MOT-API= A sample Meta-Model
Meta-Model(MOT-Language)
Model(*.mot)
Generate (>90%)
Instance of
read/write
use
Model(*.mot)
Model(*.mot)
manipulate
The Ecore modeling language (class hierarchie)
A simple data model (Ecore meta-model)
<cites> <authors> <author name="Robert Frost"/> … </authors> <cite shortText="Bildung" text="Bildung ist die Fähigkeit, fast alles anhören zu können, ohne die Ruhe zu verlieren oder das Selbstvertrauen" author="Robert Frost"/></cites>
Sample-Model/Instance (XML)
The development-process with FXL Editorand FXL Generator
•Edit/extend the meta-model (*.ecore)
•Use code-generator for *-API/Editor
•Hand-code additional functionality in *-API; Customize Editor
•Build/release the editor
The Component Description Framework
and
the CDF Editor
The Component Description Frameworkand the CDF-Editor
Framework for Application and Tool development based on MDSD
• Component = Module = Project = Artifact
• For each Component you can define as many Meta-Models as you want
• Basis = Based on FXL: Ecore-(meta-)modeling, code-generation, mighty Editor- Framework
• Integration of an Ecore-editor and the code-generators into one tool
• Run API/editors as Eclipse-Editors and in the CDF Standalone-Editor
The Component Description Frameworkand the CDF-Editor (2)
Existing open source CDF-extensions:
•History (Release-Notes)/svn, Files (e.g. for viewing PNB), Reviews, I18n, Decisions, Eclipse-Help, Authentication, Tasks, Actions, (Joke of the day), …
AloXerv-specific extensions (closed source)
•Domain-Configuration, Data-Channels, Security-Config, SDC-Sample, Cu-Handler-Config, ...
CDF-Standalone
•Can be used by none-developers (in contrast to Eclipse IDE)
•No usage of Eclipse-File-System no need to perform “refresh workspace” after svn-update
•Very flexible/customizeable (which extensions to show)
– Use as demo-system to manage aloXerv-site-installation
– Use as application to manage aloXerv help
– …
•Can be used to get overview ==> tables
The CDF-Editor (details/architecture)
How to create an extension of the CDF-Editor without writing one line of Java-code http://www.ulrich-dinger.de/cdf/cde.html
CDF Development
Tutorial
Ulrich Dinger
Ecore meta-model
<cites> <authors> <author name="Robert Frost"/> … </authors> <cite shortText="Bildung" text="Bildung ist die Fähigkeit, fast alles anhören zu können, ohne die Ruhe zu verlieren oder das Selbstvertrauen" author="Robert Frost"/></cites>
Sample-Model/Instance (XML)
Optional:
Extend meta-model to allow users to vote for cites with POOR … GOOD … EXCELLENT (enumeration)
Show cites in a table
…
Extended Ecore meta-model
<cites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <authors> <author name="Robert Frost"/> </authors> <cite shortText="Bildung" text="Bildung ist die Fähigkeit, fast alles anhören zu können, ohne die Ruhe zu verlieren oder das Selbstvertrauen" author="Robert Frost"> <vote user="schnullerich" rating="GOOD"/> </cite> <users> <user userName="schnullerich" firstName="Ulrich" lastName="Dinger"/> </users></cites>
Extended sample-Model/Instance (XML)
Extended Ecore meta-model
<cite text=„Ich habe eiserne Prinzipien.
Wenn sie Ihnen nicht gefallen, habe ich auch noch andere.“
author=„Groucho Marx“/>