Skip to content

Instantly share code, notes, and snippets.

@humorless
Last active February 9, 2021 04:53
Show Gist options
  • Save humorless/0d67e3b5b2d61f106e5ab5a77217b165 to your computer and use it in GitHub Desktop.
Save humorless/0d67e3b5b2d61f106e5ab5a77217b165 to your computer and use it in GitHub Desktop.
Enter Integrant: A Micro-framework for Data-Driven Architecture -> 心得

Integrant 是什麼?解決了什麼問題?

  • integrant 是 micro-framework ,處理類似 component, mount 在處理的問題。

比較競品

componentmount

功能是讓 application 裡頭含有 app state 的部分與 code 分開,可以獨立地重新載入。

  • 細節

    • 設計一個 state structure 去包含 app state
    • app 啟動時,configuration 最先被載入 state structure
    • 開發 application 時,透過 code 來描述主要組件與 state structure 之間的依賴關系。
  • Application --> state structure ---> config/env

integrant 的特性

  • 細節

    • 使用者開發 application 時,將主要組件的依賴關系,透過 data literal 來描述。
    • 主要組件的關鍵函數,掛附到 data literal 的 keywords 上。
    • configuration 也是掛附到 data literal 的 keywords 上。
  • Branch code of the application --> The application core, described in data literal --> config/env

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment