1. EMF explanation
EMF is full of Eclipse Model Framework, as the name suggests, is used to model it. Here we can use some kind of concept of understanding. From the perspective of the operating system, we wrote a program, but the program is running in the operating system, so the procedures and processes are still static and dynamic concepts; if they are in object-oriented programming, we are written, When the system is running, we will operate the object, so the classes and objects are static and dynamic concepts. Similarly, when modeling UML is modeled, we first extract the class diagram to describe the static composition of the system, and then provide the object map to describe the dynamic state of a particular scene under the system. Back to EMF, he provides a set of tools for describing system static components, and corresponding to editing system dynamic behavior.
2. EMF
Emf.ecore
Emf.edit
Emf.Editor
3. EMF
a) EMF.ecore
i. effect: he provides a tool for describing the system. Before EMF, we can use the UML map, Java file, or other format to describe the system's composition. The so-called system is said that there should be roles and objects in the system, and the organization relationship between them, and several Example, like a course system, we should change the identity, the minimum need to have two objects and courses in the system, and then they are a one-to-many relationship, which is called the system. After EMF appeared, he also provided a tool for describing the system composition, and he also provided a mechanism for exporting models from existing UML diagrams, Java files in order to reuse the existing resources. Therefore, in general, the role of EMF.ecore is to provide a model (for description system) and a set of tools (for importing existing models).
b) EMF.Editor
i. The role: he provides tools for editing system dynamic behavior. The so-called dynamic behavior, he is associated with a particular scene, as an example with the previous course system, the course system is a common situation, specifically to a time course, we may generate three students of A, B, C, Each student is then selected by the A, B, C, and then a description between A and A, B and B, C and C, is a dynamic behavior of the system. Emf.editor provides a mechanism for editing and modifying a certain model based on a particular model, including a tree editor, a property editor, a table editor, and more. c) EMF.EDIT
i. effect: He offers a set of mechanisms in the UI and models. Since we can't provide a separate editor for a particular model, EMF uses the MVC mechanism, cutting the entire model into three parts, ecore is model, Editor is View, EDI is Controller. However, the MVC mechanism of EMF is more pure than the MVC used in the traditional UI programming. From the model display, EMF's editor has to display the model, but also to the model has nothing to do, so Editor is displayed by an adapter mechanism provided by Edit to display the model. From the model modification, since the modification is a model-related, we need to transform events in the UI into model-related operations. From the model notification, in order to avoid the model and display, we can only send the notification event to the Edit and then transform the event notification that Editor can perceive.