31.01.2014 Views

Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...

Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...

Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 3. Domain-Specific Modelling<br />

3.1.2. Ecore<br />

Ecore [76, pp. 71-73] is very similar to MOF and us<strong>es</strong> the Eclipse Modelling Framework<br />

(EMF) [76, pp. 71-73]. EMF is a software framework based on Java, which provid<strong>es</strong> functionality<br />

for model-driven software development. Furthermore, it provid<strong>es</strong> mechanisms for creating new<br />

DSLs and for generating code. Its main disadvantage is are the code generation capabiliti<strong>es</strong>,<br />

which are limited to Java source code using the EMF.<br />

Ecore is not explained in this document in detail because its similarity to MOF, which was<br />

already introduced in Subsection 3.1.1.<br />

3.1.3. Extensible Markup Language with Schema Definition<br />

The Extensible Markup Language [96] (XML) with XML Schema Definition (XSD) [42, 70] is<br />

very easy and simple to use for DSM because XSD can be directly used as meta meta model<br />

while the definition in XML d<strong>es</strong>crib<strong>es</strong> corr<strong>es</strong>ponding meta models. A XML file complying to a<br />

certain Schema Definition is then a model of the meta model [76, p. 74].<br />

An example for an XML file or rather model could be the simple d<strong>es</strong>cription of a software<br />

class, as shown in Figure 3.10. This example can be taken to explain the most important<br />

1 <br />

2 <br />

3 <br />

4 <br />

5 <br />

6 <br />

7 // do something meaningful<br />

8 iValue++;<br />

9 <br />

10 <br />

11 <br />

Figure 3.10.: XML class d<strong>es</strong>cription example<br />

elements of XML:<br />

Markup<br />

Content<br />

Tag<br />

All elements starting with < and ending with > are markups. In the example, all<br />

lin<strong>es</strong> are markups except 7 and 8.<br />

Every element that is not markup is content. In the example, the only content are<br />

the lin<strong>es</strong> 7 and 8.<br />

A tag is a markup construct. There are three different tag typ<strong>es</strong>:<br />

• start-tag (e.g. in line 1)<br />

• end-tag (e.g. in line 11)<br />

• empty-element-tag (e.g. in line 2)<br />

28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!