Skip to main content

Comparison

Cotomy Position

Cotomy is a DOM-oriented runtime layer for form-driven, page-scoped systems. Unlike component-rendering SPA frameworks, it keeps the DOM as the primary UI model.

The key difference is where UI state lives and what owns the UI model. In Cotomy, business logic updates the DOM through runtime APIs so lifecycle and event cleanup stay consistent.

  • Cotomy: The DOM is the UI state. Cotomy adds a runtime layer for lifecycle, forms, scoped CSS, and event cleanup. Updates should go through CotomyElement or Cotomy forms so the runtime can track lifecycle and handlers correctly.
  • React/Vue: UI state lives primarily in JavaScript memory. The framework renders that state into the DOM, which becomes the output of the component tree.

“Initial HTML” here simply means the HTML that exists before the client runtime starts. It could be server-rendered HTML, static HTML, or HTML produced by a build step.

Use Cotomy when you want HTML/DOM to stay central and need runtime safety for forms and screen-level workflows. Use a component framework when you want a centralized render model and a JS state tree as the source of truth. For design rationale and practical usage notes, see the Cotomy Blog.

Responsibility Comparison

ConcernCotomyReact / VueAlpinejQuery
UI state locationDOMJS memoryDOM + JSDOM
Rendering modelDirect DOMVirtual DOM / reactiveDirect DOMDirect DOM
Form handlingFirst-classLibrary dependentManualManual
Lifecycle safetyBuilt-in runtimeHook-basedManualManual
CSS scopingRuntime scopedBuild or conventionNoneNone
Page modelPage-scopedSPA / ComponentPage / WidgetPage
Data bindingDOM + runtime-drivenReactive stateAttribute-basedManual
Event cleanupAutomaticComponent lifecycleManualManual

Philosophy Differences

CotomyReact / Vue
DOM as primary stateJS state as primary source of truth
No virtual render layerVirtual or reactive render cycle
Form-first designComponent-tree-first design
Page-scoped structureSPA-oriented structure
Runtime lifecycle safetyLifecycle driven by component hooks

Where Cotomy Fits

FitWhy
Business systemsForms and APIs are central
Screen-level workflowsRuntime safety reduces UI risk
Server HTML with dynamic behaviorWorks alongside SSR
Admin and management toolsInput and process heavy

Where Cotomy Does Not Fit

Not a FitWhy
Large-scale SPANo global state management
High-frequency re-render UIsNot a render-optimization framework
Highly animated UINot optimized for frequent visual re-render cycles
Canvas / game UIsDOM-centric design

Why Cotomy Is Not a Component-Rendering SPA Framework

Here, “framework” means a component-rendering SPA framework that owns UI state and render cycles. Cotomy instead adds structure around browser-native DOM behavior, and can coexist with other frameworks when page boundaries are clear.

Summary

Cotomy is aimed at reducing UI maintenance risk in DOM-centric business screens, not at render optimization.