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.
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.