11. Metamodeling
● Meta Object Facility (MOF)
○ Proposed by OMG Metametamodel
M3:
● MOF metamodeling stack level
M2: Metamodel level
M1: Model level
M0: Real world
Object Management Group (OMG). (2002, april 3). Meta Object Facility (MOF) Specification.
12. Metamodeling
● Mappings
M3: EBNF M3: XML
M2: Programming M2: XML schema
language
M1: Code M1: XML document
M0: Real world M0: Real world
13. Model transformations
Transformation
language
written in
uses Transformation uses
Metamodel A Metamodel B
specification
instance of executed by instance of
Transformation
Model A Model B
input engine output
source target
Kurtev, I. (2008). State of the Art of QVT: A Model Transformation Language Standard. In Applications of Graph Transformations with
Industrial Relevance (Vol. 5088/2008, pp. 377‐393). Springer Berlin / Heidelberg.
14. Model transformations
M2: Transformation
Metamodel A Metamodel B
language
M1: Transformation
Model A specification Model B
M0: Transformation
engine
15. Model transformations
M3: Metametamodel
conforms to conforms to
conforms to
M2: Transformation
Metamodel A Metamodel B
language
M1: Transformation
Model A specification Model B
M0: Transformation
engine
16. Model transformations
M3: XML ● Traditional XSLT
M2: HTML theme A XSL HTML theme B
M1: Transformation
Website A specification Website B
M0: Transformation
engine
17. Model transformations
M3: XML
HTML theme A
M2: HTML theme A XSL HTML theme B
Website A Transformation
M1: Website A Website B
specification
M0: Transformation
engine
18. Diazo according to MDE
M3: XML
HTML theme A
M2: Diazo syntax HTML theme B
HTML theme B
Content site A
M1: Diazo rules Website
Theme site B
M0: Diazo
19. Diazo explained
● Two HTML sites
○ A content system
○ A theme
● One set of rules
● Regardless of pre-processors
○ Underlying dynamic systems
23. Designers
● At some point a designer delivers a design
○ Drawing (PSD)
○ Sliced / not sliced
○ HTML + CSS + JS
24. Developers
● Develop features
● Minimal / functional design
● Integrate the design into the application
○ Convert HTML pages into templates (Django)
○ Alter existing CSS (Plone)
25. Responsibility
● The designer delivers HTML + CSS
● Problem: Clearly in CSS
○ Designer is responsible
○ A developer will fix the problem
● Result:
○ Developer is responsible
30. Re-style an existing website
● The existing website works perfectly
● Possible problems when re-styling (the old
way):
○ Risk in losing functionality
○ Website is written in another language
○ No templates
31. Re-style an existing website
● Diazo only needs the HTML output of the
existing website
● The existing website remains available
● Easy re-style again with Diazo
● Multiple designs for a single website, at the
same time
55. Conclusion
● XSLT wrapper
○ XSLT reborn
● Seamless integration
○ Proxy all your websites
● Higher level of abstraction
● Fallback to regular XSLT
○ If all else fails
● State-of-the-art technology
○ Lack of tooling
○ Widely adopted in the Plone community
57. Future work
● Feature requests / bugs
○ Filter out comments in XSL
○ Easier replace rules for dynamic elements while
preserving theme attributes
○ More visual way to create rules
■ Also apart from Plone.app.theming
○ <xsl:template> doesn't work in embedded
<rules>
● Sprints
● Fork it
○ https://github.com/plone/diazo