当前页面: 开发资料首页 → Eclipse 专题 → 玩转Eclipse tools第四部分EMF
摘要: 玩转Eclipse tools第四部分EMF
满嘴MDA,UML的非程序员是不是可以为这个项目贡献一点来自中国的力量呢?从模型到代码或者反向工程!!
官方网站是Eclipse Modeling Framework
先熟悉以下文档:
Eclipse Modeling Framework FAQ
Overview Papers 比如 The Eclipse Modeling Framework Overview
EMF 2.0 Tutorials 比如 Tutorial: Generating an EMF Model
Contributed Articles 比如 Eclipse Corner article on EMF by Catherine Griffin
Presentations and Interviews 比如 JavaOne 2004 EMF Presentation: Powerpoint
IBM "RedBook" on GEF which also has some chapters on EMF in it
下载安装后的帮助文档:EMF,SDO。其实,帮助永远是最好的入门文档。
如果想深入再翻翻别的EMF DOCUMENT。
随机帮助里面UML的一个例子讲述了代码自动生成并且运行自动生成的编辑器的例子,虽然简单,但是对MDA是一个直观的解释.
EMF自带的两个模型
Ecore model
Genmodel
一个独立的模型
XSD XML Schema Infoset Model,
名词解释:
一、EMF?
The Eclipse Modeling Framework is a Java/XML framework for generating tools and other applications based on simple class models. EMF helps you rapidly turn models into efficient, correct, and easily customizable Java code. It is intended to provide the benefits of formal modeling, but with a very low cost of entry. In addition to code generation, it provides the ability to save objects as XML documents for interchange with other tools and applications. Models can be created using annotated Java, XML documents, or modeling tools like Rational Rose, then imported into EMF. The code generator turns a model into a set of Java implementation classes. These classes are extensible and regenerable - you can modify them by adding user-defined methods and instance variables. When the model changes, you can regenerate the implementation classes, and your modifications will be retained. This works both ways - changes in the Java code can be used to update the model.
二、XML Schema Infoset Model?
The model incorporates many of the ideas that several people at IBM had about an excellent API for schemas. These ideas were shared with the W3C in February 2002, in a requirements document.
三、Model Driven Architecture (MDA)?
An example of the use of MDA is to use a UML model representation of a tool or application and to use this model to automate (some or all) of the Java interface, implementation, as well as any XML serialization for the modeled objects. Many of the recent OMG standards such as UML, MOF, and CWM were developed using MDA principles of using abstract models (these are also referred to as Platform Independent Models - PIM) which can be mapped to Platform Specific Models (PSM). Please note that 'platform independent' is a relative term!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />