SlideShare a Scribd company logo
Visitors Framework
Generator
Computer Science Department
University of York
Adolfo Sánchez-Barbudo Herrera (asbh500@york.ac.uk)
Agenda
● Visitor Pattern
● Visitors Framework Generator
○ Overview
○ Model traversals
○ Visitors framework
○ Example
● Visitors in Eclipse OCL/QVTd
● Conclusions
2
Visitor Pattern
● OOP design pattern
● Separate structure from behaviour
2
Visitor Pattern II
● Add/Remove/Modify/Replace behaviour
without changing structure.
○ Ideal when working with third party structures.
3
Visitor Pattern III
● Main disadvantage
○ It’s not the ideal pattern with evolving structures.
4
Visitor Pattern IV
● Visitors applied to modeling languages
5
Visitors Framework Generator
● VFG Overview
VFG
Ecore
Model
Visitable
Model
Implementation
Visitor/
Visitable
Interfaces
Abstract
Visitors
Impl.
Model-Specific Visitors
Framework
Manual
Visitors
Generated
Visitors
More
MDE-based
generators
Manual Generated
6
Visitor Generation Framework II
● Visitable implementation from Ecore MM
7
Visitor Generation Framework III
● Ecore MM specific visitors framework
1. Visitor/Visitable
Interfaces
2. Default Abstract
Implementations
● Contextful Visitor
● Null Visitor
● Extending Visitor
● Delegating Visitor
● ...
8
Model traversals
9
Model Traverals II
● Traversal in accept method
○ Doomed to the same traversal algorithm.
10
● Traversal in client code
○ Ok, but traversal is part of the algorithm
● Traversal in visitors
○ Best, but more patterns for reuse sake
Traversal
Visitor
Action
Visitors Framework
11
Visitors Framework II
12
Visitors Framework III
13
Example
14
Visitors Usage in Eclipse OCL/QVTd
● Eclipse OCL
○ 7 Ecore metamodels
○ 48 generated abstract visitors
○ 67 manual visitors
● Eclipse QVTd
○ 10 Ecore metamodels
○ 89 generated abstract visitors
○ 76 manual visitors
15
Conclusions
● VFG:
○ Automatically brings the benefits of the visitor
pattern to Ecore-based models
○ Automatically creates a MM-specific framework to
leverage visitors creation
○ It´s a convenient practice when your models have
unclear behaviour or an evolving one
○ It´s a key practice to let clients add their specific
behaviour algorithms
○ A key tool in the development of Eclipse OCL/QVTd
16
Thank you very much
Questions ?
doubts, feedback, enquiries, etc. to asbh500@york.ac.uk

More Related Content

Similar to Visitors Framework Generator

#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery
iloveigloo
 
Quill slides-www2013
Quill slides-www2013Quill slides-www2013
Quill slides-www2013
Vivian Motti
 
Quill slides-www2013
Quill slides-www2013Quill slides-www2013
Quill slides-www2013
Vivian Motti
 
Cleaning up Sitecore Controllers
Cleaning up Sitecore ControllersCleaning up Sitecore Controllers
Cleaning up Sitecore Controllers
Tobias Studer
 
Engineering Frontends
Engineering FrontendsEngineering Frontends
Engineering Frontends
Vladimir Milojević
 
Introduction to building wireframes
Introduction to building wireframesIntroduction to building wireframes
Introduction to building wireframes
Hong Qu
 
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Ofer Cohen
 
Dissecting SysML v2.pptx
Dissecting SysML v2.pptxDissecting SysML v2.pptx
Dissecting SysML v2.pptx
Elizabeth Steiner
 
Scalable Model Views over Heterogeneous Modeling Technologies and Resources -...
Scalable Model Views over Heterogeneous Modeling Technologies and Resources -...Scalable Model Views over Heterogeneous Modeling Technologies and Resources -...
Scalable Model Views over Heterogeneous Modeling Technologies and Resources -...
Hugo Bruneliere
 
Jab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealedJab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealed
Ofer Cohen
 
EasyMorphicGUI
EasyMorphicGUIEasyMorphicGUI
EasyMorphicGUI
ESUG
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
lolopetit
 
Dot Net Training in Chennai
Dot Net Training in ChennaiDot Net Training in Chennai
Dot Net Training in Chennai
jeevanfita
 
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Manuel Rivero
 
Effects, Coeffects & Subscriptions: a pit of success for SPAs
Effects, Coeffects & Subscriptions: a pit of success for SPAsEffects, Coeffects & Subscriptions: a pit of success for SPAs
Effects, Coeffects & Subscriptions: a pit of success for SPAs
Manuel Rivero
 
JAB14 Honey I shrunk the code
JAB14 Honey I shrunk the codeJAB14 Honey I shrunk the code
JAB14 Honey I shrunk the code
CB Team @ Joomlapolis
 
Towards Scalable Model Views on Heterogeneous Model Resources - MODELS 2018 @...
Towards Scalable Model Views on Heterogeneous Model Resources - MODELS 2018 @...Towards Scalable Model Views on Heterogeneous Model Resources - MODELS 2018 @...
Towards Scalable Model Views on Heterogeneous Model Resources - MODELS 2018 @...
Hugo Bruneliere
 
Openflexo's infrastructure - exhibitor - @models2012
Openflexo's infrastructure - exhibitor - @models2012Openflexo's infrastructure - exhibitor - @models2012
Openflexo's infrastructure - exhibitor - @models2012
Openflexo
 
Drools & jBPM Workshop London 2013
Drools & jBPM Workshop London 2013Drools & jBPM Workshop London 2013
Drools & jBPM Workshop London 2013
Mauricio (Salaboy) Salatino
 
Portlet Bridge
Portlet BridgePortlet Bridge
Portlet Bridge
Miro Cupak
 

Similar to Visitors Framework Generator (20)

#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery#7 - Client-side web apps, MVC and jQuery
#7 - Client-side web apps, MVC and jQuery
 
Quill slides-www2013
Quill slides-www2013Quill slides-www2013
Quill slides-www2013
 
Quill slides-www2013
Quill slides-www2013Quill slides-www2013
Quill slides-www2013
 
Cleaning up Sitecore Controllers
Cleaning up Sitecore ControllersCleaning up Sitecore Controllers
Cleaning up Sitecore Controllers
 
Engineering Frontends
Engineering FrontendsEngineering Frontends
Engineering Frontends
 
Introduction to building wireframes
Introduction to building wireframesIntroduction to building wireframes
Introduction to building wireframes
 
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
 
Dissecting SysML v2.pptx
Dissecting SysML v2.pptxDissecting SysML v2.pptx
Dissecting SysML v2.pptx
 
Scalable Model Views over Heterogeneous Modeling Technologies and Resources -...
Scalable Model Views over Heterogeneous Modeling Technologies and Resources -...Scalable Model Views over Heterogeneous Modeling Technologies and Resources -...
Scalable Model Views over Heterogeneous Modeling Technologies and Resources -...
 
Jab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealedJab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealed
 
EasyMorphicGUI
EasyMorphicGUIEasyMorphicGUI
EasyMorphicGUI
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
 
Dot Net Training in Chennai
Dot Net Training in ChennaiDot Net Training in Chennai
Dot Net Training in Chennai
 
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
 
Effects, Coeffects & Subscriptions: a pit of success for SPAs
Effects, Coeffects & Subscriptions: a pit of success for SPAsEffects, Coeffects & Subscriptions: a pit of success for SPAs
Effects, Coeffects & Subscriptions: a pit of success for SPAs
 
JAB14 Honey I shrunk the code
JAB14 Honey I shrunk the codeJAB14 Honey I shrunk the code
JAB14 Honey I shrunk the code
 
Towards Scalable Model Views on Heterogeneous Model Resources - MODELS 2018 @...
Towards Scalable Model Views on Heterogeneous Model Resources - MODELS 2018 @...Towards Scalable Model Views on Heterogeneous Model Resources - MODELS 2018 @...
Towards Scalable Model Views on Heterogeneous Model Resources - MODELS 2018 @...
 
Openflexo's infrastructure - exhibitor - @models2012
Openflexo's infrastructure - exhibitor - @models2012Openflexo's infrastructure - exhibitor - @models2012
Openflexo's infrastructure - exhibitor - @models2012
 
Drools & jBPM Workshop London 2013
Drools & jBPM Workshop London 2013Drools & jBPM Workshop London 2013
Drools & jBPM Workshop London 2013
 
Portlet Bridge
Portlet BridgePortlet Bridge
Portlet Bridge
 

Recently uploaded

132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
5g-5G SA reg. -standalone-access-registration.pdf
5g-5G SA reg. -standalone-access-registration.pdf5g-5G SA reg. -standalone-access-registration.pdf
5g-5G SA reg. -standalone-access-registration.pdf
devtomar25
 
Introduction to verilog basic modeling .ppt
Introduction to verilog basic modeling   .pptIntroduction to verilog basic modeling   .ppt
Introduction to verilog basic modeling .ppt
AmitKumar730022
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
Gas agency management system project report.pdf
Gas agency management system project report.pdfGas agency management system project report.pdf
Gas agency management system project report.pdf
Kamal Acharya
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
Roger Rozario
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
upoux
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
Dwarkadas J Sanghvi College of Engineering
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 
Bayesian Decision Theory details ML.pptx
Bayesian Decision Theory details ML.pptxBayesian Decision Theory details ML.pptx
Bayesian Decision Theory details ML.pptx
amrita chaturvedi
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
ijaia
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
mahaffeycheryld
 
5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf
AlvianRamadhani5
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 

Recently uploaded (20)

132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
5g-5G SA reg. -standalone-access-registration.pdf
5g-5G SA reg. -standalone-access-registration.pdf5g-5G SA reg. -standalone-access-registration.pdf
5g-5G SA reg. -standalone-access-registration.pdf
 
Introduction to verilog basic modeling .ppt
Introduction to verilog basic modeling   .pptIntroduction to verilog basic modeling   .ppt
Introduction to verilog basic modeling .ppt
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
Gas agency management system project report.pdf
Gas agency management system project report.pdfGas agency management system project report.pdf
Gas agency management system project report.pdf
 
Transformers design and coooling methods
Transformers design and coooling methodsTransformers design and coooling methods
Transformers design and coooling methods
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 
Bayesian Decision Theory details ML.pptx
Bayesian Decision Theory details ML.pptxBayesian Decision Theory details ML.pptx
Bayesian Decision Theory details ML.pptx
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
Generative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdfGenerative AI Use cases applications solutions and implementation.pdf
Generative AI Use cases applications solutions and implementation.pdf
 
5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf5G Radio Network Througput Problem Analysis HCIA.pdf
5G Radio Network Througput Problem Analysis HCIA.pdf
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 

Visitors Framework Generator

  • 1. Visitors Framework Generator Computer Science Department University of York Adolfo Sánchez-Barbudo Herrera (asbh500@york.ac.uk)
  • 2. Agenda ● Visitor Pattern ● Visitors Framework Generator ○ Overview ○ Model traversals ○ Visitors framework ○ Example ● Visitors in Eclipse OCL/QVTd ● Conclusions 2
  • 3. Visitor Pattern ● OOP design pattern ● Separate structure from behaviour 2
  • 4. Visitor Pattern II ● Add/Remove/Modify/Replace behaviour without changing structure. ○ Ideal when working with third party structures. 3
  • 5. Visitor Pattern III ● Main disadvantage ○ It’s not the ideal pattern with evolving structures. 4
  • 6. Visitor Pattern IV ● Visitors applied to modeling languages 5
  • 7. Visitors Framework Generator ● VFG Overview VFG Ecore Model Visitable Model Implementation Visitor/ Visitable Interfaces Abstract Visitors Impl. Model-Specific Visitors Framework Manual Visitors Generated Visitors More MDE-based generators Manual Generated 6
  • 8. Visitor Generation Framework II ● Visitable implementation from Ecore MM 7
  • 9. Visitor Generation Framework III ● Ecore MM specific visitors framework 1. Visitor/Visitable Interfaces 2. Default Abstract Implementations ● Contextful Visitor ● Null Visitor ● Extending Visitor ● Delegating Visitor ● ... 8
  • 11. Model Traverals II ● Traversal in accept method ○ Doomed to the same traversal algorithm. 10 ● Traversal in client code ○ Ok, but traversal is part of the algorithm ● Traversal in visitors ○ Best, but more patterns for reuse sake Traversal Visitor Action
  • 16. Visitors Usage in Eclipse OCL/QVTd ● Eclipse OCL ○ 7 Ecore metamodels ○ 48 generated abstract visitors ○ 67 manual visitors ● Eclipse QVTd ○ 10 Ecore metamodels ○ 89 generated abstract visitors ○ 76 manual visitors 15
  • 17. Conclusions ● VFG: ○ Automatically brings the benefits of the visitor pattern to Ecore-based models ○ Automatically creates a MM-specific framework to leverage visitors creation ○ It´s a convenient practice when your models have unclear behaviour or an evolving one ○ It´s a key practice to let clients add their specific behaviour algorithms ○ A key tool in the development of Eclipse OCL/QVTd 16
  • 18. Thank you very much Questions ? doubts, feedback, enquiries, etc. to asbh500@york.ac.uk