SlideShare a Scribd company logo
1 of 17
Increase your
performance and code
quality
scaffolding and MDD
Vesin Dusko:
vesindusko@gmail.com
@vesindusko
Reality check
• By 2019 there will be 26.4 million software
developers, it is the fastest growing profession in
the world with 46% growth.
• But that is not nearly enough. In Germany alone
there are 40000 unfulfilled positions at this moment
• IT is the fastest changing industry
• Startups and agile pose a new challenge
Better yourself
• master things that you do every day (language,
frameworks, best practices,IDE, etc.)
• read, learn, experiment with new things
• centralize your knowledge, make it reusable
(libraries, frameworks, tools, scripts, plugins…)
• impostor syndrome
• repeat until you are in the business
Automate yourself
• No matter how good you are, you have only
two hands and one keyboard.
• Automate your processes (build,
deployment, etc. )
• Available scaffolding tools… (Spring Roo,
Ruby on Rails, JHipster, Bower, Gulp,
Grails, etc)
• Can we do more? Refuse to do repetitive
work!
MDE, MDD & MDA
• “Model-driven engineering (MDE) is a software development
methodology which focuses on creating and exploiting domain models,
which are conceptual models of all the topics related to a specific
problem.”
• “Model-driven development (MDD) is an approach to software
development where extensive models are created before source code is
written”
• “Model-driven architecture (MDA) is a software design approach for the
development of software systems. It provides a set of guidelines for the
structuring of specifications, which are expressed as models.”
• Model - “The model-driven architecture approach defines system
functionality using a platform-independent model (PIM) using an
appropriate domain-specific language (DSL)”
• Generator - “Code generation means that the user abstractly models
solutions, which are connoted by some model data, and then an
automated tool derives from the models parts or all of the source code for
the software system.”
drytools
don’t repeat yourself
• Multi module project generator
• Written in Scala
• drydsl (readable, optimal …)
• dryvalidation
• drypostprocessor
• drygenerators (maintainable, customisable…)
drytools DSL
project_name project[settings](
service_name server[settings](
property_name property[settings]…
model_name model[settings](
properties …
uniques and indexes …
queries …)
api_name api[api settings](
endpoint_name endpoint[settings] …)
)…
web_app_name web[settings] …
android_app_name android[settings] …
ios_app_name ios[settings] …
)
Models
Role enum(USER, MODERATOR, ADMIN)
User model [type sql](
id long(primary key)
username text (min 6, max 20, unique)
passwordHash text (min 128, max 128)
firstName text (min 2, max 60)
lastName text (min 2, max 60)
gender enum(MALE, FEMALE)
role Role (default USER)
birthDate optional date
findAll from User
findById from User where User.Id == id
findByUsername from User where User.username == username
findByFirstName from User where User.firstName == firstName
findByLastName from User where User.lastName == lastName
findByGender from User where User.gender == gender
findByRole from User where User.gender == gender
findMaleUsers from User where User.gender == “MALE”
findAdminUser from User where User.role == “ADMIN”
findByName from User where User.firstName like name or User.lastName like name or
User.userName == name
)
ModelsRole enum(USER, MODERATOR, ADMIN)
User model (
username text (min 6, max 20, unique)
passwordHash text (min 128, max 128)
firstName text (min 2, max 60)
lastName text(min 2, max 60)
gender enum(MALE, FEMALE)
role Role (default USER)
birthDate optional date
findMaleUsers from User where User.gender == “MALE”
findAdminUser from User where User.role == “ADMIN”
findByName from User where User.firstName like name or User.lastName like name or
User.userName == name
)
Role enum(USER, MODERATOR, ADMIN)
User model (
username text (min 6, max 20, unique)
passwordHash text (min 128, max 128)
firstName text (min 2, max 60)
lastName text (min 2, max 60)
gender enum (MALE, FEMALE)
role Role (default USER)
birthDate optional date
findMaleUsers from User where User.gender ==
“MALE”
findAdminUser from User where User.role ==
“ADMIN”
findByName from User where User.firstName like
name or User.lastName like name or User.userName
== name
)
Owner model (
user User (unique)
findByUser from Owner where Owner.user == user
findByIdWithUser from Owner with Vet.user from
Owner
findPetsByOwnerId min Pet where Pet.owner from
Pet where Pet.owner == owner
)
Vet model (
user User (unique)
findByUser from Vet where Vet == user
findByIdWithUser from Vet with Vet.user from Vet
findVisits from Visits where Visit.vet == vet
)
PetType enum (DOG, CAT)
Pet (
owner Owner
type PetType
birthDate date
description text (max 1024)
)
Visit (
Vet vet
Pet pet
date date
note text[max 1024]
findByIdWithVetAndPet from Visit with Visit.vet
from Visit with Visit.pet from Visit where Vet.id == id
)
Middleware
• Services
• Security
• Simple security -security (principal User)
• Role security - security (principal User, role Role)
• Permission based security - security (principal User, action UserAction)
• SignIn
• Username - signIn (username)
• Email - signIn (email)
• Google - signIn (google)
• Facebook - signIn (facebook)
APIsUserApi api(
adminUsers find [query User.adminUsers, secured ADMIN, rest "/admins"]
users find [query User.findAll, response (User.id, User.email, User.firstName, User.lastName), secured, rest
"/users"]
nonAdmins find [from User where User.role != "ADMIN", secured, rest ]
user crud [model User, secured ADMIN, rest]
)
OwnerApi api(
owner crud [model Owner, secured ADMIN](
user.firstName [save default "Petar", update default "Pera"]
user.lastName [min 30, max 40]
address [visible (create, read) ]
user.email
notes optional text[min 2, max 10]
)
owners find [from Owner with Owner.user as User from Owner where optional Owner.address like address
response (Owner.id, User.email, User.firstName, User.lastName), secured ADMIN, rest “/owner]
ownersPets find [ from Owner with Pet.owner from Owner with Owner.user from Owner where Owner.id ==
ownerId response (Pet.id, Owner.id, Pet.name), secured, rest “/owner/:ownerId/pets"]
……
APIs…
myPets find [from Owner with Pet.owner from Owner with Owner.user from Owner where Owner.user ==
principal, rest, secured]
PetWithOwnerName dto(
Pet.name
Pet.petType
User.firstName
User.lastName
firstPet enum(YES, NO)
)
PetDto dto(Pet.id, Pet.name)
VetWithSpecialties dto(
User.firstName
specialties list VetSpeciality.name
pets list PetDto
)
vetsWithSpecialties custom [request PetWithOwnerName, response list VetWithSpecialties, secured
ADMIN, get "/vets"]
vetInfo custom [request dto(Vet.id), response VetWithSpecialties, secured, get "/vet/:id", transactional
sql]
)
Clients
• web client (AngularJS, Bootstrap, Yeoman,
Grunt, Bower) with ApiCaller and ApiMock
• iOS client with ApiCaller and ApiMock
• Android client with ApiCaller and ApiMock
What's next?
• New DSL features
• Push Api
• Web sockets
• UI components
• Android and iOs notifications
• Big data analysis with spark
Pros/Cons
• Pros
• speed up to 5x
• best practices
• architecture as a code
• refactoring
• global improvements
• learning tool
• we are in control
• Cons
• controversial technique
• hard to implement
• hard to balance
• maintenance
• not suitable for every case
Thank you.
Questions?

More Related Content

Viewers also liked

Performance tips for Symfony2 & PHP
Performance tips for Symfony2 & PHPPerformance tips for Symfony2 & PHP
Performance tips for Symfony2 & PHPMax Romanovsky
 
Держим руку на пульсе проекта. Мониторинг PHP-приложений
Держим руку на пульсе проекта. Мониторинг PHP-приложенийДержим руку на пульсе проекта. Мониторинг PHP-приложений
Держим руку на пульсе проекта. Мониторинг PHP-приложенийMax Romanovsky
 
Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5Leonardo Proietti
 
Asynchronous processing with PHP and Symfony2. Do it simple
Asynchronous processing with PHP and Symfony2. Do it simpleAsynchronous processing with PHP and Symfony2. Do it simple
Asynchronous processing with PHP and Symfony2. Do it simpleKirill Chebunin
 
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupKacper Gunia
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricksJavier Eguiluz
 

Viewers also liked (6)

Performance tips for Symfony2 & PHP
Performance tips for Symfony2 & PHPPerformance tips for Symfony2 & PHP
Performance tips for Symfony2 & PHP
 
Держим руку на пульсе проекта. Мониторинг PHP-приложений
Держим руку на пульсе проекта. Мониторинг PHP-приложенийДержим руку на пульсе проекта. Мониторинг PHP-приложений
Держим руку на пульсе проекта. Мониторинг PHP-приложений
 
Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5
 
Asynchronous processing with PHP and Symfony2. Do it simple
Asynchronous processing with PHP and Symfony2. Do it simpleAsynchronous processing with PHP and Symfony2. Do it simple
Asynchronous processing with PHP and Symfony2. Do it simple
 
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
 

Similar to Increase your performance and code quality

Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Jacob Kaplan-Moss
 
Connecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOPConnecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOPraimonesteve
 
Simplifying Persistence for Java and MongoDB with Morphia
Simplifying Persistence for Java and MongoDB with MorphiaSimplifying Persistence for Java and MongoDB with Morphia
Simplifying Persistence for Java and MongoDB with MorphiaMongoDB
 
Slides python elixir
Slides python elixirSlides python elixir
Slides python elixirAdel Totott
 
Deploy and Manage the Infrastructure Using Azure Resource Manager
Deploy and Manage the Infrastructure Using Azure Resource ManagerDeploy and Manage the Infrastructure Using Azure Resource Manager
Deploy and Manage the Infrastructure Using Azure Resource ManagerGlobalLogic Ukraine
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperJon Kruger
 
MongoDB hearts Django? (Django NYC)
MongoDB hearts Django? (Django NYC)MongoDB hearts Django? (Django NYC)
MongoDB hearts Django? (Django NYC)Mike Dirolf
 
Webinar: Simplifying Persistence for Java and MongoDB
Webinar: Simplifying Persistence for Java and MongoDBWebinar: Simplifying Persistence for Java and MongoDB
Webinar: Simplifying Persistence for Java and MongoDBMongoDB
 
Mongo and Harmony
Mongo and HarmonyMongo and Harmony
Mongo and HarmonySteve Smith
 
Two scoopsofdjango ch16 dealing with the user model
Two scoopsofdjango ch16   dealing with the user modelTwo scoopsofdjango ch16   dealing with the user model
Two scoopsofdjango ch16 dealing with the user modelShih-yi Wei
 
SAX, DOM & JDOM parsers for beginners
SAX, DOM & JDOM parsers for beginnersSAX, DOM & JDOM parsers for beginners
SAX, DOM & JDOM parsers for beginnersHicham QAISSI
 
The Best (and Worst) of Django
The Best (and Worst) of DjangoThe Best (and Worst) of Django
The Best (and Worst) of DjangoJacob Kaplan-Moss
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsRichard Rodger
 
Golang slidesaudrey
Golang slidesaudreyGolang slidesaudrey
Golang slidesaudreyAudrey Lim
 
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperTame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperGiordano Scalzo
 
Java Technology
Java TechnologyJava Technology
Java Technologyifnu bima
 

Similar to Increase your performance and code quality (20)

Elastic tire demo
Elastic tire demoElastic tire demo
Elastic tire demo
 
Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)
 
Connecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOPConnecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOP
 
Simplifying Persistence for Java and MongoDB with Morphia
Simplifying Persistence for Java and MongoDB with MorphiaSimplifying Persistence for Java and MongoDB with Morphia
Simplifying Persistence for Java and MongoDB with Morphia
 
Slides python elixir
Slides python elixirSlides python elixir
Slides python elixir
 
Deploy and Manage the Infrastructure Using Azure Resource Manager
Deploy and Manage the Infrastructure Using Azure Resource ManagerDeploy and Manage the Infrastructure Using Azure Resource Manager
Deploy and Manage the Infrastructure Using Azure Resource Manager
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
 
MongoDB hearts Django? (Django NYC)
MongoDB hearts Django? (Django NYC)MongoDB hearts Django? (Django NYC)
MongoDB hearts Django? (Django NYC)
 
Webinar: Simplifying Persistence for Java and MongoDB
Webinar: Simplifying Persistence for Java and MongoDBWebinar: Simplifying Persistence for Java and MongoDB
Webinar: Simplifying Persistence for Java and MongoDB
 
Mongo and Harmony
Mongo and HarmonyMongo and Harmony
Mongo and Harmony
 
Two scoopsofdjango ch16 dealing with the user model
Two scoopsofdjango ch16   dealing with the user modelTwo scoopsofdjango ch16   dealing with the user model
Two scoopsofdjango ch16 dealing with the user model
 
Magic of Ruby
Magic of RubyMagic of Ruby
Magic of Ruby
 
SAX, DOM & JDOM parsers for beginners
SAX, DOM & JDOM parsers for beginnersSAX, DOM & JDOM parsers for beginners
SAX, DOM & JDOM parsers for beginners
 
The Best (and Worst) of Django
The Best (and Worst) of DjangoThe Best (and Worst) of Django
The Best (and Worst) of Django
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.js
 
20120816 nodejsdublin
20120816 nodejsdublin20120816 nodejsdublin
20120816 nodejsdublin
 
Python Part 2
Python Part 2Python Part 2
Python Part 2
 
Golang slidesaudrey
Golang slidesaudreyGolang slidesaudrey
Golang slidesaudrey
 
Tame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapperTame Accidental Complexity with Ruby and MongoMapper
Tame Accidental Complexity with Ruby and MongoMapper
 
Java Technology
Java TechnologyJava Technology
Java Technology
 

Recently uploaded

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Recently uploaded (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 

Increase your performance and code quality

  • 1. Increase your performance and code quality scaffolding and MDD Vesin Dusko: vesindusko@gmail.com @vesindusko
  • 2. Reality check • By 2019 there will be 26.4 million software developers, it is the fastest growing profession in the world with 46% growth. • But that is not nearly enough. In Germany alone there are 40000 unfulfilled positions at this moment • IT is the fastest changing industry • Startups and agile pose a new challenge
  • 3. Better yourself • master things that you do every day (language, frameworks, best practices,IDE, etc.) • read, learn, experiment with new things • centralize your knowledge, make it reusable (libraries, frameworks, tools, scripts, plugins…) • impostor syndrome • repeat until you are in the business
  • 4. Automate yourself • No matter how good you are, you have only two hands and one keyboard. • Automate your processes (build, deployment, etc. ) • Available scaffolding tools… (Spring Roo, Ruby on Rails, JHipster, Bower, Gulp, Grails, etc) • Can we do more? Refuse to do repetitive work!
  • 5. MDE, MDD & MDA • “Model-driven engineering (MDE) is a software development methodology which focuses on creating and exploiting domain models, which are conceptual models of all the topics related to a specific problem.” • “Model-driven development (MDD) is an approach to software development where extensive models are created before source code is written” • “Model-driven architecture (MDA) is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as models.” • Model - “The model-driven architecture approach defines system functionality using a platform-independent model (PIM) using an appropriate domain-specific language (DSL)” • Generator - “Code generation means that the user abstractly models solutions, which are connoted by some model data, and then an automated tool derives from the models parts or all of the source code for the software system.”
  • 6. drytools don’t repeat yourself • Multi module project generator • Written in Scala • drydsl (readable, optimal …) • dryvalidation • drypostprocessor • drygenerators (maintainable, customisable…)
  • 7. drytools DSL project_name project[settings]( service_name server[settings]( property_name property[settings]… model_name model[settings]( properties … uniques and indexes … queries …) api_name api[api settings]( endpoint_name endpoint[settings] …) )… web_app_name web[settings] … android_app_name android[settings] … ios_app_name ios[settings] … )
  • 8. Models Role enum(USER, MODERATOR, ADMIN) User model [type sql]( id long(primary key) username text (min 6, max 20, unique) passwordHash text (min 128, max 128) firstName text (min 2, max 60) lastName text (min 2, max 60) gender enum(MALE, FEMALE) role Role (default USER) birthDate optional date findAll from User findById from User where User.Id == id findByUsername from User where User.username == username findByFirstName from User where User.firstName == firstName findByLastName from User where User.lastName == lastName findByGender from User where User.gender == gender findByRole from User where User.gender == gender findMaleUsers from User where User.gender == “MALE” findAdminUser from User where User.role == “ADMIN” findByName from User where User.firstName like name or User.lastName like name or User.userName == name )
  • 9. ModelsRole enum(USER, MODERATOR, ADMIN) User model ( username text (min 6, max 20, unique) passwordHash text (min 128, max 128) firstName text (min 2, max 60) lastName text(min 2, max 60) gender enum(MALE, FEMALE) role Role (default USER) birthDate optional date findMaleUsers from User where User.gender == “MALE” findAdminUser from User where User.role == “ADMIN” findByName from User where User.firstName like name or User.lastName like name or User.userName == name )
  • 10. Role enum(USER, MODERATOR, ADMIN) User model ( username text (min 6, max 20, unique) passwordHash text (min 128, max 128) firstName text (min 2, max 60) lastName text (min 2, max 60) gender enum (MALE, FEMALE) role Role (default USER) birthDate optional date findMaleUsers from User where User.gender == “MALE” findAdminUser from User where User.role == “ADMIN” findByName from User where User.firstName like name or User.lastName like name or User.userName == name ) Owner model ( user User (unique) findByUser from Owner where Owner.user == user findByIdWithUser from Owner with Vet.user from Owner findPetsByOwnerId min Pet where Pet.owner from Pet where Pet.owner == owner ) Vet model ( user User (unique) findByUser from Vet where Vet == user findByIdWithUser from Vet with Vet.user from Vet findVisits from Visits where Visit.vet == vet ) PetType enum (DOG, CAT) Pet ( owner Owner type PetType birthDate date description text (max 1024) ) Visit ( Vet vet Pet pet date date note text[max 1024] findByIdWithVetAndPet from Visit with Visit.vet from Visit with Visit.pet from Visit where Vet.id == id )
  • 11. Middleware • Services • Security • Simple security -security (principal User) • Role security - security (principal User, role Role) • Permission based security - security (principal User, action UserAction) • SignIn • Username - signIn (username) • Email - signIn (email) • Google - signIn (google) • Facebook - signIn (facebook)
  • 12. APIsUserApi api( adminUsers find [query User.adminUsers, secured ADMIN, rest "/admins"] users find [query User.findAll, response (User.id, User.email, User.firstName, User.lastName), secured, rest "/users"] nonAdmins find [from User where User.role != "ADMIN", secured, rest ] user crud [model User, secured ADMIN, rest] ) OwnerApi api( owner crud [model Owner, secured ADMIN]( user.firstName [save default "Petar", update default "Pera"] user.lastName [min 30, max 40] address [visible (create, read) ] user.email notes optional text[min 2, max 10] ) owners find [from Owner with Owner.user as User from Owner where optional Owner.address like address response (Owner.id, User.email, User.firstName, User.lastName), secured ADMIN, rest “/owner] ownersPets find [ from Owner with Pet.owner from Owner with Owner.user from Owner where Owner.id == ownerId response (Pet.id, Owner.id, Pet.name), secured, rest “/owner/:ownerId/pets"] ……
  • 13. APIs… myPets find [from Owner with Pet.owner from Owner with Owner.user from Owner where Owner.user == principal, rest, secured] PetWithOwnerName dto( Pet.name Pet.petType User.firstName User.lastName firstPet enum(YES, NO) ) PetDto dto(Pet.id, Pet.name) VetWithSpecialties dto( User.firstName specialties list VetSpeciality.name pets list PetDto ) vetsWithSpecialties custom [request PetWithOwnerName, response list VetWithSpecialties, secured ADMIN, get "/vets"] vetInfo custom [request dto(Vet.id), response VetWithSpecialties, secured, get "/vet/:id", transactional sql] )
  • 14. Clients • web client (AngularJS, Bootstrap, Yeoman, Grunt, Bower) with ApiCaller and ApiMock • iOS client with ApiCaller and ApiMock • Android client with ApiCaller and ApiMock
  • 15. What's next? • New DSL features • Push Api • Web sockets • UI components • Android and iOs notifications • Big data analysis with spark
  • 16. Pros/Cons • Pros • speed up to 5x • best practices • architecture as a code • refactoring • global improvements • learning tool • we are in control • Cons • controversial technique • hard to implement • hard to balance • maintenance • not suitable for every case