Skip to content

Commit

Permalink
add DS1 table
Browse files Browse the repository at this point in the history
  • Loading branch information
hjwp committed Jan 14, 2020
1 parent e9eaf40 commit 83353e6
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 4 deletions.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ In the meantime, pull requests, typofixes, and more substantial feedback + sugge
| [Chapter 12: CQRS](chapter_12_cqrs.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_12_cqrs)](https://travis-ci.org/cosmicpython/code) |
| [Chapter 13: Dependency Injection](chapter_13_dependency_injection.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=chapter_13_dependency_injection)](https://travis-ci.org/cosmicpython/code) |
| [Epilogue: How do I get there from here?](epilogue_1_how_to_get_there_from_here.asciidoc) | |
| [Appendix A: Recap table](appendix_ds1_table.asciidoc) | |
| [Appendix B: Project Structure](appendix_project_structure.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=appendix_project_structure)](https://travis-ci.org/cosmicpython/code) |
| [Appendix C: A major infrastructure change, made easy](appendix_csvs.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=appendix_csvs)](https://travis-ci.org/cosmicpython/code) |
| [Appendix D: Django](appendix_django.asciidoc) | [![Build Status](https://travis-ci.org/cosmicpython/code.svg?branch=appendix_django)](https://travis-ci.org/cosmicpython/code) |
Expand Down
58 changes: 58 additions & 0 deletions appendix_ds1_table.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[[appendix_ds1_table]]
[appendix]
== Summary diagram and table

[[recap_diagram]]
.Our architecture by the end of the book
image::images/maps_chapter_12_after.png[]

// TODO: make a version without the yellow bits


[[ds1_table]]
.The components of our architecture and what they all do.
[cols="3"]
|===
| Layer | Component | Description

.5+a| Domain

* Defines the business logic.


| Entity | A domain object whose attributes may change, but that has a recognizable identity over time.

| Value Object | An immutable domain object whose attributes entirely define it. It is fungible with other identical objects.

| Aggregate | Cluster of associated objects that we treat as a unit for the purpose of data changes.

| Event | Represents something that happened, emitted by or stored on domain objects.

| Command | Represents a job the system should perform.

.3+a| Service layer

* Defines the jobs the system should perform and orchestrates different components.

| Command/Event Handler | Receives a Command or Event and performs what needs to happen.
| Unit of Work | Abstraction around data integrity. Each unit of work represents an atomic update.
| Message Bus (Internal) | Handles Commands and Events by routing them to the appropriate Handler.

.2+a| Adapters (Secondary)

* Concrete implementations of an interface that goes from our system out
to the outside world / I/O

| Repository | Abstraction around persistent storage. Each Aggregate has its own Repository.
| Event Publisher | Pushes Events onto the external message bus.

.2+a| Entrypoints (Primary adapters)

* Translate external inputs into calls into the service layer.

| Web | Receives web requests and translates them into Commands, passing them to the Internal Message Bus.
| Event Consumer | Reads Events from the External Message Bus and translates them into Commands, passing them to the Internal Message Bus.

| n/a | External Message Bus (Message Broker) | A piece of infrastructure that different services use to intercommunicate, via Events.
|===

1 change: 1 addition & 0 deletions atlas.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

"epilogue_1_how_to_get_there_from_here.asciidoc",

"appendix_ds1_table.asciidoc",
"appendix_project_structure.asciidoc",
"appendix_csvs.asciidoc",
"appendix_django.asciidoc",
Expand Down
13 changes: 9 additions & 4 deletions book.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:source-highlighter: pygments
:icons: font

= Pythonic Application Architecture Patterns
= Architecture Patterns with Python
:toc:


Expand All @@ -21,11 +21,8 @@ include::chapter_01_domain_model.asciidoc[]

include::chapter_02_repository.asciidoc[]

:sectnums!:

include::chapter_03_abstractions.asciidoc[]

:sectnums:

include::chapter_04_service_layer.asciidoc[]

Expand All @@ -51,6 +48,14 @@ include::chapter_12_cqrs.asciidoc[]
include::chapter_13_dependency_injection.asciidoc[]


:sectnums!:

include::epilogue_1_how_to_get_there_from_here.asciidoc[]

:sectnums:

include::appendix_ds1_table.asciidoc[]

include::appendix_project_structure.asciidoc[]

include::appendix_csvs.asciidoc[]
Expand Down

0 comments on commit 83353e6

Please sign in to comment.