Coder Social home page Coder Social logo

ddd-mh's Introduction

Exercises done during Domain Models in Practise Nov 2020

By Marco Heimeshoff @Heimeshoff for Skillsmatter

๐Ÿท๏ธ architecture event-sourcing domain-driven-design event-driven-design semantic-code domain-modelling

Mob programming setup

  • Language & IDE : F# & VSCode + Ionide (*)
  • Test runner: FSCheck-Expecto
  • Method of sharing code: vscode live share

(*) โ˜๏ธ Note : command shortcut fsi.SendSelection is usually Alt+Enter but here it's Alt+Insert

Implementing Value Objects

VO properties

  • The low hanging fruit of DDD
  • Can be compared with others using property equality - equals() and hashCode()
  • Measures, quantifies, or describes a thing in the domain
  • Is completely replaceable when the measurement or description changes
  • Models a conceptual whole by composing related attributes
  • Has Side-Effect-Free Behavior
  • Can be maintained immutable

Scenario: Online Reservation

  1. The user selects the day and the time when he/she would like to see the movie.
  2. The system lists movies available in the given time interval - title and screening times.
  3. The user chooses a particular screening.
  4. The system gives information regarding screening room and available seats.
  5. The user chooses seats, and gives the name of the person doing the reservation (name and surname).
  6. The system gives back the total amount to pay and reservation expiration time.

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.