@sylwellsoftware/glue 0.4.0 → 0.6.0
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.
- package/README.md +20 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,26 @@ Glue is ESM-only. Core emitters, derived state, and diagnostics support Node 22+
|
|
|
15
15
|
and modern ESM runtimes without a DOM. `LiveQuery` needs `AbortController`, and
|
|
16
16
|
`RestQueryHandler` needs Fetch and URL capabilities unless they are injected.
|
|
17
17
|
|
|
18
|
+
## Why Glue
|
|
19
|
+
|
|
20
|
+
Most application values come from a service query, direct user input, or a
|
|
21
|
+
calculation over those sources. Those values and their status are real state,
|
|
22
|
+
but developers should not have to construct and synchronize a separate
|
|
23
|
+
framework-shaped copy of them so that consumers can react.
|
|
24
|
+
|
|
25
|
+
Glue keeps each value at its natural boundary. A control can write an
|
|
26
|
+
`Emitter`, a calculation can expose a `DerivedEmitter`, and a query can react
|
|
27
|
+
to argument emitters while exposing its result, loading state, and error. A
|
|
28
|
+
consumer reads the downstream value it needs without knowing whether it began
|
|
29
|
+
as input, computation, or remote data.
|
|
30
|
+
|
|
31
|
+
For example, a table header may write a sort emitter. A `LiveQuery` uses that
|
|
32
|
+
emitter as an argument, retrieves fresh rows, and emits the new result to the
|
|
33
|
+
table. The developer declares this meaningful relationship; Glue handles
|
|
34
|
+
propagation, current snapshots, cancellation, and stale-result protection.
|
|
35
|
+
Mutation authority, domain rules, transport encoding, service construction,
|
|
36
|
+
and ownership/disposal remain explicit application responsibilities.
|
|
37
|
+
|
|
18
38
|
## Design model
|
|
19
39
|
|
|
20
40
|
Glue models values that stay current rather than requests that callers must
|
package/package.json
CHANGED