Giter Club home page Giter Club logo

ddd-practitioners-ref's Introduction

Hi there 👋, I'm Kim Kao

A passionate baseball/softball player, deep passion in evangelism implementing Domain-Driven Design on Cloud (AWS).

Anurag's github stats

ddd-practitioners-ref's People

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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ddd-practitioners-ref's Issues

Re-module this project

In order to make this sample more flexible to deploy on serverless architecture and container-like architecture. It's mandatory to modularize the whole project into different modules, separate the business core logic, and leave the infra, persist, communication frameworks into different module as needed.

re-factor the order domain to implement tactical design

from order establish, refactor for the following items.

  • Domain Events publish for cloudwatch event
  • Add a DTO for incoming request body translation
  • pass the DTO into Domain Service (a.k.a add a OrderService)
  • OrderService deal with DTO, leverage Order entity
  • publish event from OrderService
  • Add a Repository for Order data in DDB

should remove node_modules in root directory

In general, we don't put node_modules to SCM, because it can restore by npm install command.

By the way, I only see package-lock.json in project root directory, and package.json is missing. That weirds me out.

add DDD tactical guidance

In order to have a concrete example to explain what is the pattern I used, there should be a quick guidance to show up the context.

re-write function with Quarkus framework

In order to have great speed experience on cloud native java, migrate current tech stack into Quarkus framework. That will benefit from standard Java EE spec and have fastest boot up time.

  • Easy to deploy to AWS Lambda custom runtime , just re-compile the artifact with native-image
  • Easy to deploy to AWS container service, push onto ECR and have fully integrated functionality on AWS

Menu Proposal

1 shot: 20g -> 1oz: 30 ml
dry foam (only for cappuccino): more foam less milk
wet foam (only for cappuccino): less foam more milk

Item / size size price recipe
Espresso / Solo 30ml 60 1 shot (30ml)
Espresso / Doppio 60ml 80 2 shot (60ml)
Caffe Americano / Short 240ml 80 1 shot (30ml) + 210ml water
Caffe Americano / Tall 360ml 100 1 shot (30ml) + 330ml water
Caffe Americano / Granti 480ml 120 2 shot (60ml) + 420ml water
Caffe Americano / Vanti 600ml 140 2 shot (60ml) + 540ml water
Caffe Latte / Short 240ml 100 1 shot (30ml) + 210ml milk (with a little foam)
Caffe Latte / Tall 360ml 120 1 shot (30ml) + 330ml milk (with a little foam)
Caffe Latte / Granti 480ml 140 2 shot (60ml) + 420ml milk (with a little foam)
Caffe Latte / Vanti 600ml 160 2 shot (60ml) + 540ml milk (with a little foam)
Cappuccino / Short 240ml 100 1 shot (30ml) + 105ml milk + 105ml dry/wet foam
Cappuccino / Tall 360ml 120 1 shot (30ml) + 120ml milk + 120ml dry/wet foam
Cappuccino / Granti 480ml 140 2 shot (60ml) + 210ml milk + 210ml dry/wet foam
Cappuccino / Vanti 600ml 160 2 shot (60ml) + 220ml milk + 220ml dry/wet foam
Cappuccino / whipped cream 20 ml +20

Other ideas:

  1. 通常咖啡店如 Starbucks 不會賣到小杯 (比例比較難調)
  2. Dry Foam 是從牛奶發泡而來,沒有規定一定或最小的牛奶量才能製作,所以「需要2杯牛奶」可能不太好調配。
  3. Whip Cream 通常是像配料一樣加上去,不用特別再製作

References:

image

Do not expose public setters on Aggregate root

When doing the order create instruction, there are whole bunch of setters running there.
try to use a business-intention method to wrap up the creation detail, such as
Order purchased = Order.create(DTO);
rather than --->
Order purchaseOrder = new Order();
purchaseOrder.setDrinkHere(orderDTO.isDrinkHere());
purchaseOrder.setItemName(orderDTO.getItemName());
purchaseOrder.setPrice(orderDTO.getPrice());
purchaseOrder.setQuantity(orderDTO.getQuantity());
purchaseOrder.setSeatNo(orderDTO.getSeatNo());

Replace CloudWatch Event by Amazon Event Bridge

Due to there is still some concurrent event put/get limitation on CloudWatch Event, it is better to leverage Amazon Event Bridge to be the Event pipe, to orchestrate or publish events to other appropriate AWS messaging services.

Some problems of Coffeeshop-requirements

咖啡店內

  1. 當客人在店內點咖啡時,咖啡溫度需要維持在70度,便於客戶飲用,若客戶是外帶則會需要把製作溫度調高到90度

There are two kinds of temperature need to be considered: brewing temperature, serving temperature. Which one did you refer? I think the serving temperature is the answer, but do we need to consider about the brewing temperature?
FYI, Are You Serving Coffee at the Ideal Temperature?
-> Espresso brewing temperature: 88°C-98°C

  1. 每一份現煮咖啡我們是義式咖啡的製作方式,每一份濃縮咖啡我們稱之為一個 Shot

What is the size of one shot?
FYI, Espresso wiki - shot variables:
The size can be a single, double, or triple, using a proportional amount of ground coffee, roughly 7 (25ml), 14 (50ml), and 21 (75ml) grams

  1. 盛上述咖啡品項基本單價小杯分別為: 120, 80 , 100, 130, 140 .. 每一杯的飲料大小往上加一級則多加20元

Typos, it should be 80, 100, 120, 140

  1. 當有任何一個原物料的庫存低於30%,需要通知咖啡師與櫃檯進行補貨,可以通過簡訊、email,而真正去購買原料的是由櫃檯人員去負責
  2. 買回來的原物料讓咖啡師確認品項狀態與數量後入庫
  3. 希望未來可以有個可視覺化的呈現頁面去看到原料使用狀態、每月熱銷排行、每週熱銷排行
  4. 每一次補貨都將該物料補到100%,並且需要在3天內到貨完成

I think the 12th, 13th, 14th(not sure), 15th item belong to "進貨原物料"

進貨原物料

  1. 購買牛奶時會需要提供低脂牛奶 (Low-fat Milk)或者 豆奶(Soy Milk)

This one should sit in "提供客製化體驗需求"

製作咖啡

  1. 美式咖啡 - 製作成分為 1 shot 濃縮咖啡與水

How much water do we need?
Take 美式咖啡 as reference, I think 1:12 is a candidate.

Upgrade AWS SDK Java to 2.x

Because of the latest aws sdk for java has much performance enhancement, it's better to upgrade to experiment the enhancement.

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.