Unified Modeling Language
Download
Report
Transcript Unified Modeling Language
sitemule.com/
Öresund Sencha & HTML5 Meetup
Model Driven Development
With
ExtJS
d. 10 April 2016:
DMD, XPD, Node.js, IceBreak
Niels Liisberg – Sitemule.com
sitemule.com/
Our challenge
sitemule.com/
Agenda
•
•
•
•
•
•
What is model driven development?
How can we use it
Is ExtJs a good candidate for the UI?
Tooling
How we are using it
Pitfalls and benefits
sitemule.com/
Model driven software development
• Is a design paradigm that:
•
•
•
•
•
Defines data
Behaviors
Rules
Roles
Business logic
… dynamically ! / ?
sitemule.com/
The “classical” approach
• Enterprise architect
• Unified Modeling Language (UML)
sitemule.com/
Unified Modeling Language
sitemule.com/
Unified Modeling Language
Class diagram
sitemule.com/
Unified Modeling Language
Component diagram
sitemule.com/
Enterprise Architect
sitemule.com/
Our findings
• EA is a great tool!
• Good for code generators
• Easy to create SQL tables/views from
•
•
•
•
Complex. Of cause it does a lot.
Not as “dynamic” as we like
Not easy to adapt the model in web ui.
Not available on client systems
sitemule.com/
What we came up with
We called it: DMD – Domain model definition
• A simple JSON file defining the model:
• Easy to handle from ExtJs:
• Dynamic ExtJs component factories on the fly
• Grid components and forms almost to easy.
• Easy to create SQL tables and views
• Creating server side proxies for ExtJs data stores
on the fly.
• No code generators
• Abstract modeling
• Very agile
sitemule.com/
The agile process
Developer
sitemule.com/
The agile process
DMD
Developer
Create Model
SQL:
Alter / create
tables + views etc.
DB/2 database
sitemule.com/
The agile process
Create Model
SQL:
Alter / create
tables + views etc.
DB/2 database
Proxy application
Developer
IceBreak - webserver
DMD
WebSite
jQuery
Administrator
ExtJs
sitemule.com/
The agile process
IceBreak - webserver
Proxy application
DMD
WebSite
jQuery
Administrator
ExtJs
sitemule.com/
What we came up with
We called it: DMD – Domain model definition
•
•
•
•
No tooling
Very proprietary
No documentation
To static
sitemule.com/
An “item” does not always look the same
sitemule.com/
Need to be more dynamic, so:
We called it: XPD – Extendable Property definition
•
•
•
•
Placing properties in JSON directly in BLOB
Adding UTF jsonGetStr(propcolumn, ‘key’) to DB/2
Row level dynamic
Even more abstract design
sitemule.com/
sitemule.com/
What does that provide?
• Configuration over coding
• DMD Domain model definition
• XPD Extendable property definition
• Same code on all implementations
• No customer specific code
• ( Or rather: customized code can be isolated)
• Integration to existing systems (ERP)
• Inherit ERP tables as entities – like in OO
sitemule.com/
How does it intergrate to an ERP solution?
Database challenges:
1.
2.
3.
Missing columns
Different fields pr records
Product families and relations
sitemule.com/
Domain Model Definition
(DMD)
Read
Read/Update
File Definitions &
Permissions
Field Properties, Values
& Presentations
DB Relations &
Affiliations
sitemule.com/
Extendable Property Definition (XPD)
DB2
XPD (DB2)
Properties
Item#
Text
Price
Type
10
Lorem ipsum dolor
750,00
A
Length: 3
Color: Red
20
Cras eu magna
650,00
B
Weight: 1.5
Active: False
30
Morbi quis arcu
550,00
B
Color: Yellow
Weight: null
40
Duis tincidunt
450,00
C
Volume: 2
50
Quisque vitae
350,00
A
Color: Blue
60
Nunc sed turpis
250,00
C
Volume: 2.5
70
Sed vehicula lacus
150,00
D
Length: 3
Active: True
Mark: X
Active: False
Mark: Y
sitemule.com/
What we came up with
We called it: DMD – Domain model definition
sitemule.com/
Pitfalls and benefits
• Deploy component changes system wide
• Streamlining customer implementations
• Time to market
• Messing with the model – messing with the
entire system
• Learning curve
• First project startup time
sitemule.com/
Next step
• Creating an ORM from our DMD/XMP
• Node.js
• Waterline (npm)
• Make it open source
sitemule.com/
Using the domain model
• Peter Nøbbe
• Working with sitemule.com for one year
• Demo: filemanager
• Questions ….