SlideShare a Scribd company logo
1 of 30
Code generation: Going all the way Rafael Chaves [email_address] http://alphasimple.com
Defining "code generation"
Code generation is everywhere ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<<< this will be our focus
Step 1: basic code generation from models
 
package banking; public class Account {     private Double balance;      public Double getBalance() {         return this.balance;     }      public void setBalance(Double balance) {         assert balance != null;         this.balance = balance;      }      public void deposit(Double amount) {         /* FILL ME IN */     }     public void withdraw(Double amount) {         /* FILL ME IN */     }  }
Step 1 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Step 2: using protected regions
package banking; public class Account {     private Double balance;      public Double getBalance() {         return this.balance;     }      public void setBalance(Double balance) {         assert balance != null;         this.balance = balance;      }      public void deposit(Double amount) {         //BEGIN-USER-CODE          this.balance = this.balance + amount;          //END-USER-CODE           }    ... }
Step 2: Protected regions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Step 3: applying the Generation Gap pattern
Source:  IBM Research
// GENERATED - DO NOT MODIFY  package banking; public class AccountCore {     protected Double balance;      public Double getBalance() {         return this.balance;     }      public void setBalance(Double balance) {         assert balance != null;         this.balance = balance;      }      public void deposit(Double amount) {         // override me      }      public void withdraw(Double amount) {         // override me      }  }
package banking; public class Account extends AccountCore {      public void deposit(Double amount) {         this.balance = this.balance + amount;      }      public void withdraw(Double amount) {         this.balance = this.balance - amount;      }  }
Step 3: generation gap ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What problem are we trying to solve again?
Enterprise software is  much  harder than it should be Problem domains are typically not very complex (information management + business rules) How come? Secondary concerns abound   persistence, concurrency, (a)synchronism, distribution, transactions, security, caching, replication, logging, ...
Two dimensions of enterprise software ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Why do we treat them the same? Business Technical ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Problem hypothesis: lack of separation between technical and domain concerns is the root of all evil
Solutions Using ordinary 3GL + reflection/AOP   Model-driven development with DSLs   Model-driven development with a GPL (like UML)
Using ordinary 3GL + reflection/AOP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Model-driven development (with DSL or GPL) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Solution hypothesis: Model-driven development with a GPL and full code generation
Models in software ,[object Object],[object Object],[object Object],[object Object],That is  not  what MDD is about
Models in MDD ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Demo: Executable modeling and full code generation with AlphaSimple
Validating hypotheses
How disappointed would you be if AlphaSimple 1.0 didn't allow you to: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Model-driven development is not about taking work (or fun) away from developers, but making their work more meaningful and valuable
Code generation: Going all the way Rafael Chaves [email_address] http://alphasimple.com

More Related Content

What's hot

Software development life cycle
Software development life cycleSoftware development life cycle
Software development life cycleNishant Srivastava
 
[2015/2016] Software development process
[2015/2016] Software development process[2015/2016] Software development process
[2015/2016] Software development processIvano Malavolta
 
Evolutionary models
Evolutionary modelsEvolutionary models
Evolutionary modelsPihu Goel
 
Interactive sketching for the early stages of user interface design
Interactive sketching for the early stages of user interface designInteractive sketching for the early stages of user interface design
Interactive sketching for the early stages of user interface designWookjae Maeng
 
The software management and engineering in the AI-oriented projects tutorial
The software management and engineering in the AI-oriented projects tutorialThe software management and engineering in the AI-oriented projects tutorial
The software management and engineering in the AI-oriented projects tutorialrpietruszkiewicz
 
50500113 spiral-model
50500113 spiral-model50500113 spiral-model
50500113 spiral-modelasidharath
 
Iterative Development: Breaking from the Waterfall
Iterative Development: Breaking from the WaterfallIterative Development: Breaking from the Waterfall
Iterative Development: Breaking from the WaterfallAndrei Navarro
 
Software Engineering Lec 2
Software Engineering Lec 2Software Engineering Lec 2
Software Engineering Lec 2Taymoor Nazmy
 
Spiral model : System analysis and design
Spiral model : System analysis and designSpiral model : System analysis and design
Spiral model : System analysis and designMitul Desai
 
Spiral Model & Requirement Validation
Spiral Model & Requirement ValidationSpiral Model & Requirement Validation
Spiral Model & Requirement ValidationAbhijat Dhawal
 
Software development slides
Software development slidesSoftware development slides
Software development slidesiarthur
 

What's hot (20)

The Spiral Model
The Spiral ModelThe Spiral Model
The Spiral Model
 
Assignment
AssignmentAssignment
Assignment
 
Software development life cycle
Software development life cycleSoftware development life cycle
Software development life cycle
 
[2015/2016] Software development process
[2015/2016] Software development process[2015/2016] Software development process
[2015/2016] Software development process
 
Evolutionary models
Evolutionary modelsEvolutionary models
Evolutionary models
 
RAD Model
RAD ModelRAD Model
RAD Model
 
Interactive sketching for the early stages of user interface design
Interactive sketching for the early stages of user interface designInteractive sketching for the early stages of user interface design
Interactive sketching for the early stages of user interface design
 
RAD Model
RAD ModelRAD Model
RAD Model
 
The software management and engineering in the AI-oriented projects tutorial
The software management and engineering in the AI-oriented projects tutorialThe software management and engineering in the AI-oriented projects tutorial
The software management and engineering in the AI-oriented projects tutorial
 
Slides chapter 3
Slides chapter 3Slides chapter 3
Slides chapter 3
 
Sohrab Waterfall Vs Rad
Sohrab Waterfall Vs RadSohrab Waterfall Vs Rad
Sohrab Waterfall Vs Rad
 
50500113 spiral-model
50500113 spiral-model50500113 spiral-model
50500113 spiral-model
 
Iterative Development: Breaking from the Waterfall
Iterative Development: Breaking from the WaterfallIterative Development: Breaking from the Waterfall
Iterative Development: Breaking from the Waterfall
 
PROTOTYPE MODEL
PROTOTYPE MODELPROTOTYPE MODEL
PROTOTYPE MODEL
 
Software Engineering Lec 2
Software Engineering Lec 2Software Engineering Lec 2
Software Engineering Lec 2
 
Prototyping
PrototypingPrototyping
Prototyping
 
Spiral model : System analysis and design
Spiral model : System analysis and designSpiral model : System analysis and design
Spiral model : System analysis and design
 
3. ch 2-process model
3. ch 2-process model3. ch 2-process model
3. ch 2-process model
 
Spiral Model & Requirement Validation
Spiral Model & Requirement ValidationSpiral Model & Requirement Validation
Spiral Model & Requirement Validation
 
Software development slides
Software development slidesSoftware development slides
Software development slides
 

Viewers also liked

11 Dogmas of model driven development
11 Dogmas of model driven development11 Dogmas of model driven development
11 Dogmas of model driven developmentRafael Chaves
 
Model Driven Prototyping
Model Driven PrototypingModel Driven Prototyping
Model Driven PrototypingRafael Chaves
 
TDC SP 2016 - Dos requisitos à implantação em uma palestra
TDC SP 2016 - Dos requisitos à implantação em uma palestraTDC SP 2016 - Dos requisitos à implantação em uma palestra
TDC SP 2016 - Dos requisitos à implantação em uma palestraRafael Chaves
 
Modernização de Sistemas de Gestão
Modernização de Sistemas de GestãoModernização de Sistemas de Gestão
Modernização de Sistemas de GestãoRafael Chaves
 
Cloudfier business pitch deck
Cloudfier business pitch deckCloudfier business pitch deck
Cloudfier business pitch deckRafael Chaves
 
TDC Floripa 2015 Desenvolvendo Sistemas de Gestão a partir de Modelos Execut...
TDC Floripa 2015  Desenvolvendo Sistemas de Gestão a partir de Modelos Execut...TDC Floripa 2015  Desenvolvendo Sistemas de Gestão a partir de Modelos Execut...
TDC Floripa 2015 Desenvolvendo Sistemas de Gestão a partir de Modelos Execut...Rafael Chaves
 
Refatorando o software corporativo
Refatorando o software corporativoRefatorando o software corporativo
Refatorando o software corporativoRafael Chaves
 
Separando arquitetura e negócios em sistemas de gestão
Separando arquitetura e negócios em sistemas de gestãoSeparando arquitetura e negócios em sistemas de gestão
Separando arquitetura e negócios em sistemas de gestãoRafael Chaves
 
TDC SP 2016 - Construindo um microserviço Java 100% funcional em 30 minutos
TDC SP 2016 - Construindo um microserviço Java 100% funcional em 30 minutosTDC SP 2016 - Construindo um microserviço Java 100% funcional em 30 minutos
TDC SP 2016 - Construindo um microserviço Java 100% funcional em 30 minutosRafael Chaves
 
MDD with Executable UML Models
MDD with Executable UML ModelsMDD with Executable UML Models
MDD with Executable UML ModelsRafael Chaves
 

Viewers also liked (11)

11 Dogmas of model driven development
11 Dogmas of model driven development11 Dogmas of model driven development
11 Dogmas of model driven development
 
Model Driven Prototyping
Model Driven PrototypingModel Driven Prototyping
Model Driven Prototyping
 
TDC SP 2016 - Dos requisitos à implantação em uma palestra
TDC SP 2016 - Dos requisitos à implantação em uma palestraTDC SP 2016 - Dos requisitos à implantação em uma palestra
TDC SP 2016 - Dos requisitos à implantação em uma palestra
 
Modernização de Sistemas de Gestão
Modernização de Sistemas de GestãoModernização de Sistemas de Gestão
Modernização de Sistemas de Gestão
 
Cloudfier business pitch deck
Cloudfier business pitch deckCloudfier business pitch deck
Cloudfier business pitch deck
 
TDC Floripa 2015 Desenvolvendo Sistemas de Gestão a partir de Modelos Execut...
TDC Floripa 2015  Desenvolvendo Sistemas de Gestão a partir de Modelos Execut...TDC Floripa 2015  Desenvolvendo Sistemas de Gestão a partir de Modelos Execut...
TDC Floripa 2015 Desenvolvendo Sistemas de Gestão a partir de Modelos Execut...
 
Refatorando o software corporativo
Refatorando o software corporativoRefatorando o software corporativo
Refatorando o software corporativo
 
Separando arquitetura e negócios em sistemas de gestão
Separando arquitetura e negócios em sistemas de gestãoSeparando arquitetura e negócios em sistemas de gestão
Separando arquitetura e negócios em sistemas de gestão
 
TDC SP 2016 - Construindo um microserviço Java 100% funcional em 30 minutos
TDC SP 2016 - Construindo um microserviço Java 100% funcional em 30 minutosTDC SP 2016 - Construindo um microserviço Java 100% funcional em 30 minutos
TDC SP 2016 - Construindo um microserviço Java 100% funcional em 30 minutos
 
MDD with Executable UML Models
MDD with Executable UML ModelsMDD with Executable UML Models
MDD with Executable UML Models
 
TextUML Toolkit
TextUML ToolkitTextUML Toolkit
TextUML Toolkit
 

Similar to Code generation

Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net FundamentalsLiquidHub
 
Introduction-to-C-Part-1.pdf
Introduction-to-C-Part-1.pdfIntroduction-to-C-Part-1.pdf
Introduction-to-C-Part-1.pdfAnassElHousni
 
Pragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWarePragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWareMichael Vorburger
 
Java Programming
Java ProgrammingJava Programming
Java ProgrammingTracy Clark
 
DAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDragan Nikolić
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and TechniquesBala Subra
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging TechniquesBala Subra
 
Vipul divyanshu mahout_documentation
Vipul divyanshu mahout_documentationVipul divyanshu mahout_documentation
Vipul divyanshu mahout_documentationVipul Divyanshu
 
Java Chapter 2 Overview.ppt
Java Chapter 2 Overview.pptJava Chapter 2 Overview.ppt
Java Chapter 2 Overview.pptMiltonMolla1
 
Java Chapter 2 Overview.ppt
Java Chapter 2 Overview.pptJava Chapter 2 Overview.ppt
Java Chapter 2 Overview.pptMiltonMolla1
 
Magento 2 Community Project - Moving from LESS to SASS
Magento 2 Community Project - Moving from LESS to SASSMagento 2 Community Project - Moving from LESS to SASS
Magento 2 Community Project - Moving from LESS to SASSBartek Igielski
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)Chiew Carol
 

Similar to Code generation (20)

Intro1
Intro1Intro1
Intro1
 
Oopp Lab Work
Oopp Lab WorkOopp Lab Work
Oopp Lab Work
 
Dot Net Fundamentals
Dot Net FundamentalsDot Net Fundamentals
Dot Net Fundamentals
 
Introduction-to-C-Part-1.pdf
Introduction-to-C-Part-1.pdfIntroduction-to-C-Part-1.pdf
Introduction-to-C-Part-1.pdf
 
Pragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWarePragmatic Model Driven Development using openArchitectureWare
Pragmatic Model Driven Development using openArchitectureWare
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Csharp dot net
Csharp dot netCsharp dot net
Csharp dot net
 
Why Gradle?
Why Gradle?Why Gradle?
Why Gradle?
 
resume
resumeresume
resume
 
DAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - IntroductionDAE Tools 1.8.0 - Introduction
DAE Tools 1.8.0 - Introduction
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
NEXiDA at OMG June 2009
NEXiDA at OMG June 2009NEXiDA at OMG June 2009
NEXiDA at OMG June 2009
 
C++Basics2022.pptx
C++Basics2022.pptxC++Basics2022.pptx
C++Basics2022.pptx
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
Vipul divyanshu mahout_documentation
Vipul divyanshu mahout_documentationVipul divyanshu mahout_documentation
Vipul divyanshu mahout_documentation
 
Java Chapter 2 Overview.ppt
Java Chapter 2 Overview.pptJava Chapter 2 Overview.ppt
Java Chapter 2 Overview.ppt
 
Java Chapter 2 Overview.ppt
Java Chapter 2 Overview.pptJava Chapter 2 Overview.ppt
Java Chapter 2 Overview.ppt
 
Magento 2 Community Project - Moving from LESS to SASS
Magento 2 Community Project - Moving from LESS to SASSMagento 2 Community Project - Moving from LESS to SASS
Magento 2 Community Project - Moving from LESS to SASS
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Code generation

  • 1. Code generation: Going all the way Rafael Chaves [email_address] http://alphasimple.com
  • 3.
  • 4. Step 1: basic code generation from models
  • 5.  
  • 6. package banking; public class Account {     private Double balance;     public Double getBalance() {         return this.balance;     }     public void setBalance(Double balance) {         assert balance != null;         this.balance = balance;     }     public void deposit(Double amount) {         /* FILL ME IN */     }     public void withdraw(Double amount) {         /* FILL ME IN */     } }
  • 7.
  • 8. Step 2: using protected regions
  • 9. package banking; public class Account {     private Double balance;     public Double getBalance() {         return this.balance;     }     public void setBalance(Double balance) {         assert balance != null;         this.balance = balance;     }     public void deposit(Double amount) {         //BEGIN-USER-CODE         this.balance = this.balance + amount;         //END-USER-CODE         }    ... }
  • 10.
  • 11. Step 3: applying the Generation Gap pattern
  • 12. Source: IBM Research
  • 13. // GENERATED - DO NOT MODIFY package banking; public class AccountCore {     protected Double balance;     public Double getBalance() {         return this.balance;     }     public void setBalance(Double balance) {         assert balance != null;         this.balance = balance;     }     public void deposit(Double amount) {         // override me     }     public void withdraw(Double amount) {         // override me     } }
  • 14. package banking; public class Account extends AccountCore {     public void deposit(Double amount) {         this.balance = this.balance + amount;     }     public void withdraw(Double amount) {         this.balance = this.balance - amount;     } }
  • 15.
  • 16. What problem are we trying to solve again?
  • 17. Enterprise software is much harder than it should be Problem domains are typically not very complex (information management + business rules) How come? Secondary concerns abound persistence, concurrency, (a)synchronism, distribution, transactions, security, caching, replication, logging, ...
  • 18.
  • 19. Problem hypothesis: lack of separation between technical and domain concerns is the root of all evil
  • 20. Solutions Using ordinary 3GL + reflection/AOP   Model-driven development with DSLs   Model-driven development with a GPL (like UML)
  • 21.
  • 22.
  • 23. Solution hypothesis: Model-driven development with a GPL and full code generation
  • 24.
  • 25.
  • 26. Demo: Executable modeling and full code generation with AlphaSimple
  • 28.
  • 29. Model-driven development is not about taking work (or fun) away from developers, but making their work more meaningful and valuable
  • 30. Code generation: Going all the way Rafael Chaves [email_address] http://alphasimple.com

Editor's Notes

  1. code generator = a program that produces other programs
  2. Code generation is just a tool   Productivity   Automate what can be automated    What problem does it solve?   To extract architectural decisions as reusable artifacts   To reduce time to market   To ensure consistency (developers like to pretend they are robots)
  3. Code generation is just a tool   Productivity   Automate what can be automated    What problem does it solve?   To extract architectural decisions as reusable artifacts   To reduce time to market   To ensure consistency (developers like to pretend they are robots)