updates
This commit is contained in:
parent
9981a97438
commit
6f17db399b
7 changed files with 47 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 1882370a-e4df-42a3-ab5a-32b650b754a6
|
:ID: 1882370a-e4df-42a3-ab5a-32b650b754a6
|
||||||
:END:
|
:END:
|
||||||
#+title: Static Type Checking
|
#+title: Static Typing
|
||||||
|
|
|
@ -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
|
7
20210929115234-algebraic_data_types_are_composable.org
Normal file
7
20210929115234-algebraic_data_types_are_composable.org
Normal file
|
@ -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.
|
9
20210929115545-avoid_primitives.org
Normal file
9
20210929115545-avoid_primitives.org
Normal file
|
@ -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.
|
6
20210929121102-ubiquitous_language.org
Normal file
6
20210929121102-ubiquitous_language.org
Normal file
|
@ -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]].
|
4
20210929121135-domain_driven_design.org
Normal file
4
20210929121135-domain_driven_design.org
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
:PROPERTIES:
|
||||||
|
:ID: 22cd7cdb-092c-4535-b1aa-2186cba4c715
|
||||||
|
:END:
|
||||||
|
#+title: Domain Driven Design
|
|
@ -4,4 +4,4 @@
|
||||||
:END:
|
:END:
|
||||||
#+title: Lessons Learned: Avoiding Primitives in Elm
|
#+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.
|
||||||
|
|
Loading…
Reference in a new issue