Tomorrow’s “Model” Driven
Development
JBCN Conf 2017 - Barcelona
About us
• Mario Romano
– Full Stack Developer
– Microservices
– Angular 2
– BPM
– Working @ Alfresco
• APS & ADF
– Twitter: @MagemelloMario
• Mauricio Salatino (Salaboy)
– BPM & Rules Background
– Working @ Alfresco
• Activiti 7 Technical Leader
– Twitter: @salaboy
– http://salaboy.com
Agenda
• Software Development Approaches
– What is DDD?
– Other Approaches
• What do they share? What is different?
• Implementation
– Architectural Point of view
• Spring Cloud
• Demo
Theoretical
Point of View
What is
DDD?
• Domain Driven Design
“DDD is a software development approach to
create high quality software model design
that meets core business objectives.”
Core
Business
Value
• Domains, Sub-Domains and Core Domains
• (Bounded Context / Shared Language) = Model
• Context Maps
Concepts,
Best Practices
& Common
Pitfalls
• Entities
• Value Objects
• Domain Events
• Modules
• Aggregates
• Services
• Factories
• Repositories
Recommended
Patterns
• CQRS
• Event Sourcing
• Abstraction Layers
• Eventual Consistency
• EDA
• Sagas
Key
Takeaways:
Business Value
• We focus on what is important
• Build a coherent Model (Developers & Domain
Experts together)
• The model is concise, well focused and easy
to understand so it can be used to train new
people
• We add/remove/update things based on the
Business Value that they provide
• Continuous improvement in an agile fashion
• A cultural change is required
Key
Takeaways:
Best Practices
& Tools
• We gain a deep understanding about the
problems
• We apply the best tool for the job
• Models are clearly defined and scoped
• Teams can be organized around these Models
Other
Approaches
• Business Process Management
– Work with Domain Experts to create high level
abstractions about how they work.
– Business Processes “how people and system
work together”
• Decision Management
– Work with Domain Experts to build decision
models
– Decision Tables and Decision Trees: “how
decisions are made”
• Well understood by the industry
– They are standardized, BPMN 2.1, DMN 1.1
– Organizations see a lot of business value in
these approaches
BPM
• Business Processes (Fire Emergency)
Decision
Management
• Decision Table
Similarities
• Centralized Knowledge is Key
– The org gains useful model of its own domain
– A refined understanding of the business is
developed
– Domain experts contribute to software design
• Important cultural change required
• Agile, iterative and continuous improvement is
the norm
Differences
• “Model” means different things
– DDD: well crafted (Java) Model -> Technical
– BPM: Business Process -> Non-Technical
– DM: Decision Model -> Non-Technical
• Can we leverage the best of both worlds?
Implementation
Point of View
Emergency Dispatcher
Emergency
Request
Arrives
Emergency
Enriched &
Processed
Emergency
Procedure
Triggered
Emergency	
Source
Emergency	
Enricher
Emergency	
Dispatcher
-
(Complex)
Spring	Cloud	Data	Flow	- Message	Bus
Eureka
-
Procedure	
Registry
Zuul - Gateway
Google	
-
Location	
Service
Spring	Data	
-
Patient	Record	
Service
Service
-
Emergency	
Codes
Activiti
-
Emergency
Procedure A
Service
-
Emergency
Procedure B
Activiti
-
Default Emergency
Procedure
…
INFRASTRACTURE (Changes rarely) DOMAIN
KNOWLEDGE
(Changes often)
Zipkin
-
Tracer
Demo
• Emergency Dispatcher
• https://github.com/Salaboy/jbcnconf-2017-emergency-dispatcher
• Run it on your laptop!
Activiti 7
Community
OSS
• http://www.activiti.org
• New Rebooted Project
• Re-designed & Re-engineered on top of
Spring Boot 2 / Spring Cloud
• Embedded Process Runtime
• Embedded Decision Runtime
• Embedded Case/Contextual Runtime
• Public announcements to be made in July
• Want join us?
Questions?

JBCN conf 2017 Tomorrow Model Driven Development