0
Domain Driven Design and Model     Driven Development   Geyzersky Dmitry   IT Architect, Co-Owner of PerformIT   dima@perf...
“Any fool can write code that acomputer can understand. Goodprogrammers write code thathumans can understand.“            ...
Session Objectives and Agenda• Introduction to Ontology.• From the Ontology to Domain Driven  Design.• DDD Building Blocks...
Ontology• In philosophy ontology is the theory of  the nature of existence.• In the context of information science it is  ...
Ontology and Semantic Technologies
Domain Driven Design• Model driven software design approach  used to tackle complexity of software  projects.• DDD focuses...
“Strategy is doing the right things, tactics is doing things right.“                Peter Ferdinand Drucker
Ubiquitous Language• Learn and talk the language of the domain  experts.• The language evolves with the domain model  and ...
Creating Ubiquitous Language
Domain Model• Model is the backbone of Domain Driven  Design.• Model forms ubiquitous language.• Perfect tool for communic...
Layering
DDD Building Blocks    Domain Model
EntitiesObjects having a unique identity throughoutthe states of the software.
EntitiesWe compare entities by their IDs.
Value Objects• Objects describing certain aspects of the  domain which don’t have identity and  lifecycle.• Immutable - if...
Value Objects• We compare Value Types by comparing their  properties one-by-one.
Repositories• A Repository encapsulates domain objects  persistence and retrieval.• Clean separation and one-way dependenc...
Services• Define an applications boundary.• Services usually manipulate Entities  and Value Objects.• A service typically ...
Aggregates• Each Aggregate has one Root Entity.• The root identity is global, the identities of entities inside are local....
Factories• A program elements whose responsibility is  the creation of other objects.• Create and manage complex domain  o...
Domain EventsRepresent the states of Entities
DDD Challenges• The model must reflect code changes and  vice versa.• The amount of boilerplate code must be as  minimal a...
Code Generation Techniques•   NHibernate with NVelocity (.Net).•   Xtext with Xtend (Java, Eclipse).•   Protege (Java).•  ...
References• Domain-Driven Design: Tackling  Complexity in the Heart of Software (by  Eric Evans).• http://nhforge.org/blog...
For more information:   dima@performit.co.il            orhttp://www.performit.co.il
Domain driven design and model driven development
Upcoming SlideShare
Loading in...5
×

Domain driven design and model driven development

3,813

Published on

The presentation I gave at Iltam (Herzelia, Daniel Hotel) on 23.05.2012

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,813
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
118
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Domain driven design and model driven development"

  1. 1. Domain Driven Design and Model Driven Development Geyzersky Dmitry IT Architect, Co-Owner of PerformIT dima@performit.co.il http://www.performit.co.il
  2. 2. “Any fool can write code that acomputer can understand. Goodprogrammers write code thathumans can understand.“ Martin Fowler
  3. 3. Session Objectives and Agenda• Introduction to Ontology.• From the Ontology to Domain Driven Design.• DDD Building Blocks.• Modeling Techniques.
  4. 4. Ontology• In philosophy ontology is the theory of the nature of existence.• In the context of information science it is the study of entities and their relations.• It is about modeling a domain of knowledge by using high level of abstraction.
  5. 5. Ontology and Semantic Technologies
  6. 6. Domain Driven Design• Model driven software design approach used to tackle complexity of software projects.• DDD focuses on the domain logic.• The term was coined by Eric Evans in his book.
  7. 7. “Strategy is doing the right things, tactics is doing things right.“ Peter Ferdinand Drucker
  8. 8. Ubiquitous Language• Learn and talk the language of the domain experts.• The language evolves with the domain model and enables to describe the characteristics of the domain with increased precision.• Change in the language = change in the model and vice versa.• Knowledge crunching.
  9. 9. Creating Ubiquitous Language
  10. 10. Domain Model• Model is the backbone of Domain Driven Design.• Model forms ubiquitous language.• Perfect tool for communication between domain experts and developers.• Explains complex domain in a simple way.• Model and Code are bound.
  11. 11. Layering
  12. 12. DDD Building Blocks Domain Model
  13. 13. EntitiesObjects having a unique identity throughoutthe states of the software.
  14. 14. EntitiesWe compare entities by their IDs.
  15. 15. Value Objects• Objects describing certain aspects of the domain which don’t have identity and lifecycle.• Immutable - if you need to change the object, just create a new one.
  16. 16. Value Objects• We compare Value Types by comparing their properties one-by-one.
  17. 17. Repositories• A Repository encapsulates domain objects persistence and retrieval.• Clean separation and one-way dependency between the domain and data mapping layers.• Usually implemented with Object Relational Mapping (ORM) techniques.• May encapsulate different fetching strategies, distributed caching, NoSQL and etc.
  18. 18. Services• Define an applications boundary.• Services usually manipulate Entities and Value Objects.• A service typically implements a business rule, generally something that software must do.
  19. 19. Aggregates• Each Aggregate has one Root Entity.• The root identity is global, the identities of entities inside are local.• External objects may have references only to root.• Internal objects cannot be changed outside the Aggregate.
  20. 20. Factories• A program elements whose responsibility is the creation of other objects.• Create and manage complex domain objects.• Especially useful for creating aggregates when atomicity is required.
  21. 21. Domain EventsRepresent the states of Entities
  22. 22. DDD Challenges• The model must reflect code changes and vice versa.• The amount of boilerplate code must be as minimal as possible.• The main focus is on the business domain and not the infrastructure.• Minimum friction with technology.• Continuous integration, testing and refactory.• As much automation as possible.
  23. 23. Code Generation Techniques• NHibernate with NVelocity (.Net).• Xtext with Xtend (Java, Eclipse).• Protege (Java).• Enterprise Architect (any language).• MS Entity Framework (.Net) with T4.• UML (any language).• Spring Data (Java, Neo4J) and etc.
  24. 24. References• Domain-Driven Design: Tackling Complexity in the Heart of Software (by Eric Evans).• http://nhforge.org/blogs/nhibernate.• http://www.springsource.org/spring-data.• http://www.eclipse.org/xtend/.• A Legal Case OWL Ontology with an Instantiation of Popov v. Hayashi Adam Wyner and Rinke Hoekstra, Knowledge Engineering Review.
  25. 25. For more information: dima@performit.co.il orhttp://www.performit.co.il
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×