MODeX Designer - EclipseCon France 2015
Download
Report
Transcript MODeX Designer - EclipseCon France 2015
MODeX
Model Oriented Data eXchange
EclipseCon Short Talk
March 20, 2008
Ted Epstein
Andrew J. Montalenti
Morgan Stanley
What is MODeX?
A domain-specific modeling language for enterprise
messaging.
Components include:
Graphical modeling IDE
Code generator
Language-specific runtime components
Lifecycle management tools
Current State of XML Messaging
in the Enterprise
• Direct XML manipulation is the least • Developers and designers have been
left to translate business concepts to
common denominator.
XML formats.
• Toolkits handle basic SOAP
• Elements or attributes?
envelopes, transport, message
• Type substitution or element
dispatching and handling.
substitution?
• Developers may use JAXB, XSD.EXE
• Nesting or IDREF for shared
for marshalling/unmarshalling.
references?
• Adopting CxF and WCF as standards
• …
• Ambivalent relationship with
• Big problems:
schema:
• Cost of coding directly against XML
• Most developers ignore it or
or even mapping is a drag on
treat it as a design-time
developer productivity
exercise.
• Proliferation of formats makes
• Some developers invest heavily
integration extremely expensive.
and want to use schema as
“the model”
• Weak contracts affect data
quality.
Solution:
Create a simple graphical modeling language for enterprise data and
message contracts
Create a federated model repository for shared models and lifecycle
management
Generate schemas from well-specified message contracts
Generate code and provide runtime support for multiple languages
Build on this basic foundation to address other large-scale issues
MODeX Solution Architecture
Specifications
Modeling Language
(Metamodel)
Wire Format
Specifications
Object Pool XML
Core Technologies
MODeX Designer
(Graphical Modeling IDE)
Model Lifecycle Utilities
(Provisioning, Build,
Publish, etc.)
Code Generator
Schema Targets
(Object Pool, Tree Form)
GDA Targets
(Java, C#, C++)
Tree Form XML
Other...
Runtime Support Libraries
Marshaling, Version Bridging, Validation, Enrichment….
Java Runtime
C# Runtime
C++ Runtime
Other languages...
Extensibility API’s
Model-Driven Development Lifecycle
Business Information
Model
Domain Expert /
Business Analyst
Message Contracts
ß reference
shared definitions
MODeX Domain Model
ß
Enterprise
Model
Repository
MODeX Code
Generator
Java / C#
Generated
Domain API
XML Schema
uses
Publish
model
Application Code
Application Developer
marshalling
unmarshalling
XML
Message
Conforms to...
Message Contract
Designer
Demo and Walkthrough
MODeX Designer
Java GDA
Tree Form XML
How MODeX Addresses Enterprise
Messaging Challenges
• Partitions enterprise information
into domains of manageable
scope, with clear ownership and
managed lifecycle.
• Reduces integration barriers by
defining message payloads in
terms of a consistent information
model.
• Provides an expressive, graphical
language for message protocol
definition.
• Provides multiple views of
information depending on
lifecycle and messaging context.
• Enables orderly model evolution
with entity-level versioning.
• Preserves object topology,
including shared references and
cycles.
• Uses schema validation where
appropriate, but allows for rich,
rules-based validation where
required.
• Hides the wire format from
developers, providing a path to
more efficient wire
representations.
• Reduces impedance mismatch
between messages and objects.
Comparison with JAXB
Limited to a single
language.
Model is inferred
from code, all
other
manifestations
suffer.
Generic model
inference does not
encourage standard
implementation.
Enforces one-toone mapping of
Java class to XSD
type.
Annotated
Java Classes
Java Objects
Model
inferrence
JAXB
Mapping
Model
Runtime
Marshaller
Model
inferrence
Annotated
XML Schema
XML Message
Comparison with JAXB
Putting the model
at the center gives
the power of
abstraction.
Code generation
guarantees
standardized
implementations.
Model captures rich
semantics
encompassing all
target languages.
Allows mapping a
single class to
multiple XSD types.
Supports multiple
languages.
Generated
Domain API
(Java, C#, …)
Objects
Code
Generation
MODeX
Domain
Model
Runtime
Services
Code
Generation
XML Schema
XML Message
Model-Driven Development and CASE
"Isn't this the same promise that CASE tools were making in the
1980's and '90's? If it didn't succeed then, why do we think we can
make it work now?"
CASE
Model-Driven Development
Focus on round-trip engineering
Focus on meaningful abstraction
General-purpose modeling
Domain-specific modeling
languages
Monolithic design
Rich graphical modeling and IDE
integration
Primitive, inflexible code
generation
Sophisticated model-to-model and
model-to-code transformation
pipeline
Limited cross-platform design
Broad applicability to distributed
software architecture
MODeX Designer: How was it built?
Proven open source technology stack
GMF
Generative Diagram
GEF
EMF
RCP
SWT/JFace
Equinox
Editor Framework
MVC Pattern for
Graphical Editors
Model-Driven Development
Framework, integrated with GMF
Views, Editors, Perspectives
UI Toolkits
Plug-in and Buddy
Classloader System
Views
• Entity Model:
View Example – Stage 1
Organization
Legal Identity
* Party ID
* Legal Name
Identity Type
Tax Treatment
Legal Entity Status
Consolidated
Regulated
Audited
Country of Formation
FY End Month
Formation Date
Legal Form
Trade Type
EIN
GL Company
Approved Organizations
Responsible Organizations
Product Types
Responsible
Organizations
Segment
Business Unit
Division
Product Type
Product Types
Product Type ID
Description
GL Company
GL Company
GL Code
Functional Currency
Status
GL Company Name
Parent GL Company
GL Stream
Cost Center CTA
CC P and L
CC Retained Earnings
TAPS Fed
Mirror Company Security
Mirror Company FX
Accounting Jurisdiction
Accounting
Jurisdiction
Accounting
Jurisdiction
Jurisdiction ID
Description
Governing Body
Revision
View Example – Stage 2
Organization
Legal Identity
* Party ID
* Legal Name
Identity Type
Tax Treatment
Legal Entity Status
Consolidated
Regulated
Audited
Country of Formation
FY End Month
Formation Date
Legal Form
Trade Type
EIN
GL Company
Approved Organizations
Responsible Organizations
Product Types
Responsible
Organizations
Segment
Business Unit
Division
Product Type
Product Types
Product Type ID
Description
GL Company
GL Company
GL Code
Functional Currency
Status
GL Company Name
Parent GL Company
GL Stream
Cost Center CTA
CC P and L
CC Retained Earnings
TAPS Fed
Mirror Company Security
Mirror Company FX
Accounting Jurisdiction
Accounting
Jurisdiction
Accounting
Jurisdiction
Jurisdiction ID
Description
Governing Body
Revision
View Example – Stage 3
Organization
Legal Identity
* Party ID
* Legal Name
Identity Type
Tax Treatment
Legal Entity Status
Consolidated
Regulated
Audited
Country of Formation
FY End Month
Formation Date
Legal Form
Trade Type
EIN
* GL Company
Approved Organizations
Responsible Organizations
Product Types
Responsible
Organizations
Segment
Business Unit
Division
Product Type
Product Types
Product Type ID
Description
GL Company
GL Company
* GL Code
Functional Currency
Status
GL Company Name
Parent GL Company
GL Stream
Cost Center CTA
CC P and L
CC Retained Earnings
TAPS Fed
Mirror Company Security
Mirror Company FX
Accounting Jurisdiction
Accounting
Jurisdiction
Accounting
Jurisdiction
Jurisdiction ID
Description
Governing Body
Revision
High-Fidelity Messaging
Objects:
Object Graphs may contain
shared references and cycles
Block
Allocation
Account
Client
Notice
XML:
Shared objects are detected
by the marshaller, and
assigned a unique ID.
The unmarshaller will
reconstruct the object graph
with full fidelity.
API:
Traversal over the object
graph across any path yields
full access to all fields.
<Block blockId="8927340">
<Allocation allocationId="982734">
<Account modex:objectId="1"
accountId="12349087"
accountCode="ABC"
type="DEF" />
</Allocation>
<ClientNotice date="2007-09-17" status="sent">
<Account modex:objectId="1" />
</ClientNotice>
</Block>
Block b = BlockMsg.unmarshalFromDocument(doc);
ClientNotice cn = b.getClientNotice();
String accountCode =
cn.getAccount().getAccountCode();
Advanced Features
Versioning
Provides clear guidelines for what can change
within compatible versions of an entity.
Decouples model evolution from adoption.
Provides runtime support for version bridging
and version consistency checks.
Field Promotion and Inline Views
Data Aspects
Recap
Elevates the model to a first-class form of
source code.
Enables sophisticated code gen and runtime
behavior with guaranteed consistency.
Provides a very solid plank in the SOA platform,
specifically addressing data representation.
Q&A