Two concepts.

Explain them both, give answers to the following questions.

  1. Parse don’t validate
    1. What does this mean?
    2. What does this look like in code?
    3. What are the benefits?
    4. What is the trade-off?
  2. Value objects
    1. What are they?
    2. What does this look like in code?
    3. What are the benefits?
    4. What is the trade-off?
  3. What does a value object look like that adheres to both?
    1. What is the trade-off?
  4. Improve with the Result pattern.

Parse don’t validate

For example when retrieving data from a 3rd-party API. Let’s start with some ideas on what that data can be before I choose one for this write-up.

  • a set of permissions
  • a list of products
  • a list of connectors of an EVSE.

Lets go with the latter for now