SlideShare a Scribd company logo
1 of 15
Download to read offline
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

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

2010 06 22 omg - obeo
2010 06 22   omg - obeo2010 06 22   omg - obeo
2010 06 22 omg - obeo
Etienne Juliot
 
Android app development SEO Expert Bangladesh LTD.pdf
Android app development  SEO Expert Bangladesh LTD.pdfAndroid app development  SEO Expert Bangladesh LTD.pdf
Android app development SEO Expert Bangladesh LTD.pdf
Tasnim Jahan
 
Android app development SEO Expert Bangladesh LTD.pdf
Android app development  SEO Expert Bangladesh LTD.pdfAndroid app development  SEO Expert Bangladesh LTD.pdf
Android app development SEO Expert Bangladesh LTD.pdf
Tasnim Jahan
 
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang RamadhanCara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
Cara Tepat Menjadi iOS Developer Expert - Gilang Ramadhan
DicodingEvent
 
VIPER Architecture
VIPER ArchitectureVIPER Architecture
VIPER Architecture
Ahmed Lotfy
 

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

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

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

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