SlideShare a Scribd company logo
7
Most read
9
Most read
12
Most read
Acceleo Code Generation
                              Let's start with an Android example


          Jonathan Musset - jonathan.musset@obeo.fr
          Obeo




                                                                    1
Acceleo Code Generation
                                                          Let's start with an Android example




  Acceleo : what's that new code generation engine?

        Meta-model and templates based technology

        Implementation of the Model To Text OMG standard (MTL)

        Eclipse Modelling / M2T project

        Pragmatic approach – How to start from example?




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                              Let's start with an Android example




  This is a Quick Tutorial – My goals

        Beginners will see a simple but concrete case-study

        Acceleo addicts will discover some new killing features

        Android experts will learn enough of the basics to be able to create advanced
        code generator in a few days. As you will see, I'm not an Android expert...




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                                  Let's start with an Android example




  Prototype based approach – Starting from an example

        A classic example of Android application : « MyContacts »

        « We would like to be able to fully generate the same kind of application »


                                                         MyContacts




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                                   Let's start with an Android example




  The prototype sources and the model

        Different kinds of sources to be generated!
                Java UI, Java DB, XML, properties...



        The model must contain all the specific settings of the application
                Android Activity, Entity Fields...



        One model element → « N » generated text parts




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                           Let's start with an Android example




  Initialize the Android code generation project

        An MTL file for each kind of generated file




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                             Let's start with an Android example




  Initialize the workflow – The main entry point

        An MTL file that calls the other ones... (Mentioned in the OMG specification)

        Java / MWE / ANT? Call the Java Standalone API to run the code generation!




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                Let's start with an Android example




  Editing the code generator – Quick replacement




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                Let's start with an Android example




  Editing the code generator – Quick hierarchy tree




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                Let's start with an Android example




  Run and test the generated version of the prototype

                                            MyContacts




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                Let's start with an Android example




  Run on other models to create new applications...




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                               Let's start with an Android example




  A little bit about incremental generation

        « My web service is conserved when I generate the application again »

        → Defining specific coding zones with user tags [protected]

        → Using JMerge with the @generated annotation




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                            Let's start with an Android example




  Workbench Acceleo views – Edit and maintain!

        The « Result View » to show how the text and the model are synchronized

        The « Overrides View » to override an existing template behavior

        The « Patterns View » to define your own completion proposal




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                                               Let's start with an Android example




  Conclusion

        Now you can make a complete Android code generator (more widgets...)

        We plan to have Acceleo graduate along with the Helios release

        Version 3.0 – The last stable release out of Eclipse was 2.x




© Copyright Obeo | 22 March, 2010
Acceleo Code Generation
                                 Let's start with an Android example


          Jonathan Musset - jonathan.musset@obeo.fr
          Obeo




                                                                       15

More Related Content

PDF
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
ODP
Acceleo Day - Acceleo Mtl Code Generation
PPT
Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...
PDF
Clarity in Documentation
PPT
G W T(2)
PPT
Eclipse EDT - EGL Inner Workings - June 2011
PDF
Bpmn 2.0 Eclipse OMG/Symposium
PDF
Acceleo Code Generation
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Acceleo Day - Acceleo Mtl Code Generation
Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...
Clarity in Documentation
G W T(2)
Eclipse EDT - EGL Inner Workings - June 2011
Bpmn 2.0 Eclipse OMG/Symposium
Acceleo Code Generation

Similar to Acceleo - Let's start with an Android example (20)

PPTX
Telerik Kendo UI vs. AngularJS
PDF
Acing architecture
PPTX
Cloud Computing: IC4 Cloud On-Boarding Clinic, DCU
PPTX
Whats New in Visual Studio 2019
PPTX
Micro-Frontends JSVidCon
PPTX
Conference DotJS 2015 Paris review
PPT
2010 06 22 omg - obeo
PPTX
The best way to create and deploy web apps with full-stack type safety - Mete...
PPT
Owasp Code Crawler Presentation
PDF
IoT and Maker Crossover (IMCO) Conference 2015
PDF
Android app development SEO Expert Bangladesh LTD.pdf
PDF
Android app development SEO Expert Bangladesh LTD.pdf
PDF
MoDisco Eclipse-OMG Symp 2010
PPTX
What is MVVM?
PPTX
PDF
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
PDF
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. Molina
PPTX
How to Solve Singleton Error in the Odoo 17
PPTX
VIPER Architecture
PDF
Tutorial introduction to OSGi
Telerik Kendo UI vs. AngularJS
Acing architecture
Cloud Computing: IC4 Cloud On-Boarding Clinic, DCU
Whats New in Visual Studio 2019
Micro-Frontends JSVidCon
Conference DotJS 2015 Paris review
2010 06 22 omg - obeo
The best way to create and deploy web apps with full-stack type safety - Mete...
Owasp Code Crawler Presentation
IoT and Maker Crossover (IMCO) Conference 2015
Android app development SEO Expert Bangladesh LTD.pdf
Android app development SEO Expert Bangladesh LTD.pdf
MoDisco Eclipse-OMG Symp 2010
What is MVVM?
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
ACM SIGCHI EICS-2019 Keynote. Quid, Pedro J. Molina
How to Solve Singleton Error in the Odoo 17
VIPER Architecture
Tutorial introduction to OSGi
Ad

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Encapsulation theory and applications.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPT
Teaching material agriculture food technology
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Encapsulation_ Review paper, used for researhc scholars
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
Unlocking AI with Model Context Protocol (MCP)
NewMind AI Weekly Chronicles - August'25-Week II
Agricultural_Statistics_at_a_Glance_2022_0.pdf
1. Introduction to Computer Programming.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Diabetes mellitus diagnosis method based random forest with bat algorithm
Encapsulation theory and applications.pdf
Empathic Computing: Creating Shared Understanding
Assigned Numbers - 2025 - Bluetooth® Document
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Machine learning based COVID-19 study performance prediction
Teaching material agriculture food technology
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Ad

Acceleo - Let's start with an Android example

  • 1. Acceleo Code Generation Let's start with an Android example Jonathan Musset - jonathan.musset@obeo.fr Obeo 1
  • 2. Acceleo Code Generation Let's start with an Android example Acceleo : what's that new code generation engine? Meta-model and templates based technology Implementation of the Model To Text OMG standard (MTL) Eclipse Modelling / M2T project Pragmatic approach – How to start from example? © Copyright Obeo | 22 March, 2010
  • 3. Acceleo Code Generation Let's start with an Android example This is a Quick Tutorial – My goals Beginners will see a simple but concrete case-study Acceleo addicts will discover some new killing features Android experts will learn enough of the basics to be able to create advanced code generator in a few days. As you will see, I'm not an Android expert... © Copyright Obeo | 22 March, 2010
  • 4. Acceleo Code Generation Let's start with an Android example Prototype based approach – Starting from an example A classic example of Android application : « MyContacts » « We would like to be able to fully generate the same kind of application » MyContacts © Copyright Obeo | 22 March, 2010
  • 5. Acceleo Code Generation Let's start with an Android example The prototype sources and the model Different kinds of sources to be generated! Java UI, Java DB, XML, properties... The model must contain all the specific settings of the application Android Activity, Entity Fields... One model element → « N » generated text parts © Copyright Obeo | 22 March, 2010
  • 6. Acceleo Code Generation Let's start with an Android example Initialize the Android code generation project An MTL file for each kind of generated file © Copyright Obeo | 22 March, 2010
  • 7. Acceleo Code Generation Let's start with an Android example Initialize the workflow – The main entry point An MTL file that calls the other ones... (Mentioned in the OMG specification) Java / MWE / ANT? Call the Java Standalone API to run the code generation! © Copyright Obeo | 22 March, 2010
  • 8. Acceleo Code Generation Let's start with an Android example Editing the code generator – Quick replacement © Copyright Obeo | 22 March, 2010
  • 9. Acceleo Code Generation Let's start with an Android example Editing the code generator – Quick hierarchy tree © Copyright Obeo | 22 March, 2010
  • 10. Acceleo Code Generation Let's start with an Android example Run and test the generated version of the prototype MyContacts © Copyright Obeo | 22 March, 2010
  • 11. Acceleo Code Generation Let's start with an Android example Run on other models to create new applications... © Copyright Obeo | 22 March, 2010
  • 12. Acceleo Code Generation Let's start with an Android example A little bit about incremental generation « My web service is conserved when I generate the application again » → Defining specific coding zones with user tags [protected] → Using JMerge with the @generated annotation © Copyright Obeo | 22 March, 2010
  • 13. Acceleo Code Generation Let's start with an Android example Workbench Acceleo views – Edit and maintain! The « Result View » to show how the text and the model are synchronized The « Overrides View » to override an existing template behavior The « Patterns View » to define your own completion proposal © Copyright Obeo | 22 March, 2010
  • 14. Acceleo Code Generation Let's start with an Android example Conclusion Now you can make a complete Android code generator (more widgets...) We plan to have Acceleo graduate along with the Helios release Version 3.0 – The last stable release out of Eclipse was 2.x © Copyright Obeo | 22 March, 2010
  • 15. Acceleo Code Generation Let's start with an Android example Jonathan Musset - jonathan.musset@obeo.fr Obeo 15