Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generator と message と store が密結合してる #109

Open
koron opened this issue May 10, 2020 · 0 comments
Open

generator と message と store が密結合してる #109

koron opened this issue May 10, 2020 · 0 comments

Comments

@koron
Copy link
Member

koron commented May 10, 2020

理想的な構成としては、
messageは単なる器でモデルにとどまるべき。
storeは名前とDBというかモデルをどう構造化して可能するかに注力するべき(repositoryってやつ)。
generatorはstoreからmessageなどのモデルを適宜取り出して、HTMLを作ることに注力すべき。

なのにいまはそれぞれがお互いの責任境界を越えていらんことしてる。
そのため、たとえばmessageがチャンネルのメッセージデータを読むときに
スレッドを構築しているため日付順にファイルを読まないとならない
みたいなおかしな制約が存在している。

ちなみにこれは store に message を突っ込むときに
store が構造化の面倒をみるべきはなし。


これらをちゃんとあるべきところに分解してやる必要がある

@koron koron changed the title generator と message to generator と message と store が密結合してる May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant