SlideShare a Scribd company logo
1 of 41
Eclipse Modeling Framework ajaykemparaj@gmail.com http://www.theenmusketeers.com EMF
What is Eclipse ? Eclipse is a Java IDE Eclipse is an IDE Framework Eclipse + JDT = Java IDE First class framework for Java Language aware editor Incremental build Integrated debugging Eclipse + CDT = C/C++ IDE First class framework for C/C++ Language aware editor Refactoring, search Eclipse + PHP = PHP IDE Eclipse + JDT + CDT + PHP = Java, C/C++, PHP IDE ………….
Plug-in Plug-in Plug-in Eclipse is a Tools Framework Tools extend the Eclipse platform using plug-ins Business Intelligence and Reporting Tools (BIRT) Eclipse Communications Framework (ECF) Web Tools Project (WTP) Eclipse Modelling Framework (EMF) Graphical Editing Framework (GEF) Test and Performance Tooling Project (TPTP
Eclipse is a Application Framework Remove the IDE elements, Java language support, team development support, … and you’re left with a pretty comprehensive general application framework Support for multiple platforms Linux, Windows, Mac OSX, UNIX, embedded Rich widget set, graphics Native-OS integration (drag and drop, OLE/XPCOM integration) A platform for rich clients
Eclipse is all these things A Java IDE An IDE Framework A Tools Framework An Application Framework An Open Source Enabler A community An eco-system A foundation
Model Driven Architecture (MDA) • A software architecture proposed by the OMG (Object Management Group) • Application specified in high-level, Platform Independent Model (PIM) • Transformation technologies used to convert PIM to Platform Specific Model (PSM), implementation code • Includes several open modeling standards:  UML™ (Unified Modeling Language)  MOF (Meta-Object Facility)  XMI (XML Metadata Interchange)  CWM (Common Warehouse Model)
What is EMF ? EMF is a simple, pragmatic approach to modeling:  Allows us to generate some of the code that we write over and over, paving the way for more complex systems  Models are simple, but meant to be mixed with hand-written code  It’s real, proven technology (since 2002)
What EMF is ? ,[object Object]
Runtime Emulator for  your model
generator for Java Implementation of your ModelEMF is a  framework converting various forms of model into core model description called Ecore
Why EMF ? EMF is middle ground in the modeling vs. programming worlds Focus is on class diagram subset of UML modeling (object model) Transforms models into Java code Provides the infrastructure to use models effectively in your application Very low cost of entry  EMF is free and open source Full scale graphical modeling tool not required Reuses your knowledge of UML, XML Schema, or Java It’s real, proven technology (since 2002)
Some of Eclipse projects which are using EMF ,[object Object]
Web Tools Platform (WTP) Project
Test and Performance Tools Platform (TPTP) Project
Business Intelligence and Reporting Tools (BIRT) Project
Data Tools Platform (DTP) Project
Modeling : Graphical Modeling Framework (GMF),[object Object]
EMF Architecture
EMF Components • Core Runtime  	Notification framework 	 Ecore meta model  	Persistence (XML/XMI), validation, change model • EMF.Edit  	Support for model-based editors and viewers  	Default reflective editor • Codegen  	Code generator for application models and editors  	Extensible model importer/exporter framework
The Ecore(Meta) Model • EMF’s metamodel (model of a model)
Model Sources • EMF models can be defined in (at least) three ways: 1. Java Interfaces 2. UML Class Diagram 3. XML Schema
Java Interfaces public interface Item {   String getProductName();   void setProductName(String value); intgetQuantity();   void setQuantity(int value)   float getPrice();   void setPrice(float value); } public interface PurchaseOrder {   String getShipTo();   void setShipTo(String value);   String getBillTo();   void setBillTo(String value);   List getItems(); // List of Item } • Classes can be defined completely by a subset of members, supplemented by annotations
UML Class Diagram • Built-in support for Rational Rose® • UML2 support available with UML2 (from MDT)
XML Schema <?xml version="1.0" encoding="UTF-8"?> <xsd:schemaxmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/SimplePO" xmlns:po="http://www.example.com/SimplePO"> <xsd:complexType name="PurchaseOrder"> <xsd:sequence> <xsd:element name="shipTo" type="xsd:string"/> <xsd:element name="billTo" type="xsd:string"/> <xsd:element name="items" type=“po:Item" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="Item"> <xsd:sequence> <xsd:element name="productName" type="xsd:string"/> <xsd:element name="quantity" type="xsd:int"/> <xsd:element name="price" type="xsd:float"/> </xsd:sequence> </xsd:complexType> </xsd:schema>
Direct Ecore Modeling • Ecore models can be created directly  Sample Ecore editor (in EMF)  Ecore Tools graphical editor (from EMFT)
Code Generation (Simple)
Code Generation (Full)
Generated Model Code • Interface and implementation for each modeled class  Includes get/set accessors for attributes and references Interface public interface PurchaseOrder extends EObject { String getShipTo(); void setShipTo(String value); String getBillTo(); void setBillTo(String value); EList<Item> getItems(); } Implementation Class public class PurchaseOrderImpl extends EObjectImpl implements PurchaseOrder { ... }
Change Notification • Every EObject is also a notifier  Sends notification whenever an attribute or reference is changed  Observers can update views, dependent objects  Observers are also adapters Adapter Adapter adapter = ... purchaseOrder.eAdapters().add(adapter);
Factories and Packages • Factory to create instances of model classes • Package provides access to metadata POFactory factory = POFactory.eINSTANCE; PurchaseOrder order = factory.createPurchaseOrder(); POPackagepoPackage = POPackage.eINSTANCE; EClassitemClass = POPackage.Literals.ITEM; //or poPackage.getItem() EAttributepriceAttr = POPackage.Literals.ITEM__PRICE; //or poPackage.getItem_Price() //or itemClass.getEStructuralFeature(POPackage.ITEM__PRICE)
Persistence • Persisted data is referred to a resource • Objects can be spread out among a number of resources, within a resource set • Proxies represent referenced objects in other resources
Resource Set • Context for multiple resources that may have references among them • Usually just an instance of ResourceSetImpl • Provides factory method for creating new resources in the set ResourceSetrs = new ResourceSetImpl(); URI uri = URI.createFileURI("C:/data/po.xml"); Resource resource = rs.createResource(uri); • Also provides access to the registries, URI converter and default load options for the set
Resource • Container for objects that are to be persisted together ,[object Object]
 Access contents of resource via getContents()URI uri = URI.createFileURI("C:/data/po.xml"); Resource resource = rs.createResource(uri); resource.getContents().add(p1); resource.save(null); • EMF provides generic XMLResource implementation ,[object Object],<PurchaseOrder> <shipTo>John Doe</shipTo> <next>p2.xml#p2</next> </PurchaseOrder>
Registries • Resource Factory Registry ,[object Object]
 Based on URI scheme, filename extension or content type
 Determines the format for save/load
 If no registered resource factory found locally, delegates to	global registry: Resource.Factory.Registry.INSTANCE • Package Registry ,[object Object]

More Related Content

What's hot

Memory Management with Page Folios
Memory Management with Page FoliosMemory Management with Page Folios
Memory Management with Page FoliosAdrian Huang
 
itlchn 20 - Kien truc he thong chung khoan - Phan 1
itlchn 20 - Kien truc he thong chung khoan - Phan 1itlchn 20 - Kien truc he thong chung khoan - Phan 1
itlchn 20 - Kien truc he thong chung khoan - Phan 1IT Expert Club
 
The six key steps to AEM architecture
The six key steps to AEM architectureThe six key steps to AEM architecture
The six key steps to AEM architectureAshokkumar T A
 
P4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC OffloadP4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC OffloadOpen-NFP
 
ELF(executable and linkable format)
ELF(executable and linkable format)ELF(executable and linkable format)
ELF(executable and linkable format)Seungha Son
 
Jetpack Compose a new way to implement UI on Android
Jetpack Compose a new way to implement UI on AndroidJetpack Compose a new way to implement UI on Android
Jetpack Compose a new way to implement UI on AndroidNelson Glauber Leal
 
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIPhpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIMarcelo Gornstein
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Robert Stern
 
Developing New Widgets for your Views in Owl
Developing New Widgets for your Views in OwlDeveloping New Widgets for your Views in Owl
Developing New Widgets for your Views in OwlOdoo
 
Yocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux DistributionYocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux Distributionemertxemarketing
 
Serializing EMF models with Xtext
Serializing EMF models with XtextSerializing EMF models with Xtext
Serializing EMF models with Xtextmeysholdt
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixBrendan Gregg
 
Flutter state management from zero to hero
Flutter state management from zero to heroFlutter state management from zero to hero
Flutter state management from zero to heroAhmed Abu Eldahab
 

What's hot (20)

astricon2018
astricon2018astricon2018
astricon2018
 
Memory Management with Page Folios
Memory Management with Page FoliosMemory Management with Page Folios
Memory Management with Page Folios
 
itlchn 20 - Kien truc he thong chung khoan - Phan 1
itlchn 20 - Kien truc he thong chung khoan - Phan 1itlchn 20 - Kien truc he thong chung khoan - Phan 1
itlchn 20 - Kien truc he thong chung khoan - Phan 1
 
The six key steps to AEM architecture
The six key steps to AEM architectureThe six key steps to AEM architecture
The six key steps to AEM architecture
 
P4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC OffloadP4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC Offload
 
Deep C
Deep CDeep C
Deep C
 
ELF(executable and linkable format)
ELF(executable and linkable format)ELF(executable and linkable format)
ELF(executable and linkable format)
 
Jetpack Compose a new way to implement UI on Android
Jetpack Compose a new way to implement UI on AndroidJetpack Compose a new way to implement UI on Android
Jetpack Compose a new way to implement UI on Android
 
Expressjs
ExpressjsExpressjs
Expressjs
 
Aem Training Tutorials for Beginners
Aem  Training Tutorials for BeginnersAem  Training Tutorials for Beginners
Aem Training Tutorials for Beginners
 
GCC
GCCGCC
GCC
 
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGIPhpconf 2013 - Agile Telephony Applications with PAMI and PAGI
Phpconf 2013 - Agile Telephony Applications with PAMI and PAGI
 
Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1Golang basics for Java developers - Part 1
Golang basics for Java developers - Part 1
 
Developing New Widgets for your Views in Owl
Developing New Widgets for your Views in OwlDeveloping New Widgets for your Views in Owl
Developing New Widgets for your Views in Owl
 
Yocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux DistributionYocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux Distribution
 
Serializing EMF models with Xtext
Serializing EMF models with XtextSerializing EMF models with Xtext
Serializing EMF models with Xtext
 
Kernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at NetflixKernel Recipes 2017: Using Linux perf at Netflix
Kernel Recipes 2017: Using Linux perf at Netflix
 
Flutter state management from zero to hero
Flutter state management from zero to heroFlutter state management from zero to hero
Flutter state management from zero to hero
 
Dropwizard
DropwizardDropwizard
Dropwizard
 
GCC, GNU compiler collection
GCC, GNU compiler collectionGCC, GNU compiler collection
GCC, GNU compiler collection
 

Viewers also liked

EclipseCon 2006: Introduction to the Eclipse Modeling Framework
EclipseCon 2006: Introduction to the Eclipse Modeling FrameworkEclipseCon 2006: Introduction to the Eclipse Modeling Framework
EclipseCon 2006: Introduction to the Eclipse Modeling FrameworkDave Steinberg
 
Epf composer overviewpart2
Epf composer overviewpart2Epf composer overviewpart2
Epf composer overviewpart2Abdelkader Larbi
 
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
EclipseCon 2007: Effective Use of the Eclipse Modeling FrameworkEclipseCon 2007: Effective Use of the Eclipse Modeling Framework
EclipseCon 2007: Effective Use of the Eclipse Modeling FrameworkDave Steinberg
 
What every Eclipse developer should know about EMF - Tutorial at EclipseCon
What every Eclipse developer should know about EMF - Tutorial at EclipseConWhat every Eclipse developer should know about EMF - Tutorial at EclipseCon
What every Eclipse developer should know about EMF - Tutorial at EclipseConJonasHelming
 
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2008: Fundamentals of the Eclipse Modeling FrameworkEclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2008: Fundamentals of the Eclipse Modeling FrameworkDave Steinberg
 
The Eclipse Modeling Framework and MDA
The Eclipse Modeling Framework and MDAThe Eclipse Modeling Framework and MDA
The Eclipse Modeling Framework and MDAelliando dias
 
Estructuras de datos
Estructuras de datos Estructuras de datos
Estructuras de datos Roimer Guape
 
Isabelle Coudere - Interior designer - Portfolio - Book
Isabelle Coudere - Interior designer - Portfolio - BookIsabelle Coudere - Interior designer - Portfolio - Book
Isabelle Coudere - Interior designer - Portfolio - BookIsabelle Coudere
 
9th grade dance flyer
9th grade dance flyer9th grade dance flyer
9th grade dance flyerCody Mims
 
Afifeh Halabi Editorial Design Portfolio
Afifeh Halabi Editorial Design PortfolioAfifeh Halabi Editorial Design Portfolio
Afifeh Halabi Editorial Design PortfolioAfifeh Halabi
 
Bases de datos de informacion y documentación en internet
Bases de datos de informacion y documentación en internetBases de datos de informacion y documentación en internet
Bases de datos de informacion y documentación en internetJuan pablo Peñuela
 
Laura Huser's Design Portf
Laura Huser's Design PortfLaura Huser's Design Portf
Laura Huser's Design Portflaura_huser
 
Portfolio – black and white images
Portfolio – black and white imagesPortfolio – black and white images
Portfolio – black and white imagesBenilda Beretta
 
Patterns in Eclipse
Patterns in EclipsePatterns in Eclipse
Patterns in EclipseMadhu Samuel
 
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...Hugo Bruneliere
 
What every Eclipse developer should know about EMF
What every Eclipse developer should know about EMFWhat every Eclipse developer should know about EMF
What every Eclipse developer should know about EMFPhilip Langer
 

Viewers also liked (20)

EclipseCon 2006: Introduction to the Eclipse Modeling Framework
EclipseCon 2006: Introduction to the Eclipse Modeling FrameworkEclipseCon 2006: Introduction to the Eclipse Modeling Framework
EclipseCon 2006: Introduction to the Eclipse Modeling Framework
 
Epf composer overviewpart2
Epf composer overviewpart2Epf composer overviewpart2
Epf composer overviewpart2
 
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
EclipseCon 2007: Effective Use of the Eclipse Modeling FrameworkEclipseCon 2007: Effective Use of the Eclipse Modeling Framework
EclipseCon 2007: Effective Use of the Eclipse Modeling Framework
 
What every Eclipse developer should know about EMF - Tutorial at EclipseCon
What every Eclipse developer should know about EMF - Tutorial at EclipseConWhat every Eclipse developer should know about EMF - Tutorial at EclipseCon
What every Eclipse developer should know about EMF - Tutorial at EclipseCon
 
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2008: Fundamentals of the Eclipse Modeling FrameworkEclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
 
The Eclipse Modeling Framework and MDA
The Eclipse Modeling Framework and MDAThe Eclipse Modeling Framework and MDA
The Eclipse Modeling Framework and MDA
 
Gramática
GramáticaGramática
Gramática
 
Estructuras de datos
Estructuras de datos Estructuras de datos
Estructuras de datos
 
academic and proof
academic and proofacademic and proof
academic and proof
 
ÉTICA PROFESIONAL
ÉTICA PROFESIONALÉTICA PROFESIONAL
ÉTICA PROFESIONAL
 
Isabelle Coudere - Interior designer - Portfolio - Book
Isabelle Coudere - Interior designer - Portfolio - BookIsabelle Coudere - Interior designer - Portfolio - Book
Isabelle Coudere - Interior designer - Portfolio - Book
 
9th grade dance flyer
9th grade dance flyer9th grade dance flyer
9th grade dance flyer
 
Afifeh Halabi Editorial Design Portfolio
Afifeh Halabi Editorial Design PortfolioAfifeh Halabi Editorial Design Portfolio
Afifeh Halabi Editorial Design Portfolio
 
Bases de datos de informacion y documentación en internet
Bases de datos de informacion y documentación en internetBases de datos de informacion y documentación en internet
Bases de datos de informacion y documentación en internet
 
REA13_PREVIEW_Final
REA13_PREVIEW_FinalREA13_PREVIEW_Final
REA13_PREVIEW_Final
 
Laura Huser's Design Portf
Laura Huser's Design PortfLaura Huser's Design Portf
Laura Huser's Design Portf
 
Portfolio – black and white images
Portfolio – black and white imagesPortfolio – black and white images
Portfolio – black and white images
 
Patterns in Eclipse
Patterns in EclipsePatterns in Eclipse
Patterns in Eclipse
 
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) R...
 
What every Eclipse developer should know about EMF
What every Eclipse developer should know about EMFWhat every Eclipse developer should know about EMF
What every Eclipse developer should know about EMF
 

Similar to Eclipse Modeling Framework

Eclipse World 2007: Fundamentals of the Eclipse Modeling Framework
Eclipse World 2007: Fundamentals of the Eclipse Modeling FrameworkEclipse World 2007: Fundamentals of the Eclipse Modeling Framework
Eclipse World 2007: Fundamentals of the Eclipse Modeling FrameworkDave Steinberg
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreEsha Yadav
 
Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02Wei Sun
 
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Lars Vogel
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Lars Vogel
 
Eclipse e4 Overview
Eclipse e4 OverviewEclipse e4 Overview
Eclipse e4 OverviewLars Vogel
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Lars Vogel
 
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesChoose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesCHOOSE
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#Talbott Crowell
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEBenjamin Cabé
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet IntroductionWei Sun
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLsintelliyole
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)Netcetera
 
Whidbey old
Whidbey old Whidbey old
Whidbey old grenaud
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010Satish Verma
 
Entity Framework V1 and V2
Entity Framework V1 and V2Entity Framework V1 and V2
Entity Framework V1 and V2ukdpe
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Guillaume Laforge
 

Similar to Eclipse Modeling Framework (20)

Eclipse World 2007: Fundamentals of the Eclipse Modeling Framework
Eclipse World 2007: Fundamentals of the Eclipse Modeling FrameworkEclipse World 2007: Fundamentals of the Eclipse Modeling Framework
Eclipse World 2007: Fundamentals of the Eclipse Modeling Framework
 
Runtime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya RathoreRuntime Environment Of .Net Divya Rathore
Runtime Environment Of .Net Divya Rathore
 
Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02Dotnetintroduce 100324201546-phpapp02
Dotnetintroduce 100324201546-phpapp02
 
Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4 Eclipse 40 and Eclipse e4
Eclipse 40 and Eclipse e4
 
Entity Framework 4
Entity Framework 4Entity Framework 4
Entity Framework 4
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010
 
Eclipse e4 Overview
Eclipse e4 OverviewEclipse e4 Overview
Eclipse e4 Overview
 
Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010Eclipse e4 on Java Forum Stuttgart 2010
Eclipse e4 on Java Forum Stuttgart 2010
 
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesChoose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
 
Exploring SharePoint with F#
Exploring SharePoint with F#Exploring SharePoint with F#
Exploring SharePoint with F#
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
 
Smoothing Your Java with DSLs
Smoothing Your Java with DSLsSmoothing Your Java with DSLs
Smoothing Your Java with DSLs
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)
 
Whidbey old
Whidbey old Whidbey old
Whidbey old
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Entity Framework V1 and V2
Entity Framework V1 and V2Entity Framework V1 and V2
Entity Framework V1 and V2
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 

Recently uploaded

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

Recently uploaded (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Eclipse Modeling Framework

  • 1. Eclipse Modeling Framework ajaykemparaj@gmail.com http://www.theenmusketeers.com EMF
  • 2. What is Eclipse ? Eclipse is a Java IDE Eclipse is an IDE Framework Eclipse + JDT = Java IDE First class framework for Java Language aware editor Incremental build Integrated debugging Eclipse + CDT = C/C++ IDE First class framework for C/C++ Language aware editor Refactoring, search Eclipse + PHP = PHP IDE Eclipse + JDT + CDT + PHP = Java, C/C++, PHP IDE ………….
  • 3. Plug-in Plug-in Plug-in Eclipse is a Tools Framework Tools extend the Eclipse platform using plug-ins Business Intelligence and Reporting Tools (BIRT) Eclipse Communications Framework (ECF) Web Tools Project (WTP) Eclipse Modelling Framework (EMF) Graphical Editing Framework (GEF) Test and Performance Tooling Project (TPTP
  • 4. Eclipse is a Application Framework Remove the IDE elements, Java language support, team development support, … and you’re left with a pretty comprehensive general application framework Support for multiple platforms Linux, Windows, Mac OSX, UNIX, embedded Rich widget set, graphics Native-OS integration (drag and drop, OLE/XPCOM integration) A platform for rich clients
  • 5. Eclipse is all these things A Java IDE An IDE Framework A Tools Framework An Application Framework An Open Source Enabler A community An eco-system A foundation
  • 6. Model Driven Architecture (MDA) • A software architecture proposed by the OMG (Object Management Group) • Application specified in high-level, Platform Independent Model (PIM) • Transformation technologies used to convert PIM to Platform Specific Model (PSM), implementation code • Includes several open modeling standards: UML™ (Unified Modeling Language) MOF (Meta-Object Facility) XMI (XML Metadata Interchange) CWM (Common Warehouse Model)
  • 7. What is EMF ? EMF is a simple, pragmatic approach to modeling: Allows us to generate some of the code that we write over and over, paving the way for more complex systems Models are simple, but meant to be mixed with hand-written code It’s real, proven technology (since 2002)
  • 8.
  • 10. generator for Java Implementation of your ModelEMF is a framework converting various forms of model into core model description called Ecore
  • 11. Why EMF ? EMF is middle ground in the modeling vs. programming worlds Focus is on class diagram subset of UML modeling (object model) Transforms models into Java code Provides the infrastructure to use models effectively in your application Very low cost of entry EMF is free and open source Full scale graphical modeling tool not required Reuses your knowledge of UML, XML Schema, or Java It’s real, proven technology (since 2002)
  • 12.
  • 13. Web Tools Platform (WTP) Project
  • 14. Test and Performance Tools Platform (TPTP) Project
  • 15. Business Intelligence and Reporting Tools (BIRT) Project
  • 16. Data Tools Platform (DTP) Project
  • 17.
  • 19. EMF Components • Core Runtime Notification framework Ecore meta model Persistence (XML/XMI), validation, change model • EMF.Edit Support for model-based editors and viewers Default reflective editor • Codegen Code generator for application models and editors Extensible model importer/exporter framework
  • 20. The Ecore(Meta) Model • EMF’s metamodel (model of a model)
  • 21.
  • 22. Model Sources • EMF models can be defined in (at least) three ways: 1. Java Interfaces 2. UML Class Diagram 3. XML Schema
  • 23.
  • 24. Java Interfaces public interface Item { String getProductName(); void setProductName(String value); intgetQuantity(); void setQuantity(int value) float getPrice(); void setPrice(float value); } public interface PurchaseOrder { String getShipTo(); void setShipTo(String value); String getBillTo(); void setBillTo(String value); List getItems(); // List of Item } • Classes can be defined completely by a subset of members, supplemented by annotations
  • 25. UML Class Diagram • Built-in support for Rational Rose® • UML2 support available with UML2 (from MDT)
  • 26. XML Schema <?xml version="1.0" encoding="UTF-8"?> <xsd:schemaxmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.com/SimplePO" xmlns:po="http://www.example.com/SimplePO"> <xsd:complexType name="PurchaseOrder"> <xsd:sequence> <xsd:element name="shipTo" type="xsd:string"/> <xsd:element name="billTo" type="xsd:string"/> <xsd:element name="items" type=“po:Item" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="Item"> <xsd:sequence> <xsd:element name="productName" type="xsd:string"/> <xsd:element name="quantity" type="xsd:int"/> <xsd:element name="price" type="xsd:float"/> </xsd:sequence> </xsd:complexType> </xsd:schema>
  • 27. Direct Ecore Modeling • Ecore models can be created directly Sample Ecore editor (in EMF) Ecore Tools graphical editor (from EMFT)
  • 30.
  • 31. Generated Model Code • Interface and implementation for each modeled class Includes get/set accessors for attributes and references Interface public interface PurchaseOrder extends EObject { String getShipTo(); void setShipTo(String value); String getBillTo(); void setBillTo(String value); EList<Item> getItems(); } Implementation Class public class PurchaseOrderImpl extends EObjectImpl implements PurchaseOrder { ... }
  • 32. Change Notification • Every EObject is also a notifier Sends notification whenever an attribute or reference is changed Observers can update views, dependent objects Observers are also adapters Adapter Adapter adapter = ... purchaseOrder.eAdapters().add(adapter);
  • 33. Factories and Packages • Factory to create instances of model classes • Package provides access to metadata POFactory factory = POFactory.eINSTANCE; PurchaseOrder order = factory.createPurchaseOrder(); POPackagepoPackage = POPackage.eINSTANCE; EClassitemClass = POPackage.Literals.ITEM; //or poPackage.getItem() EAttributepriceAttr = POPackage.Literals.ITEM__PRICE; //or poPackage.getItem_Price() //or itemClass.getEStructuralFeature(POPackage.ITEM__PRICE)
  • 34. Persistence • Persisted data is referred to a resource • Objects can be spread out among a number of resources, within a resource set • Proxies represent referenced objects in other resources
  • 35. Resource Set • Context for multiple resources that may have references among them • Usually just an instance of ResourceSetImpl • Provides factory method for creating new resources in the set ResourceSetrs = new ResourceSetImpl(); URI uri = URI.createFileURI("C:/data/po.xml"); Resource resource = rs.createResource(uri); • Also provides access to the registries, URI converter and default load options for the set
  • 36.
  • 37.
  • 38.
  • 39. Based on URI scheme, filename extension or content type
  • 40. Determines the format for save/load
  • 41.
  • 42. Used during loading to access factory for instantiating classes
  • 43. If no registered package found locally, delegates to global registry: EPackage.Registry.INSTANCE
  • 44. Reflective EObject API • All EMF classes implement EObject interface • Provides an efficient API for manipulating objects reflectively Used by framework (e.g. persistence framework, copy utility, editing commands) public interface EObject { EClasseClass(); Object eGet(EStructuralFeaturesf); void eSet(EStructuralFeaturesf, Object val); ... }
  • 45. Reflective EObject API • Efficient generated switch-based implementation of reflective methods public Object eGet(intfeatureID, ...) { switch (featureID) { case POPackage.PURCHASE_ORDER__ITEMS: return getItems(); case POPackage.PURCHASE_ORDER__SHIP_TO: return getShipTo(); case POPackage.PURCHASE_ORDER__BILL_TO: return getBillTo(); ... } ... }
  • 46.
  • 47. Regeneration and Merge • The EMF generator is a merging generator /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } •@generated elements are replaced/removed • To preserve changes mark @generated NOT
  • 48. Recording Changes  EMF provides facilities for recording the changes made to instances of an Ecore model  Change Model  An EMF model for representing changes to objects  Directly references affected objects  Includes “apply changes” capability  Change Recorder  EMF adapter  Monitors objects to produce a change description (an instance of the change model)
  • 49.
  • 50. Change Recorder  Can be attached to EObjects, Resources, and ResourceSets  Produces a description of the changes needed to return to the original state (a reverse delta) PurchaseOrder order = ... order.setBillTo("123 Elm St."); ChangeRecorder recorder = new ChangeRecorder(); recorder.beginRecording(Collections.singleton(order)); order.setBillTo("456 Cherry St."); ChangeDescription change = recorder.endRecording();  Result: a change description with one change, setting billTo to “123 Elm St.”
  • 51. Diagnostician • Diagnostician walks a containment tree of objects, dispatching to package-specific validators Diagnostician.validate() is the usual entry point Detailed results accumulated as Diagnostics Diagnostician validator = Diagnostician.INSTANCE; Diagnostic diagnostic = validator.validate(order); if (diagnostic.getSeverity() == Diagnostic.ERROR) { // handle error } for (Diagnostic child : diagnostic.getChildren()) { // handle child diagnostic }
  • 52. Demo Creation of ecore Code Generation Code Walkthrough
  • 53. Resources • EMF documentation in Eclipse Help Overviews, tutorials, API reference • EMF project Web site http://www.eclipse.org/modeling/emf/ Downloads, documentation, FAQ,newsgroup, Bugzilla, Wiki • Eclipse Modeling Framework, by Frank Budinsky Ed Merks