- integrant 是 micro-framework ,處理類似 component, mount 在處理的問題。
component
與 mount
:
功能是讓 application 裡頭含有 app state 的部分與 code 分開,可以獨立地重新載入。
-
細節
- 設計一個 state structure 去包含 app state
- app 啟動時,configuration 最先被載入 state structure
- 開發 application 時,透過 code 來描述主要組件與 state structure 之間的依賴關系。
-
Application --> state structure ---> config/env
-
細節
- 使用者開發 application 時,將主要組件的依賴關系,透過 data literal 來描述。
- 主要組件的關鍵函數,掛附到 data literal 的 keywords 上。
- configuration 也是掛附到 data literal 的 keywords 上。
-
Branch code of the application --> The application core, described in data literal --> config/env