Domain-Driven Design: Part 4 from Delivering the Connected Experience

22
Domain Driven Design

description

Domain-Driven Design - Dave Fox, Principal Consultant, Technical Architect

Transcript of Domain-Driven Design: Part 4 from Delivering the Connected Experience

Page 1: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Domain Driven Design

Page 2: Domain-Driven Design: Part 4 from Delivering the Connected Experience

What is It?A way of designing software that reduces complexity by modeling a problem domain using the concepts and language of the real world

Page 3: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Many Applications Are Monolithic

Page 4: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Real Businesses are not Monolithic

Business

EmployeeCan file HR paperworkCan distribute payrollCan commit source codeCan fix computers

Page 5: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Real Businesses Have Multiple Departments

EmployeeCan commit source codeCan fix computers

EmployeeCan file HR paperworkCan distribute payroll

IT HR

Page 6: Domain-Driven Design: Part 4 from Delivering the Connected Experience

They Communicate by Sending Messages

“I have a broken computer. The serial number is #12345”

IT HR

Page 7: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Internally, the department handles the task

Manager Employee“Go fix computer with serial number #12345”

IT

Page 8: Domain-Driven Design: Part 4 from Delivering the Connected Experience

HR Doesn’t have to know what’s involved in fixing a computer

“Your computer is fixed.”

IT HR

Page 9: Domain-Driven Design: Part 4 from Delivering the Connected Experience

By Separating Responsibilities, We Reduce Complexity

IT

HR

Manufacturing

Sales

Marketing

Page 10: Domain-Driven Design: Part 4 from Delivering the Connected Experience

But it also scales

IT

HR

Sales

Marketing

Manufacturing

Page 11: Domain-Driven Design: Part 4 from Delivering the Connected Experience

And Can Even be Distributed

IT

HR

Sales

Marketing

ManufacturingManufacturing

Manufacturing

Page 12: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Monolithic Used to work

User

User

User

App Database

Page 13: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Now there are Many, many more users

User

App Database

User

User

User

User

User

User

User

User

User

User

User

Page 14: Domain-Driven Design: Part 4 from Delivering the Connected Experience

We can do some load balancing

User

App

DatabaseUser

User

User

User

User

User

User

User

User

User

User

App

App

Page 15: Domain-Driven Design: Part 4 from Delivering the Connected Experience

But it’s not enough

User

App

Database

User

User

User

User

User

User

User

User

User

User

User

App

App

UserUser

User

UserUser

User

User

User

User

User

User

User

User

User

User

Page 16: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Amazon Knows This

Page 17: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Amazon Knows This

Page 18: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Amazon Knows This

Page 19: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Amazon Knows This

Page 20: Domain-Driven Design: Part 4 from Delivering the Connected Experience

Amazon has a SOA

User App

Details

Recommendations

Reviews

Affiliates

Pricing

Page 21: Domain-Driven Design: Part 4 from Delivering the Connected Experience

How do we model this?

–The “ubiquitous” language of the domain (the business)–Rather than taking a set of specifications and implementing them in technical terms only developers understand, we use the language that the experts in the domain use

Page 22: Domain-Driven Design: Part 4 from Delivering the Connected Experience

BUSINESS BENEFITS–1. The organization gains a useful model of its domain. –2. A refined, precise definition and understanding of the business is developed. 

–3. Domain experts contribute to software design. –4. A better user experience is gained. –5. Clean boundaries are placed around pure models. –6. Enterprise architecture is better organized. –7. Agile, iterative, continuous modeling is used. –8. New tools, both strategic and tactical, are employed.

Vernon, Vaughn (2013-02-06). Implementing Domain-Driven Design (p. 26).