Code Monkey home page Code Monkey logo

fmodel-demos's Introduction

Functional domain modeling - Examples

The word domain here means the area of interest in the business. When you are developing an information system to automate activities of that business, you’re modeling the business. The abstractions that you design, the behaviors that you implement, and the UI interactions that you build all reflect the business — together they constitute the model of the domain.

f(model)

These examples are demonstrating the usage of the fmodel library.

Library is written in Kotlin programing language by practicing functional style. It is a small library constructed out of generic data types that can be used to effectively model any stateful information system.

It is truly decoupling the pure declaration of our program logic from the runtime. And therefore, the runtime has the chance to see the big picture of our program and decide how to run and optimize it.

Examples

To demonstrate that pure declaration of our program logic is separated from the runtime target and infrastructure, we are going to practice onion architecture / ports and adapters in all examples.

onion architecture image

The arrows in the image are showing the direction of the dependency. Notice that all dependencies point inwards, and that Domain is not depending on anybody or anything.

Restaurant management system

Restaurant management system is:

  • managing restaurant menus and other information including location and opening hours
  • managing the preparation of orders at a restaurant kitchen

restaurant management - event model

We are going to run our unique core domain logic in different ways, by implementing different application and/or persistence layers:

Type Description Technology Scenario Domain Application Adapter
State stored information system Restaurant management Kotlin, Arrow, Reactive Spring Boot, R2DBC combined aggregate scenario - monolith aggregate fmodel domain fmodel application spring
Event-sourced information system Restaurant management Kotlin, Arrow, Reactive Spring Boot, Axon Framework on infra layer, and Axon Server combined aggregate scenario - monolith aggregate fmodel domain fmodel application axon, spring
Event-sourced information system - distributed Restaurant management Kotlin, Arrow, Reactive Spring Boot, Axon Framework on infra layer, and Axon Server distributed aggregate(s) fmodel domain fmodel application axon, spring
Event-sourced information system - distributed Restaurant management Kotlin, Arrow, Reactive Spring Boot, Axon Framework on application layer, and Axon Server distributed aggregate(s) fmodel domain axon axon, spring

References and further reading


Created with ❤️ by Fraktalio

fmodel-demos's People

Contributors

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

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.