Introduction to DDD - Adam Štipák

50 %
50 %
Information about Introduction to DDD - Adam Štipák

Published on October 3, 2016

Author: WEBtlak

Source: slideshare.net

1. Introduction to DDD Adam Štipák | @new_POPE | rekurzia.sk

2. Who I am? Adam Štipák @new_POPE rekurzia.sk ● since 2006 ● Sven Creative ● Sygic ● Diagnose.me ● and other “secret” projects

3. What is DDD? “is an approach to software development for complex needs by connecting the implementation to an evolving model” - wikipedia.org

4. ● Useful and meaningful model of its Domain ● Domain Experts contribute to software design ● Better user experience ● Clear boundaries ● Better architecture organization ● Iterative and continuous modeling in an Agile fashion ● better tools, both strategic and tactical design Why DDD?

5. Architectural styles - old layered architecture

6. Architectural styles - MVC

7. Architectural styles - Hexagonal architecture

8. The dependecy inversion principle “High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions.” - Robert C. Martin

9. Ubiquitous language “When we recieve a new order, system sends a notification”

10. Ubiquitous language What is the new order?

11. Bounded context

12. Building blocks

13. Value Objects ● Immutable ● “comparable”

14. Entities ● Identifiable ● Consistent ● Avoid ANEMIC MODEL ○ setSong(newSong) ○ replaceSong(newSong)

15. Aggregates ● lists, maps, etc ● order, clinic visit, playlist is a cluster of domain objects that can be treated as a single unit. … says Martin Fowler

16. Factories ● creates something ● create(...)

17. Repositories ● Collection oriented ○ get(ID), add(), addAll(), remove() ● Persistent oriented ○ get(ID), save(), saveAll(), ...

18. Services ● stateless ● singleton (not Singleton pattern) ○ e.g. ne instance in DI container ● SRP!

19. Domain Events ● contains data ● immutable E.g. ● born ● song replaced ● song on cassette was cleared

20. Resources ● The blue book ● The red book ● Domain Driven Design Quickly ● Domain-Driven Design in PHP

21. ???Questions ??? Adam Štipák | @new_POPE | rekurzia.sk

22. Thank you! Adam Štipák | @new_POPE | rekurzia.sk

Add a comment