Architected Futures™

Tools and strategies ... for boiling the ocean

EMF Dos and Don'ts

Preface

Summary from the Eclipse Source presentation and blog series by Maximilian Koegel of helpful Do and Do Not pointers concerning EMF.

Reference

Advisories

Original numbering of the advisory set was based on the presentation slides. Presentation was made before the blog series was completed. Presentation was a set of 10. Blog series initial article claims the series will be 25.

1) Do RTFM

2) Don't change generated getters/setters

3) Do rename generated methods before changing them

Use a pattern for replacing generated code.

4) Don't default initialization in EMF factories

5) Don't use sub-packages

Use multiple Ecores with appropriate naming.

6) Do design a clear containment structure

7) Do use Adapters carefully

Remember to dispose of Adapters

8) Do use EContentAdaptors carefully

9) Do use EMF ItemProviders

10) Do use EMF ComposedAdapterFactory

Non-blogged Advisories

The following advisories were provided in the original presentation but were not followed up with blog articles. For details, please see the presentation materials. Numbers are from the presentation.

7) Do use EMF Commands

8) Do use Databinding

9) Do use Ecore.Util.delete() carefully

10) Don't build on the generated editor

Instead:

  • Use EMF reflection to build a custom editor
  • Use EEF - Extended Editing Framework for enhanced property views
  • Use ECP - EMF Client Platform for creating forms based interfaces
  • Use Graphiti - for graphical representation and editing which hides underlying GEF technology.
Tags: 

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
SystemsThinking