Giter Club home page Giter Club logo

fmodel-demos's People

Contributors

dependabot[bot] avatar dvag-joerg-winter avatar idugalic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fmodel-demos's Issues

Discuss validation and handling errors

There are two types of validation:

  • Structural validation of the message (command)
  • Business validation requires the current state of the aggregate to check if it can actually handle the command.

It should not be possible to create a structurally invalid message - https://www.47deg.com/blog/functional-domain-modeling-part-2/

Business validation should be done in the decider.decide() function and you have options:

  • ignore it by returning an empty flow of events
  • throw an exception within the flow, breaking the flow immediately
  • model the errors as events, giving the error flow the respect it deserves.

Demystify `combine` function - Decider

Explain how to model Commands, Events, and State data types.

  • how inheritance/polymorphism (Sealed and Open) can be used to model OR/SUM relationship and why is this important for modeling Commands and Events
  • what options do we have to model general AND/PRODUCT relationship, and what kotlin idiomatic options do we have (Pairs)
  • explain how combine() function is combining two or more Deciders into one big decider that can just run as a whole. Or you can distribute these deciders via Actors for example and run them in parallel. The decider is a Monoid in respect to the combine() function/operator.
  • Mention the principle of duality (boolean algebra) that is present here.
  • Why do Command and Event have to be nullable (?) in order to be able to use the combine function in the first place.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.