hyTags
HomeHome DocumentationDocumentation

Design Rationale

Motivation

Modern web frameworks usually split applications into a backend and a frontend, connected through an API. While flexible, this architecture introduces extra complexity: duplicated routing, API contracts, and data transfer layers whose main purpose is to bridge an often unnecessary divide.

Earlier approaches avoided this split, but didn't scale well. Attaching behavior to markup via selectors pushed logic away from the elements it affects, making small, reusable UI components harder to write and reason about (see also Locality of Behavior).

Most programming languages can already generate HTML and embed data into it, either through templating systems or language-level DSLs. JavaScript is typically required for UI behavior: event handling, DOM updates, animations, and asynchronous effects.

hyTags takes a different path by expressing behavior directly in HTML. Because behavior is just markup, it can be generated alongside structure and data by the same tools and in the same language that already produce the page. This makes it possible to move UI behavior back into the application itself, instead of pushing it into a separate frontend layer.

Test succeeded Test failed