cabloy 5.1.60 → 5.1.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/.claude/hooks/contract-loop-gate.ts +296 -0
  2. package/.claude/settings.json +16 -0
  3. package/.claude/skills/cabloy-backend-scaffold/SKILL.md +2 -0
  4. package/.claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +1 -0
  5. package/.claude/skills/cabloy-contract-loop/SKILL.md +89 -16
  6. package/.claude/skills/cabloy-contract-loop/references/contract-loop-map.md +102 -14
  7. package/.claude/skills/cabloy-contract-loop/references/resource-custom-state-pattern.md +4 -0
  8. package/.claude/skills/cabloy-contract-loop/references/verification-checklist.md +32 -14
  9. package/.claude/skills/cabloy-domain-planning/SKILL.md +212 -0
  10. package/.claude/skills/cabloy-frontend-scaffold/SKILL.md +13 -0
  11. package/.claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +2 -0
  12. package/.claude/skills/cabloy-module-removal/SKILL.md +144 -0
  13. package/.claude/skills/cabloy-resource-field-update/SKILL.md +7 -0
  14. package/.claude/skills/cabloy-zova-source-reading/SKILL.md +221 -0
  15. package/.claude/skills/cabloy-zova-source-reading/references/analysis-modes.md +91 -0
  16. package/.claude/skills/cabloy-zova-source-reading/references/core-reading-paths.md +117 -0
  17. package/CHANGELOG.md +64 -0
  18. package/CLAUDE.md +11 -0
  19. package/cabloy-docs/.vitepress/config.mjs +197 -5
  20. package/cabloy-docs/ai/cli-to-skill-map.md +7 -0
  21. package/cabloy-docs/ai/docs-skills-rules-mapping.md +22 -0
  22. package/cabloy-docs/ai/future-skill-roadmap.md +12 -7
  23. package/cabloy-docs/ai/introduction.md +1 -0
  24. package/cabloy-docs/ai/playbook-backend-module.md +6 -0
  25. package/cabloy-docs/ai/playbook-module-removal.md +164 -0
  26. package/cabloy-docs/ai/skills.md +12 -0
  27. package/cabloy-docs/backend/backend-contract-emission-output-inspection.md +189 -0
  28. package/cabloy-docs/backend/backend-contract-emission-source-reading-map.md +160 -0
  29. package/cabloy-docs/backend/backend-contract-emission-specimen.md +170 -0
  30. package/cabloy-docs/backend/backend-resource-module-contract-chain.md +323 -0
  31. package/cabloy-docs/backend/backend-source-reading-debug-checklist.md +173 -0
  32. package/cabloy-docs/backend/backend-source-reading-roadmap.md +129 -0
  33. package/cabloy-docs/backend/backend-source-reading-verify-playbook.md +166 -0
  34. package/cabloy-docs/backend/bean-scene-authoring.md +4 -4
  35. package/cabloy-docs/backend/broadcast-guide.md +3 -3
  36. package/cabloy-docs/backend/cli.md +20 -11
  37. package/cabloy-docs/backend/config-guide.md +4 -4
  38. package/cabloy-docs/backend/controller-aop-guide.md +10 -10
  39. package/cabloy-docs/backend/controller-guide.md +12 -2
  40. package/cabloy-docs/backend/crud-workflow.md +7 -3
  41. package/cabloy-docs/backend/dto-guide.md +18 -2
  42. package/cabloy-docs/backend/dto-infer-generation.md +201 -25
  43. package/cabloy-docs/backend/election-guide.md +2 -2
  44. package/cabloy-docs/backend/entity-guide.md +30 -3
  45. package/cabloy-docs/backend/error-guide.md +3 -3
  46. package/cabloy-docs/backend/event-guide.md +4 -4
  47. package/cabloy-docs/backend/external-aop-guide.md +2 -2
  48. package/cabloy-docs/backend/field-indexes.md +9 -3
  49. package/cabloy-docs/backend/foundation.md +8 -8
  50. package/cabloy-docs/backend/i18n-guide.md +6 -6
  51. package/cabloy-docs/backend/internal-aop-guide.md +2 -2
  52. package/cabloy-docs/backend/introduction.md +15 -0
  53. package/cabloy-docs/backend/migration-and-changes.md +3 -3
  54. package/cabloy-docs/backend/model-guide.md +16 -6
  55. package/cabloy-docs/backend/openapi-guide.md +3 -0
  56. package/cabloy-docs/backend/queue-guide.md +3 -3
  57. package/cabloy-docs/backend/redlock-guide.md +2 -2
  58. package/cabloy-docs/backend/schedule-guide.md +2 -2
  59. package/cabloy-docs/backend/scripts.md +8 -0
  60. package/cabloy-docs/backend/serialization-guide.md +12 -2
  61. package/cabloy-docs/backend/service-guide.md +18 -9
  62. package/cabloy-docs/backend/startup-guide.md +5 -5
  63. package/cabloy-docs/backend/status-guide.md +271 -0
  64. package/cabloy-docs/backend/unit-testing.md +3 -3
  65. package/cabloy-docs/backend/vona-source-reading-map.md +157 -0
  66. package/cabloy-docs/backend/websocket-protocol-guide.md +5 -5
  67. package/cabloy-docs/backend/websocket-usage-guide.md +15 -8
  68. package/cabloy-docs/frontend/a-model-under-the-hood.md +281 -0
  69. package/cabloy-docs/frontend/a-openapi-under-the-hood.md +248 -0
  70. package/cabloy-docs/frontend/a-router-guide.md +307 -0
  71. package/cabloy-docs/frontend/api-guide.md +6 -4
  72. package/cabloy-docs/frontend/api-schema-guide.md +1 -0
  73. package/cabloy-docs/frontend/app-startup-guide.md +7 -4
  74. package/cabloy-docs/frontend/bean-scene-authoring.md +3 -1
  75. package/cabloy-docs/frontend/behavior-guide.md +16 -16
  76. package/cabloy-docs/frontend/cli.md +14 -2
  77. package/cabloy-docs/frontend/command-scene-authoring.md +504 -0
  78. package/cabloy-docs/frontend/component-guide.md +5 -5
  79. package/cabloy-docs/frontend/component-props-guide.md +1 -1
  80. package/cabloy-docs/frontend/component-v-model-guide.md +2 -2
  81. package/cabloy-docs/frontend/design-principles.md +6 -0
  82. package/cabloy-docs/frontend/fetch-interceptor-guide.md +440 -0
  83. package/cabloy-docs/frontend/filter-query-select-data-flow-guide.md +260 -0
  84. package/cabloy-docs/frontend/form-guide.md +786 -0
  85. package/cabloy-docs/frontend/form-scene-to-page-meta-guide.md +303 -0
  86. package/cabloy-docs/frontend/foundation.md +33 -0
  87. package/cabloy-docs/frontend/frontend-source-reading-roadmap.md +249 -0
  88. package/cabloy-docs/frontend/generated-contract-consumption-debug-checklist.md +190 -0
  89. package/cabloy-docs/frontend/generated-contract-consumption-entry-branch.md +205 -0
  90. package/cabloy-docs/frontend/generated-contract-consumption-list-branch.md +157 -0
  91. package/cabloy-docs/frontend/generated-contract-consumption-specimen.md +203 -0
  92. package/cabloy-docs/frontend/generated-contract-consumption-verify-playbook.md +189 -0
  93. package/cabloy-docs/frontend/generic-component-guide.md +1 -1
  94. package/cabloy-docs/frontend/introduction.md +38 -5
  95. package/cabloy-docs/frontend/ioc-and-beans.md +6 -0
  96. package/cabloy-docs/frontend/mock-guide.md +1 -0
  97. package/cabloy-docs/frontend/model-architecture.md +288 -39
  98. package/cabloy-docs/frontend/model-resource-best-practices.md +379 -0
  99. package/cabloy-docs/frontend/model-resource-cookbook.md +508 -0
  100. package/cabloy-docs/frontend/model-resource-internals-deep-dive.md +238 -0
  101. package/cabloy-docs/frontend/model-resource-owner-pattern.md +402 -0
  102. package/cabloy-docs/frontend/model-resource-usage-guide.md +334 -0
  103. package/cabloy-docs/frontend/model-state-guide.md +371 -15
  104. package/cabloy-docs/frontend/module-scope.md +8 -8
  105. package/cabloy-docs/frontend/modules-and-suites.md +2 -1
  106. package/cabloy-docs/frontend/navigation-guards-guide.md +7 -0
  107. package/cabloy-docs/frontend/openapi-sdk-guide.md +17 -6
  108. package/cabloy-docs/frontend/page-guide.md +15 -9
  109. package/cabloy-docs/frontend/page-meta-guide.md +466 -0
  110. package/cabloy-docs/frontend/page-params-guide.md +3 -3
  111. package/cabloy-docs/frontend/page-query-guide.md +2 -2
  112. package/cabloy-docs/frontend/page-route-guide.md +6 -0
  113. package/cabloy-docs/frontend/permission-formscene-action-visibility-guide.md +263 -0
  114. package/cabloy-docs/frontend/quickstart.md +18 -2
  115. package/cabloy-docs/frontend/reading-zova-for-vue-developers.md +266 -0
  116. package/cabloy-docs/frontend/resource-entry-page-deep-dive.md +271 -0
  117. package/cabloy-docs/frontend/resource-list-page-deep-dive.md +279 -0
  118. package/cabloy-docs/frontend/rest-resource-source-reading-map.md +522 -0
  119. package/cabloy-docs/frontend/rest-resource-under-the-hood.md +622 -0
  120. package/cabloy-docs/frontend/root-behaviors-guide.md +282 -0
  121. package/cabloy-docs/frontend/route-alias-guide.md +6 -0
  122. package/cabloy-docs/frontend/router-stack-guide.md +229 -0
  123. package/cabloy-docs/frontend/router-tabs-introduction.md +26 -3
  124. package/cabloy-docs/frontend/router-tabs-layout-integration.md +367 -0
  125. package/cabloy-docs/frontend/router-tabs-mechanism.md +6 -0
  126. package/cabloy-docs/frontend/router-tabs-route-meta-cookbook.md +7 -0
  127. package/cabloy-docs/frontend/router-tabs-vs-stack.md +167 -0
  128. package/cabloy-docs/frontend/router-view-hosts-guide.md +450 -0
  129. package/cabloy-docs/frontend/server-data.md +4 -1
  130. package/cabloy-docs/frontend/system-startup-guide.md +2 -2
  131. package/cabloy-docs/frontend/table-action-visibility-permission-flow-guide.md +263 -0
  132. package/cabloy-docs/frontend/table-cell-cookbook.md +568 -0
  133. package/cabloy-docs/frontend/table-guide.md +373 -0
  134. package/cabloy-docs/frontend/table-resource-crud-cookbook.md +496 -0
  135. package/cabloy-docs/frontend/zova-app-guide.md +251 -0
  136. package/cabloy-docs/frontend/zova-form-source-reading-map.md +293 -0
  137. package/cabloy-docs/frontend/zova-form-under-the-hood.md +561 -0
  138. package/cabloy-docs/frontend/zova-reactivity-under-the-hood.md +320 -0
  139. package/cabloy-docs/frontend/zova-router-under-the-hood.md +561 -0
  140. package/cabloy-docs/frontend/zova-source-reading-map.md +421 -0
  141. package/cabloy-docs/frontend/zova-table-controller-render-supplement.md +225 -0
  142. package/cabloy-docs/frontend/zova-table-source-reading-map.md +317 -0
  143. package/cabloy-docs/frontend/zova-table-under-the-hood.md +532 -0
  144. package/cabloy-docs/frontend/zova-vs-vue3-comparison.md +308 -0
  145. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-debug-checklist.md +245 -0
  146. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-source-reading-map.md +139 -0
  147. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions-verify-playbook.md +248 -0
  148. package/cabloy-docs/fullstack/backend-metadata-to-frontend-table-actions.md +511 -0
  149. package/cabloy-docs/fullstack/contract-loop-playbook.md +356 -0
  150. package/cabloy-docs/fullstack/edition-collaboration-differences.md +6 -0
  151. package/cabloy-docs/fullstack/frontend-metadata-to-backend.md +199 -23
  152. package/cabloy-docs/fullstack/introduction.md +15 -1
  153. package/cabloy-docs/fullstack/openapi-to-sdk.md +135 -11
  154. package/cabloy-docs/fullstack/suites-and-modules.md +333 -0
  155. package/cabloy-docs/fullstack/tutorial-1-first-module.md +3 -0
  156. package/cabloy-docs/fullstack/tutorial-2-first-crud.md +4 -0
  157. package/cabloy-docs/fullstack/tutorial-3-frontend-metadata-sharing.md +6 -2
  158. package/cabloy-docs/fullstack/tutorial-4-custom-level-renderers.md +60 -23
  159. package/cabloy-docs/fullstack/tutorial-5-backend-contract-sharing.md +14 -7
  160. package/cabloy-docs/fullstack/tutorial-6-one-contract-four-uses.md +6 -0
  161. package/cabloy-docs/fullstack/tutorials-overview.md +17 -4
  162. package/cabloy-docs/reference/bean-scene-boilerplates.md +15 -13
  163. package/cabloy-docs/reference/package-map.md +4 -3
  164. package/package.json +2 -1
  165. package/scripts/init.ts +2 -18
  166. package/scripts/initTestData.ts +25 -0
  167. package/scripts/upgrade.ts +17 -2
  168. package/vona/pnpm-lock.yaml +48 -194
  169. package/vona/src/suite/a-training/modules/training-student/package.json +53 -0
  170. package/vona/src/suite/a-training/modules/training-student/src/.metadata/index.ts +400 -0
  171. package/vona/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +18 -0
  172. package/vona/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
  173. package/vona/src/suite/a-training/modules/training-student/src/bean/meta.index.ts +12 -0
  174. package/vona/src/suite/a-training/modules/training-student/src/bean/meta.version.ts +21 -0
  175. package/vona/src/suite/a-training/modules/training-student/src/bean/ssrMenu.student.ts +29 -0
  176. package/vona/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +15 -0
  177. package/vona/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +15 -0
  178. package/vona/src/suite/a-training/modules/training-student/src/controller/student.ts +74 -0
  179. package/vona/src/suite/a-training/modules/training-student/src/dto/studentCreate.tsx +28 -0
  180. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectReq.tsx +44 -0
  181. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectRes.tsx +11 -0
  182. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSelectResItem.tsx +45 -0
  183. package/vona/src/suite/a-training/modules/training-student/src/dto/studentSummary.tsx +42 -0
  184. package/vona/src/suite/a-training/modules/training-student/src/dto/studentUpdate.tsx +28 -0
  185. package/vona/src/suite/a-training/modules/training-student/src/dto/studentView.tsx +25 -0
  186. package/vona/src/suite/a-training/modules/training-student/src/entity/student.tsx +84 -0
  187. package/vona/src/suite/a-training/modules/training-student/src/index.ts +2 -0
  188. package/vona/src/suite/a-training/modules/training-student/src/model/student.ts +10 -0
  189. package/vona/src/suite/a-training/modules/training-student/src/service/student.ts +57 -0
  190. package/vona/src/suite/a-training/modules/training-student/test/student.test.ts +173 -0
  191. package/vona/src/suite/a-training/modules/training-student/tsconfig.build.json +11 -0
  192. package/vona/src/suite/a-training/modules/training-student/tsconfig.json +7 -0
  193. package/vona/src/suite/a-training/package.json +12 -0
  194. package/vona/src/suite/a-training/tsconfig.base.json +4 -0
  195. package/vona/src/suite/a-training/tsconfig.json +10 -0
  196. package/zova/packages-cli/cli/package.json +2 -2
  197. package/zova/packages-cli/cli-set-front/cli/templates/openapi/config/boilerplate/module/openapi.config.ts +6 -1
  198. package/zova/packages-cli/cli-set-front/package.json +1 -1
  199. package/zova/packages-cli/cli-set-front/src/lib/bean/cli.openapi.generate.ts +34 -4
  200. package/zova/packages-zova/zova/package.json +2 -2
  201. package/zova/pnpm-lock.yaml +416 -690
  202. package/zova/src/suite/a-training/modules/training-student/cli/openapi.config.ts +9 -0
  203. package/zova/src/suite/a-training/modules/training-student/package.json +52 -0
  204. package/zova/src/suite/a-training/modules/training-student/src/.metadata/component/formFieldLevel.ts +31 -0
  205. package/zova/src/suite/a-training/modules/training-student/src/.metadata/index.ts +258 -0
  206. package/zova/src/suite/a-training/modules/training-student/src/.metadata/locales.ts +7 -0
  207. package/zova/src/suite/a-training/modules/training-student/src/.metadata/this.ts +2 -0
  208. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/baseURL.ts +5 -0
  209. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/index.ts +3 -0
  210. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/schemas.ts +196 -0
  211. package/zova/src/suite/a-training/modules/training-student/src/api/openapi/types.ts +4146 -0
  212. package/zova/src/suite/a-training/modules/training-student/src/api/trainingStudent.ts +151 -0
  213. package/zova/src/suite/a-training/modules/training-student/src/apiSchema/trainingStudent.ts +43 -0
  214. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionDeleteForce.tsx +51 -0
  215. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.actionSummary.tsx +56 -0
  216. package/zova/src/suite/a-training/modules/training-student/src/bean/tableCell.level.tsx +63 -0
  217. package/zova/src/suite/a-training/modules/training-student/src/component/formFieldLevel/controller.tsx +117 -0
  218. package/zova/src/suite/a-training/modules/training-student/src/config/locale/en-us.ts +9 -0
  219. package/zova/src/suite/a-training/modules/training-student/src/config/locale/zh-cn.ts +9 -0
  220. package/zova/src/suite/a-training/modules/training-student/src/index.ts +2 -0
  221. package/zova/src/suite/a-training/modules/training-student/src/model/student.ts +42 -0
  222. package/zova/src/suite/a-training/modules/training-student/tsconfig.build.json +13 -0
  223. package/zova/src/suite/a-training/modules/training-student/tsconfig.json +5 -0
  224. package/zova/src/suite/a-training/package.json +12 -0
  225. package/zova/src/suite/a-training/tsconfig.base.json +4 -0
  226. package/zova/src/suite/a-training/tsconfig.json +4 -0
  227. package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/formFieldSelect/controller.tsx +29 -7
  228. package/zova/src/suite/cabloy-basic/modules/basic-select/src/component/select/controller.tsx +34 -11
  229. package/zova/src/suite-vendor/a-zova/modules/a-table/package.json +1 -1
  230. package/zova/src/suite-vendor/a-zova/modules/a-table/src/component/table/controller.tsx +3 -3
  231. package/zova/src/suite-vendor/a-zova/modules/a-table/src/lib/tableCell.ts +1 -1
  232. package/zova/src/suite-vendor/a-zova/package.json +2 -2
@@ -0,0 +1,320 @@
1
+ # Zova Reactivity Under the Hood
2
+
3
+ This guide explains the source-level runtime path behind Zova’s reactive page and component authoring model.
4
+
5
+ Use this page after [Reading Zova for Vue Developers](/frontend/reading-zova-for-vue-developers) when you want to move from the public mental model to the core source path that makes plain controller fields behave reactively.
6
+
7
+ ## Why this page exists
8
+
9
+ The public frontend docs already explain the architectural intent:
10
+
11
+ - Zova keeps Vue 3 reactive strengths
12
+ - Zova prefers controller-oriented and bean-oriented authoring
13
+ - IoC and bean scopes organize state and behavior sharing
14
+
15
+ What many source readers still want next is the implementation bridge:
16
+
17
+ - where the controller instance is created
18
+ - where it becomes reactive
19
+ - where `$computed` connects back to Vue `computed`
20
+ - where page route state is pushed onto the controller
21
+ - where controller-driven render logic joins the normal update flow
22
+
23
+ This page is that bridge.
24
+
25
+ ## The shortest accurate runtime model
26
+
27
+ For a page controller, the shortest accurate model is:
28
+
29
+ 1. `useControllerPage(...)` creates the Zova context and controller load path
30
+ 2. the bean container creates the controller bean with `markReactive = true`
31
+ 3. the bean container wraps the controller instance with Vue `reactive(...)`
32
+ 4. bean helpers such as `$computed()` and `$watch()` wrap Vue reactive APIs inside the controller instance scope
33
+ 5. the component runtime patches render so the controller or render bean becomes the effective render entry
34
+ 6. before each render, page-controller route data can be refreshed onto the controller surface
35
+ 7. when a controller field changes, Vue dependency tracking drives recomputation and rerender
36
+
37
+ That is why Zova can offer direct-looking class-field authoring while still using Vue runtime behavior underneath.
38
+
39
+ ## A concrete source specimen
40
+
41
+ A small public example that shows the pattern clearly is:
42
+
43
+ ```text
44
+ zova/src/suite/a-demo/modules/demo-basic/src/page/state/controller.tsx
45
+ ```
46
+
47
+ Representative shape:
48
+
49
+ ```typescript
50
+ @Controller()
51
+ export class ControllerPageState extends BeanControllerPageBase {
52
+ count: number = 0;
53
+ count2: string;
54
+
55
+ protected async __init__() {
56
+ this.count2 = this.$computed(() => {
57
+ return `=== ${this.count} ===`;
58
+ });
59
+ }
60
+
61
+ increment() {
62
+ this.count++;
63
+ }
64
+
65
+ protected render() {
66
+ return <div>{this.count2}</div>;
67
+ }
68
+ }
69
+ ```
70
+
71
+ What matters here is not only the syntax.
72
+
73
+ What matters is that:
74
+
75
+ - `count` is a plain class field
76
+ - `count2` is instance-level derived state
77
+ - `increment()` mutates the controller instance directly
78
+ - `render()` reads controller fields directly
79
+
80
+ The rest of this page explains how that becomes real runtime reactivity.
81
+
82
+ ## The core source-reading path
83
+
84
+ When you want to trace the implementation, read these files in order:
85
+
86
+ 1. `zova/packages-zova/zova-core/src/composables/useController.ts`
87
+ 2. `zova/packages-zova/zova-core/src/bean/beanContainer.ts`
88
+ 3. `zova/packages-zova/zova-core/src/bean/beanBase.ts`
89
+ 4. `zova/packages-zova/zova-core/src/bean/beanControllerPageBase.ts`
90
+ 5. `zova/packages-zova/zova-core/src/core/context/component.ts`
91
+ 6. `zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts`
92
+
93
+ A compact role map is:
94
+
95
+ - `useController.ts` creates and loads controller, style, and render beans
96
+ - `beanContainer.ts` instantiates beans, injects context, and applies `reactive(...)`
97
+ - `beanBase.ts` exposes instance-scoped wrappers around Vue helpers such as `computed` and `watch`
98
+ - `beanControllerPageBase.ts` provides the page-controller hook points for route-aware controller data updates
99
+ - `component.ts` redirects component render toward controller-oriented render flow
100
+ - `a-router/src/monkey.ts` pushes page route state onto page controllers
101
+
102
+ ## Step-by-step runtime path
103
+
104
+ ### 1. `useControllerPage(...)` starts the controller load path
105
+
106
+ The public entrypoint for a page is `useControllerPage(...)` in:
107
+
108
+ ```text
109
+ zova/packages-zova/zova-core/src/composables/useController.ts
110
+ ```
111
+
112
+ The important job here is not only creating a helper.
113
+
114
+ It creates the Zova context, prepares controller data, and registers the async load path that will create the controller bean and related beans.
115
+
116
+ A practical reading takeaway is:
117
+
118
+ - **the page controller is not an ad hoc class instance created by page code**
119
+ - **it is created by the framework runtime inside the bean/container model**
120
+
121
+ ### 2. The controller bean is created with `markReactive = true`
122
+
123
+ Inside the controller load path, the framework calls the bean container to create the controller bean with reactive wrapping enabled.
124
+
125
+ That is the key bridge between:
126
+
127
+ - plain class authoring in user code
128
+ - real Vue reactive behavior at runtime
129
+
130
+ A practical reading takeaway is:
131
+
132
+ - **the framework decides that the controller instance itself is a reactive host**
133
+
134
+ ### 3. The bean container wraps the instance with Vue `reactive(...)`
135
+
136
+ In:
137
+
138
+ ```text
139
+ zova/packages-zova/zova-core/src/bean/beanContainer.ts
140
+ ```
141
+
142
+ The bean container:
143
+
144
+ - creates the class instance
145
+ - attaches framework context such as `sys`, `app`, and `ctx`
146
+ - records bean identity metadata
147
+ - applies Vue `reactive(...)` when the bean should be reactive
148
+ - may also patch the bean with AOP-oriented proxy behavior before the final reactive wrapper is exposed
149
+
150
+ This is one of the most important source-level facts for understanding Zova.
151
+
152
+ Zova does not require the business author to write `reactive({ ... })` around controller state, because the framework already treats the controller bean as the reactive object.
153
+
154
+ ### 4. `$computed()` is an instance-scoped wrapper around Vue `computed(...)`
155
+
156
+ In:
157
+
158
+ ```text
159
+ zova/packages-zova/zova-core/src/bean/beanBase.ts
160
+ ```
161
+
162
+ Helpers such as these are exposed from the bean surface:
163
+
164
+ - `$computed()`
165
+ - `$watch()`
166
+ - `$watchEffect()`
167
+ - `$watchPostEffect()`
168
+ - `$watchSyncEffect()`
169
+ - `$toRef()`
170
+ - `$customRef()`
171
+
172
+ The important reading point is:
173
+
174
+ - **Zova is not replacing Vue `computed` with a different reactive theory**
175
+ - **Zova is exposing Vue’s reactive capabilities through a bean-oriented, instance-scoped API surface**
176
+
177
+ So when a controller writes:
178
+
179
+ ```typescript
180
+ this.count2 = this.$computed(() => {
181
+ return `=== ${this.count} ===`;
182
+ });
183
+ ```
184
+
185
+ what really happens is still dependency tracking through Vue’s computed system.
186
+
187
+ ### 5. Page-controller route data uses a controller-data update path
188
+
189
+ In:
190
+
191
+ ```text
192
+ zova/packages-zova/zova-core/src/bean/beanControllerPageBase.ts
193
+ ```
194
+
195
+ page controllers expose page-oriented controller data refresh hooks.
196
+
197
+ Then in:
198
+
199
+ ```text
200
+ zova/src/suite-vendor/a-zova/modules/a-router/src/monkey.ts
201
+ ```
202
+
203
+ route-aware controller data is prepared, initialized, and updated.
204
+
205
+ That is where page-controller members such as these are maintained:
206
+
207
+ - `$route`
208
+ - `$params`
209
+ - `$query`
210
+
211
+ A practical reading takeaway is:
212
+
213
+ - **page route state is not only pulled ad hoc by the page**
214
+ - **the framework pushes and refreshes route-aware controller data as part of the page-controller runtime path**
215
+
216
+ This is one of the biggest differences a Vue-first reader usually notices.
217
+
218
+ ### 6. The component runtime patches render toward the controller/render bean path
219
+
220
+ In:
221
+
222
+ ```text
223
+ zova/packages-zova/zova-core/src/core/context/component.ts
224
+ ```
225
+
226
+ Zova patches the component instance render method so the effective render flow becomes controller-oriented.
227
+
228
+ That is why the framework can support these patterns consistently:
229
+
230
+ - render directly inside the controller
231
+ - split render into a dedicated render bean later
232
+ - keep the higher-level page/component authoring model stable while the implementation grows
233
+
234
+ A practical reading takeaway is:
235
+
236
+ - **render is not treated as only a local component-file concern**
237
+ - **render is part of the controller/bean architecture**
238
+
239
+ ### 7. Field mutation becomes normal reactive invalidation and rerender
240
+
241
+ Once the controller bean is reactive and render has read its fields, changes such as:
242
+
243
+ ```typescript
244
+ this.count++;
245
+ ```
246
+
247
+ behave the way a Vue reader would expect at the reactive-engine level:
248
+
249
+ - the field change invalidates dependencies
250
+ - computed values depending on that field are recomputed
251
+ - the next render sees the updated values
252
+
253
+ So the runtime behavior is still recognizably Vue-like.
254
+
255
+ The architectural surface is what changed.
256
+
257
+ ## A compact call-flow sketch
258
+
259
+ ```text
260
+ useControllerPage(...)
261
+ -> _useController(...)
262
+ -> ctx.bean._newBeanInner(..., markReactive = true)
263
+ -> BeanContainer creates controller bean
264
+ -> BeanContainer applies reactive(...)
265
+ -> controller __init__ wires $computed / $watch helpers
266
+ -> component render is patched toward controller/render bean
267
+ -> render-time controller data update refreshes page route data
268
+ -> render reads controller fields
269
+ -> field mutation invalidates dependencies
270
+ -> rerender produces updated UI
271
+ ```
272
+
273
+ Use this sketch as the durable mental model even if lower-level implementation details evolve over time.
274
+
275
+ ## What is stable vs what is implementation detail
276
+
277
+ ### Stable public architectural idea
278
+
279
+ The following ideas are durable and should guide how you read and extend Zova code:
280
+
281
+ - controller and bean instances are first-class authoring surfaces
282
+ - Vue reactivity is still the foundation underneath
283
+ - bean lifecycle and IoC scope are central to the architecture
284
+ - render flow is controller-oriented
285
+ - route-aware page state is part of the page-controller surface
286
+
287
+ ### More implementation-shaped detail
288
+
289
+ The following details are helpful for source reading, but are not the main public design lesson:
290
+
291
+ - the exact internal helper names
292
+ - the exact order of intermediate load helpers
293
+ - the exact proxy or monkey hook boundaries used by the runtime
294
+ - the exact render patch mechanics inside the component context implementation
295
+
296
+ This distinction matters because public docs should teach the durable model first, then use source details only to clarify that model.
297
+
298
+ ## When to use this page
299
+
300
+ Use this page when:
301
+
302
+ - you already understand the public Zova architecture but want to trace the runtime source path
303
+ - you need to debug why a page controller field updates the UI
304
+ - you need to understand where route state is refreshed before render
305
+ - you are deciding whether a change belongs in controller authoring, bean lifecycle, route synchronization, or render-flow plumbing
306
+
307
+ If you are still learning the public mental model first, start with:
308
+
309
+ - [Reading Zova for Vue Developers](/frontend/reading-zova-for-vue-developers)
310
+ - [Design Principles](/frontend/design-principles)
311
+ - [IoC and Beans](/frontend/ioc-and-beans)
312
+ - [Page Guide](/frontend/page-guide)
313
+
314
+ ## Final takeaway
315
+
316
+ The most important source-reading insight is simple:
317
+
318
+ > Zova does not remove Vue reactivity. It relocates the business-facing reactive surface from local reactive primitives toward framework-managed reactive bean instances.
319
+
320
+ Once that clicks, the rest of the controller, render-bean, route, and lifecycle design becomes much easier to follow.