EMF: Eclipse Modelling Framework (Your Chance to Win a Copy)
ISBN: 0321331885
Reviewer Ratings
Relevance:Readability:
Overall:
Buy it now
One Minute Bottom Line
The second edition of the EMF book is fully updated, covering new additions such as modelling generics and generating Java 5 code. The experience of the four authors is apparent throughout the book, in the thorough explanations and the practical examples. As EMF becomes more popular among Eclipse users you will find that this book is essential. Even if you don't write Eclipse RCP applications, this book shows you how to use the framework in your standalone programs. Even if you own the first edition, it is still worth going out to buy this book. |
Review
While Chapter One gets the unfamiliar acquainted with Eclipse, it's Chapter Two, Introducing EMF, that most people will begin at. Here the Ecore model is explained, along with the different ways to produce the model. It's a great refresher chapter with a nice style that guides the reader through the main points of the framework.
Chapter Three shows how to use EMF.Edit to edit your Ecore model with generated editors to display and edit instances of your model. Chapter Four, Using EMF - A Simple Overview, starts to put what you've read in the previous chapters into action. with step by step instructions on how to create an EMF project, a model and how to generate code from the model.
Chapter Five starts the second part of the book - Defining EMF Models. This chapter explains Ecore Modelling Concepts going through the structural features, classifiers, annotations and modelling data types in EMF. The following chapters describe creating models from UML, Java Source Code and XML Schema in great detail. These chapters are a very comprehensive reference - the chapters most likely to be bookmarked.
Part three of the book deals with Using the EMF Generator. This part kicks off with a chapter on EMF Generator Patterns, how modelling decisions affect the generated code, and how to design a model most effectively. The following chapters covers EMF.Edit Generator Patterns. As the code generated by EMF.Edit is meant to be a starting point, the modification of this code will be necessary. As such, a good understanding of EMF.Edit is essential - this chapter shows some good patterns behind the editor customisation.
The next chapter deals with Running The Generators, beginning with an overview of the code generation process, moving onto investigating the generators available (UI, command line and Ant), before taking a look at the internals of the generator and the format of the templates that control the content. Chapter 13 brings you through a full example of implementing a model and an editor, using all that you have read up to now.
Part four of the book is titled Programming with EMF, which shows that EMF is more than a generator tool, but also a powerful runtime framework. Chapter 14 deals with exploiting the metadata exposed by the EMF objects by reflection and dynamic EMF mechanisms. Chapter 15, EMF Persistance, shows how you can go beyond the default XMI serialisation method (also described in this chapters) to persist to any type of storage and even to persist across different storage types.
The following chapters all describe some of the most useful aspects of EMF, from the change model to the validation framework. There's a chapter dedicated to using EMF outside of the Eclipse IDE, a chapter that will be useful to those who aren't using the Eclipse RCP, but would like to utilize EMF.
The final chapter describes the changes in EMF 2.3 and 2.4. The main points here are Java 5 support, the addition of generics and the new persistance enhancements.
Every chapter in this book is well written, with great explanations and examples. Some prove to be a great reference, others a useful tutorial.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)










Comments
musketyr85 replied on Tue, 2009/01/27 - 8:19am
hantsy replied on Tue, 2009/01/27 - 9:05am
mtcastoldi replied on Tue, 2009/01/27 - 9:54am
Setya replied on Tue, 2009/01/27 - 11:01am
I'm still wondering what EMF is good for, but I hope reading this book will bring me some ideas.
albertoaflores replied on Tue, 2009/01/27 - 11:33am
mkolb replied on Tue, 2009/01/27 - 1:53pm
lechique replied on Tue, 2009/01/27 - 2:29pm
I don't get all this model buzz. Is it something with storing data in XML? Or maybe painting nice looking UML diagrams that nobody cares afterall? I can live without models but reading EMF book could be interesting anyway.
tfaure replied on Wed, 2009/01/28 - 3:03am
I use a lot EMF for my projects
I don't use XMLs but Models thanks to EMF.
My last project with EMF is Doc2Model a Topcased open source sub project. Which parse Office documents XMLs (Word and OpenOffice) and generate EMF models (for Requirements, doc Generation ... using configuration models (style and regex based))
mattre replied on Wed, 2009/01/28 - 3:29am
I am using EMF for one year now in my (private) project and I am still learning. It is a very exciting technology with many possibilities (both core and UI). The concept of an editing domain and the adapter factory + item providers is just great.
Looking at the source code of EMF, it is so well written with very powerful design patterns. I am sure that nearly everyone will benefit from reading some parts of the source to become a better software developer/architect.
Currently I am developing a data model on top of an EMF model which can be (heavily) extended by other EMF models and will be sticked toghether with the OSGi services technology with the help of Spring DM.
Martin Sjoblom replied on Wed, 2009/01/28 - 3:52am
I usually focus on the models in my projects to create a strong foundation for future use of the code.
And have implemented a few bi-directional relation models, I even taken a course at an OOPSLA.
Although the knowledge of EMF hasn't quite stuck, perhaps a good book on the subject will help me use it in the future. EMF (with Eclipse download) is a bit complicated to get started with...
stoodge replied on Wed, 2009/01/28 - 4:42am
We are using EMF for about two years to model and generate evolutionary prototypes of our applications. We use EMF to model both client model and domain model. We implement generator templates in OAW framework. Both EMF and OAW are great frameworks and I am a big fan of their authors.
First we tried to create models with GMF, but after some time we have realized that the real essence of modeling lies in model driven development itself. Today we create models in EMF editor and we use GMF only to visualize EMF (read-only diagrams).
Today we are able to generate hibernate, spring and wicket (really live applications not just layout), but the most important thing is we have learned to abstract solutions and to store knowledge in a solid platform (models and OAW templates). Never more I look in past projects to reinvent the wheel (how i solved the problem in previous projects?), i simply generate do best solution.
Henrik replied on Wed, 2009/01/28 - 4:47am
Hi,
We are a team of 10 developers in Sweden using EMF extensively. We develop a tool for entering and validating railway signalling data. As this is a very data intensive application we decided early that we should use EMF. This has proven to be a good choice :-)
Marcin Kowalski replied on Wed, 2009/01/28 - 6:25pm
I am developing a dsl for dependability analysis of a power system
after a power system is designed in gmf, a transformation is done between two ecores resulting
in a dependability model which can be further exported into another tool using m2t
apart from gef, textual concrete syntax is also defined for xtext editor in which ocl expressions are used for input model validation
what i really like in emf is ability to regenerate a whole app on the basis of a few configuration files
Christian Voller replied on Thu, 2009/01/29 - 2:34am
Michael.Scharf replied on Thu, 2009/01/29 - 10:15am
paschelino replied on Thu, 2009/01/29 - 12:51pm
EMF together with XML-Schema is nice for configuration files. Imagine you started developing a new software project with detailed configuration needs. Define a XSD corresponding to your needs, generate an EMF editor and off you go - sometimes just a matter of 10 à 20 minutes. This is nice too, since you're able to hand this editor over to other developers, etc. And finally: Refine/develop the editor a little more at the end of your project and deliver it to your client as an extra goodie for easy config file editing.
Great!
Andrew McVeigh replied on Thu, 2009/01/29 - 2:20pm
(as an aside, i hate these "free book for the best post." i think in practice this translates into "if i say really nice things about the subject, i might win a free book" in posters' mind, which surely doesn't result in many objective posts. just to be clear even if there was a chance -- i don't want the free book)
I own the 1st edition to this book, and it's very good, very clear. i think i'll probably buy the 2nd edition at any rate just because I use EMF a lot through the UML project.
Just some brief comments about EMF the software framework first:
1. superb quality. very, very nice.
2. three way synch: model, code, xml schema
3. very customisable generation through jet templates
A few -ves (I may be wrong, perhaps these are just me or have been fixed)
1. too tied to eclipse for editors, too tied to eclipse versions
--> I hate the fact that I have to start up eclipse3.1.2 to edit the UML2 model that I use in my implementation
2. underlying architecture is difficult to work with outside of eclipse
--> I run EMF/UML2 as the data model for a Swing-based case tool. Took me a few weeks to get it running outside of the Eclipse environment
3. difficult to change the storage model to use an object database
Ok, (3) is my own problem, but it was tough to get working with JDO. EMF sort of assumes everything is in memory, and unidirectional references must be searched for the source of the reference when the target is deleted. For large models backed onto a database, this isn't the case.
However, (3) certainly is possible with EMF, which sort of goes back to the fact that it's a superbly pliable framework.
The 1st edition of the book was very good, although again a bit eclipse centric. I know, it's called the eclipse modeling framework for a reason. Here's the thing though -- EMF is much more than that. It's a general modeling framework/data system for anything in java. Doesn't have to have anything to do with eclipse...
The 1st edition of the book contains an excellent intro into how you do the modeling, what advantages you get and how to model common patterns. The system is really very nice (haven't i said that before ;-) and oh so much nicer than the horrible MOF (meta-object format) and meta-rubbish that is so prevalent in so many tools based on the OMG specs. EMF as a simpler MOF works really really well.
Andrew
cana replied on Thu, 2009/01/29 - 3:06pm
I'm indonesian, and now i'm work as Junior Developer as a freelancer , and now develop Personal Information Manager with RCP.
I'm new comer with eclipse technology, and now still learn and make a software with RCP and start with EMF this february to develop my software..
I have read overview about EMF, and i'm interest to learn more about it :) because i think EMF can reduce my time for make a class and documentation, because can modelling by xml exactly xsd. and when i read overview of this book, i think this book can make me expert with EMF :)
more reason to interest to learn about EMF because there is CDO as OR/M and
Like the other said i think EMF is a great framework and it make me more love to JAVA, and use Eclipse as and IDE and make some project with Eclipse :)
arrrgghhh...
Finally, i hope i can get this book :) and hope can be expert :)
if anybody want to tell me from beginning how to make a great project with EMF/Eclipse please tell me at rencana_tarigan@yahoo.co.id :)
Thanks all !!!
Zardoz replied on Thu, 2009/01/29 - 6:36pm
I am using EMF for an open source NLP (Natural Language Processing) RCP application in the biomedical field. EMF allows me as a core technology to use CDO to share the same model with many RCP clients in a very easy and straightforward way. EMF also gives me some other nice features as bonus, like the possibility to quite easy implement undo/redo functionality and bidirectional databinding.
koloale replied on Fri, 2009/01/30 - 4:03am
I am using EMF to create models from XML schema and java code. It provides great aid in working with xml as well as hibernate through Teneo framework. I also create generic web interface from these models based on JSF. Created web UI is tend to be like traditional Eclipse-based editor. I've become confident that EMF add unrivaled support to the Web-based applications not less than it does for RCP ones. It's really very very cool framework. Thanks to all creators of EMF!
Alexey
r_sudh replied on Sun, 2009/02/01 - 10:49am
mpisanko replied on Mon, 2009/02/02 - 4:08am
cana replied on Tue, 2009/02/03 - 5:02am
cana replied on Tue, 2009/02/03 - 5:08am
koloale replied on Thu, 2009/02/05 - 3:34am
James Sugrue replied on Mon, 2009/02/09 - 4:49am
in response to: koloale
koloale replied on Mon, 2009/02/09 - 12:01pm
cana replied on Tue, 2009/02/10 - 2:48pm
koloale replied on Wed, 2009/03/11 - 1:04pm
in response to: jsugrue