Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Telosys project booster Paris Open Source Summit 2019


Published on

How to boost your project with Telosys code generator

Published in: Engineering
  • Be the first to comment

Telosys project booster Paris Open Source Summit 2019

  1. 1. Telosys project booster @telosys December 11 2019
  2. 2. Who’s speaking ? By day Senior architect at @ltguerinLaurent Guérin Open Source supporter Passionate by software engineering and development industrialization By night Creator of code generator
  3. 3. @telosys 3 The problem… In all projects (whatever the language or framework) developers spend a lot of time coding repetitive and uninteresting portions of code it costs a lot and it does not have any added value !
  4. 4. @telosys 4 Impact of entities domain class, web page, D.A.O., REST controllers, database table, tests, etc. N times…N entities The loss of time is proportional to the number of entities managed by the project =>
  5. 5. @telosys 5 Code generation can help Platform ( Java EE, PHP, Python, …) Application Framework 1 Framework 2 Repetitive code Repetitive code parts can be generated. Specific code with value added Generator Developer
  6. 6. @telosys 6 The tool A code generator created for the developers
  7. 7. @telosys 7 Philosophy of Telosys Keep it simple and pragmatic
  8. 8. @telosys 8 Telosys is light and non intrusive It's just a development accelerator (lightweight tool) It does not require a strategic choice on the part of the company You can start using it in minutes (very short learning curve) You can remove it after use (the generated code is completely independent of the tool) Lightness and independence
  9. 9. @telosys 9 Telosys is open and customizable (not a “black box”) ? You can adapt the models and the code templates The resulting code is exactly what you want !
  10. 10. @telosys 10 Telosys offers 2 tools Eclipse Plugin C L I with VSCode & Atom extensions
  11. 11. @telosys 11 Abstract model DSL model How it works ? Database model Step 1 : Define your entities in a model init/update Telosys offers 2 types of models : « DB model » A model created from a relational database schema (you can customize it after creation) « DSL model » A model created from scratch, based on text files with a very simple grammar
  12. 12. @telosys 12 What does a model look like? Entity in « DB model » Entity in « DSL model »
  13. 13. @telosys 13 Project templates How it works ? Standard templates GitHub Download predefined standard templates Creating/customizing templates for specific cases Step 2 : Download (or create) templates Each template is designed to generate a certain type of file (DAO, controller, etc.) in a target language (Java, PHP, etc.)
  14. 14. @telosys 14 What does a template look like? Model objects “entities”, “attributes”, etc. Environment objects Velocity Template Language (VTL) • Predefined objects : $, ${…} • Directives : #set, #if, #foreach, … • Comments : ## #* .. *#
  15. 15. @telosys 15 How it works ? Project templatesGenerator Step 3 : Launch code generation Generated code
  16. 16. @telosys 16 What can we generate? Any type of "text file“  that means any language : Java, Python, JavaScript, PHP, Golang, XML, JSP, Scala, SQL, HTML, C#, TypeScript, etc. 1 entity N templates N targets N entities 1 template 1 target model (all entities with links) + variables 1 bean 1 controller 1 web page 1 list a template can generate N files (1 for each entity) or 1 single file
  17. 17. @telosys 17 Concept of “bundle” Templates are organized in “bundles” You can choose which part of the application you will generate Bundle « A » Bundle « B » Bundle « C » Bundle « D » Bundle « E »
  18. 18. @telosys 18 Significant gains It can save many days of workload The productivity gain is maximum when reusing existing templates Application generated code "handmade“ code Very limited cost : from zero to few days (only the workload to create or customize the templates) Find a balance time gained time invested in models & templates
  19. 19. Demos
  20. 20. @telosys 20 Demo #1 REST Controllers Persistence Interfaces Persistence Implem. Records ( entities ) HTTP client { REST : API } SoapUI Templates bundle Templates bundle Templates bundle Database model
  21. 21. @telosys 21 Demo #2 Web browser Controllers Services Views D.A.O. Entities DSL model Templates bundle Templates bundle SQL
  22. 22. @telosys 22 Stay tuned ! @telosys
  23. 23. @telosys 23 Links Publications : • DZone : guerin • Modeling languages : of-lightweight-model-for-code-generation/ Source code / GitHub : • Eclipse plugin : • CLI tool : • Bundles of templates : Eclipse Marketplace : • stars are welcome ;-)