docs(site): sell real-time and the graph honestly
Two claims a skeptic would catch. RealTime still said 'return an AsyncIterable' with no mention of declaring the transport — the same implicit-return the framework now rejects with TransportMismatchError; the honest version (declare the transport, the contract is never a surprise) sells harder anyway. And GraphNotChain's 'no one else has the graph' invited the obvious 'Angular and Nest have a DI graph' — so say the real, unrefutable thing: they resolve a graph of services, this resolves your request pipeline. Same fix in the founder post. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
3 files changed
+8
-4
No files matched your search
@@ -23,7 +23,9 @@ import GraphMotif from '../GraphMotif.astro';
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p class="graph-idea__punch">
|
<p class="graph-idea__punch">
|
||||||
This is pure composition. No other framework shows it, because no one else has the graph.
|
This is pure composition. DI frameworks resolve a graph of <em>services</em>; Green Tea resolves your <em
|
||||||
|
>request pipeline</em
|
||||||
|
> the same way — the steps a route runs are computed from what it asks for, not the order you wrote them in.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -7,8 +7,10 @@
|
|||||||
<h2>One primitive for real-time.</h2>
|
<h2>One primitive for real-time.</h2>
|
||||||
|
|
||||||
<p class="realtime__body">
|
<p class="realtime__body">
|
||||||
SSE, ndjson, or a duplex WebSocket — return an <code>AsyncIterable</code>. One mental model, one line. No
|
SSE, ndjson, or a duplex WebSocket — one primitive, an <code>AsyncIterable</code>. You declare the transport
|
||||||
separate gateway, no bolt-on package.
|
with a decorator (<code>@Sse</code>, <code>@Ws</code>, <code>@Stream</code>); only that one line changes. No
|
||||||
|
separate gateway, no bolt-on package — and your wire contract is what you declared, never a surprise sprung by
|
||||||
|
a return value.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ That's Green Tea.
|
|||||||
|
|
||||||
The core idea is simple to say and took a long time to get right: the request pipeline is an explicit dependency graph, not a mutable middleware chain. You don't push handlers onto a stack and hope the order holds. You declare what each step needs — `@needs('user')`, say — and the framework computes the order for you. There's no chain to get wrong, because there's no chain.
|
The core idea is simple to say and took a long time to get right: the request pipeline is an explicit dependency graph, not a mutable middleware chain. You don't push handlers onto a stack and hope the order holds. You declare what each step needs — `@needs('user')`, say — and the framework computes the order for you. There's no chain to get wrong, because there's no chain.
|
||||||
|
|
||||||
Real-time isn't bolted on either. It's one primitive: return an `AsyncIterable` and you have a stream, whether that stream is a WebSocket, an SSE connection, or something else entirely. One shape, one mental model, no separate package to reconcile with the rest of the framework.
|
Real-time isn't bolted on either. It's one primitive — an `AsyncIterable` — for every kind of stream: a WebSocket, an SSE connection, an ndjson feed. You declare which transport with a decorator and return the iterable; one shape, one mental model, no separate package to reconcile with the rest of the framework.
|
||||||
|
|
||||||
And because none of it depends on Express or Node's http module specifically, it runs on Node, on Deno, on Bun, and on the edge — built on web standards instead of one runtime's particular APIs. One runtime dependency, total. Not a supply chain, one dependency.
|
And because none of it depends on Express or Node's http module specifically, it runs on Node, on Deno, on Bun, and on the edge — built on web standards instead of one runtime's particular APIs. One runtime dependency, total. Not a supply chain, one dependency.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user