Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

アーキテクチャ構成 #19

cocoide started this conversation in General
Discussion options

以下、二つのアーキテクチャを組み合わせて構成されてる

  • Elmアーキテクチャ (特にbubbleteaを使う上で欠かせない構成)
    Model: 状態(Reactで言う所のuseStateのstateの部分)
    View: 描画(string型でModelの状態で決まる)
    Update: Modelの更新(UpdateでしかModelは更新できない)
    (補足)
    Init()関数は初期の一回しか発火しない

  • Layeredアーキテクチャ
    複数の層に分けて保守性、可読性を上げる設計手法
    → Service層(ビジネスロジックを書く)、Gateway層(外部APIとのやり取りを抽象化する層)を今のところ採用
    他にもRespository層(Databaseとのやり取りを抽象化する)も入れるかもしれない
    →Interface自体もファイルを分けて依存関係を細かく定義するクリーンアーキテクチャにした方がいいかもしれないが、開発効率を優先して雑なLayerdアーキテクチャと今はなってる

Service層: GeneraMessageService: メッセージの生成、加工に関するクラス

You must be logged in to vote

Replies: 1 comment

Comment options

graph TD;
 Client-->Presentation;
 Presentation-->Service;
 Service-->Gateway;
 Service-->Repository;
Loading
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /