From 6f17db399b30946444d846f18e05ab5d736e6ba6 Mon Sep 17 00:00:00 2001 From: Correl Date: Wed, 29 Sep 2021 12:21:01 -0400 Subject: [PATCH] updates --- 20201009010321-static_type_checking.org | 2 +- ...ession_domain_modeling_made_functional.org | 19 +++++++++++++++++++ ...34-algebraic_data_types_are_composable.org | 7 +++++++ 20210929115545-avoid_primitives.org | 9 +++++++++ 20210929121102-ubiquitous_language.org | 6 ++++++ 20210929121135-domain_driven_design.org | 4 ++++ ...ons_learned_avoiding_primitives_in_elm.org | 2 +- 7 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 20210929114718-scott_wlaschin_talk_session_domain_modeling_made_functional.org create mode 100644 20210929115234-algebraic_data_types_are_composable.org create mode 100644 20210929115545-avoid_primitives.org create mode 100644 20210929121102-ubiquitous_language.org create mode 100644 20210929121135-domain_driven_design.org diff --git a/20201009010321-static_type_checking.org b/20201009010321-static_type_checking.org index 38ba35b..55759ce 100644 --- a/20201009010321-static_type_checking.org +++ b/20201009010321-static_type_checking.org @@ -1,4 +1,4 @@ :PROPERTIES: :ID: 1882370a-e4df-42a3-ab5a-32b650b754a6 :END: -#+title: Static Type Checking +#+title: Static Typing diff --git a/20210929114718-scott_wlaschin_talk_session_domain_modeling_made_functional.org b/20210929114718-scott_wlaschin_talk_session_domain_modeling_made_functional.org new file mode 100644 index 0000000..73a5f95 --- /dev/null +++ b/20210929114718-scott_wlaschin_talk_session_domain_modeling_made_functional.org @@ -0,0 +1,19 @@ +:PROPERTIES: +:ID: 5c2b9a4f-f007-421c-99e2-b2354b959b48 +:ROAM_REFS: https://www.youtube.com/watch?v=PLFl95c-IiU +:END: +#+title: Scott Wlaschin - Talk Session: Domain Modeling Made Functional + +- [[id:dfb5bf16-7479-4960-af39-80ad0ed3257e][Ubiquitous Language]] +- Persistence Ignorance (no foreign keys or other database-specific details) +- Communicating design decisions in code + + Constraints, optionality, etc. +- [[id:67dab4eb-231f-4af0-bf26-b3cf6d83f9a3][Algebraic Data Types are composable]] +- [[id:63e60abc-66a7-478d-a272-45c0e7c99c32][Avoid primitives]], declaring domain types instead +- Types can be used as a domain modeling tool +- "Null is the Sauron of [[id:1882370a-e4df-42a3-ab5a-32b650b754a6][Static Typing]]" +- Constraints can be enforced when constructing distinct (wrapped) types. +- The [[id:dfb5bf16-7479-4960-af39-80ad0ed3257e][Ubiquitous Language]] evolves with the domain because it lives in the + evolving code. +- "Make illegal states unrepresentable!" - Yaron Minsky +- [[id:1882370a-e4df-42a3-ab5a-32b650b754a6][Static Typing]] gives you confidence to make changes diff --git a/20210929115234-algebraic_data_types_are_composable.org b/20210929115234-algebraic_data_types_are_composable.org new file mode 100644 index 0000000..ffba333 --- /dev/null +++ b/20210929115234-algebraic_data_types_are_composable.org @@ -0,0 +1,7 @@ +:PROPERTIES: +:ID: 67dab4eb-231f-4af0-bf26-b3cf6d83f9a3 +:END: +#+title: Algebraic Data Types are composable + +Because ADTs are separate from behavior, it's easy to combine them together to +make more complex types. diff --git a/20210929115545-avoid_primitives.org b/20210929115545-avoid_primitives.org new file mode 100644 index 0000000..fd8533f --- /dev/null +++ b/20210929115545-avoid_primitives.org @@ -0,0 +1,9 @@ +:PROPERTIES: +:ID: 63e60abc-66a7-478d-a272-45c0e7c99c32 +:END: +#+title: Avoid primitives + +Wrapper types keep types distinct, e.g. a customer id can be represented as an +=int=, but /is not/ an =int=. This makes the domain model clearer, and they +cannot be mixed up accidentally (e.g. mis-ordered parameters) as the type +checker will prevent it. diff --git a/20210929121102-ubiquitous_language.org b/20210929121102-ubiquitous_language.org new file mode 100644 index 0000000..c392c90 --- /dev/null +++ b/20210929121102-ubiquitous_language.org @@ -0,0 +1,6 @@ +:PROPERTIES: +:ID: dfb5bf16-7479-4960-af39-80ad0ed3257e +:END: +#+title: Ubiquitous Language + +A common set of terms to describe the elements of a domain in [[id:22cd7cdb-092c-4535-b1aa-2186cba4c715][Domain Driven Design]]. diff --git a/20210929121135-domain_driven_design.org b/20210929121135-domain_driven_design.org new file mode 100644 index 0000000..9d9d985 --- /dev/null +++ b/20210929121135-domain_driven_design.org @@ -0,0 +1,4 @@ +:PROPERTIES: +:ID: 22cd7cdb-092c-4535-b1aa-2186cba4c715 +:END: +#+title: Domain Driven Design diff --git a/lessons_learned_avoiding_primitives_in_elm.org b/lessons_learned_avoiding_primitives_in_elm.org index 7940ab8..48f5732 100644 --- a/lessons_learned_avoiding_primitives_in_elm.org +++ b/lessons_learned_avoiding_primitives_in_elm.org @@ -4,4 +4,4 @@ :END: #+title: Lessons Learned: Avoiding Primitives in Elm -Discusses using specialized wrapper types in Elm. +Discusses using specialized wrapper types to [[id:63e60abc-66a7-478d-a272-45c0e7c99c32][Avoid primitives]] in Elm.