[DDD] Expressing Domain Knowledge Through Models Using Golang

Introduction This is a repost of the article from zenn. This is the 6th day article for Go Advent Calendar 2021. Since there are incredibly understandable books by Eric Evans sensei and predecessors about DDD, I recommend reading these. (laugh) Domain-Driven Design Modeling/Implementation Guide Domain-Driven Design Sample Code & FAQ Introduction to Domain-Driven Design: Understanding from Bottom-Up! Basics of Domain-Driven Design So here, without detailed explanation of DDD, I’ll explain how to incorporate domain knowledge into software using models with Golang, with a simple concrete example. ...

2021/12/05 · joj0hq

【DDD】Golangを使ってモデルでドメイン知識を表現してみた

はじめに zenn の記事の転載です。 これはGo Advent Calendar 2021の 6 日目の記事です。 DDD についてはエリック・エヴァンス先生や先人の鬼ほどわかりやすい書籍があるので、 こちらを読むことをおすすめします。(笑) ドメイン駆動設計 モデリング/実装ガイド ドメイン駆動設計 サンプルコード&FAQ ドメイン駆動設計入門 ボトムアップでわかる!ドメイン駆動設計の基本 なのでここでは、DDD を詳しく解説などはせずに、 Golang を使ってモデルでドメイン知識をどのようにソフトウェアに落とし込むのか、 簡単な具体例をあげて説明していきます。 ドメイン駆動設計(DDD)とは? とはいっても、ドメイン駆動設計とはなんぞやをカンタンに説明しておきますね。 DDD Referenceでの定義を以下に記します。 Domain-Driven Design is an approach to the development of complex software in which we: Focus on the core domain. Explore models in a creative collaboration of domain practitioners and software practitioners. Speak a ubiquitous language within an explicitly bounded context. This three-point summary of DDD depends on the definition of the terms, which are defined in this booklet. 出典 URL:https://www.domainlanguage.com/ddd/reference/ ...

2021/12/05 · joj0hq

[Introduction] Understanding the Redux State Management System

Conclusion First This is a repost of the article from zenn. To understand Redux, if you can understand this diagram (source: Redux Application Data Flow), you’re 90% there. From user input, (ActionCreator) creates an Action Dispatch (send) the Action to Store (where state is managed) Pass the dispatched Action to Reducer (where state is changed) Store saves the new State created by Reducer Reference data from Store and render in View (screen) If there are any corrections like “This is wrong!” or “This mechanism is also used!”, please give me feedback! (That’s partly why I’m writing this!) ...

2021/03/21 · joj0hq

【入門編】Reduxによる状態管理の仕組みを理解する

まず結論から zenn の記事の転載です。 Redux を理解する上では、この図解(引用元:Redux Application Data Flow)を理解できれば 90%は OK。 ユーザーの入力から、(ActionCreator が)Action(アクション)を作成する Store(状態を管理するところ)へ Action を Dispatch(送信)する Dispatch された Action を Reducer(状態を変更するところ)へ渡す Reducer が作成した新しい State を Store が保存する Store からデータを参照して View(画面)に描画する 「ここが間違ってる!」や「もっとこんな仕組みが使われてるよ!」等のツッコミがあれば、どしどし貰えると助かります!(そのために書いてるみたいなところも多いので!) Redux とは Reduxは、React が扱う UI の state(状態)を管理をするためのフレームワークです。 React では state の管理するデータフローにFluxを提案していますが、Redux は Flux の概念を拡張してより扱いやすく設計されています。 React 以外にも AngularJS や jQuery などと併用して使用することもできますが、React と使用するのがベターです。 Redux - GitHub Redux の 3 原則(Three Principles) Redux の基本設計は以下の 3 つの原則に基づいて設計されています。 順を追って見ていきましょう。 Single source of truth(ソースは1つだけ) この原則は以下のような要約できます。 ...

2021/03/21 · joj0hq

Home Hacking for Houseplants: Automating Temperature Management

Current Situation and Issues I have about 6 staghorn ferns at home, and while they’re relatively easy to care for, since they originally live in warm places without winter, ideally I’d like to somehow maintain around 15-20 degrees Celsius. Recently, it’s become relatively warmer, but since I live in the suburbs, sometimes it gets cold enough to drop below 10 degrees, so I want to create a comfortable environment for them. ...

2021/03/21 · joj0hq