diff --git a/README.md b/README.md index 0878464..65e5573 100644 --- a/README.md +++ b/README.md @@ -269,7 +269,7 @@ dependencies, declared in the manifest: ```toml [deps] -niceframework = { git = "https://github.com/shoneyj/niceframework", rev = "v0.1.0" } +niceserve = { git = "https://github.com/shoneyj/niceframework", rev = "v0.1.0" } ``` `woc` fetches each dep (via the `git` binary) into `.wo-deps//`, pins @@ -303,7 +303,7 @@ acceptance tests: just employee # compile + run every mode against a durable database ``` -- **`docs/examples/writeonce-framework/` + `docs/examples/web-app/`** — a web +- **`docs/examples/writeonce-serve/` + `docs/examples/web-app/`** — a web framework written in writeonce (HTTP/1.1 behind a TLS-terminating proxy, router with `:param` captures, interface-based handlers) and a storefront consuming it **as a `[deps]` dependency**, with `@table` persistence. Run: diff --git a/compiler/src/CODE-LOGIC.md b/compiler/src/CODE-LOGIC.md index 238780e..b76bb12 100644 --- a/compiler/src/CODE-LOGIC.md +++ b/compiler/src/CODE-LOGIC.md @@ -332,7 +332,7 @@ Things worth knowing before editing them: - **`{{ e }}` desugars to `esc(${e})`, resolved by ordinary name lookup.** `desugar_interp` in `parser.ml` builds a `Call` on an `Ident "esc"` — precisely what a developer wrote by hand before. The - compiler learns nothing about HTML, `esc` stays wo-html's ordinary + compiler learns nothing about HTML, `esc` stays writeonce-view's ordinary `pub fn`, a typo'd field inside the hole is a normal name/type error, and a locally defined `esc` shadows deliberately (a custom escaper is a feature). `${ }` inside the same literal stays raw — that is the diff --git a/docs/00-code-review.md b/docs/00-code-review.md index 8123503..5e672f2 100644 --- a/docs/00-code-review.md +++ b/docs/00-code-review.md @@ -79,7 +79,7 @@ the number or produce the benchmark. | 22's battery never run | 22 is ⬜ "needs a spec first"; no `bench/baseline.json`, no `just db-bench`; `runtime/bench/` is the retired C prototype's harness | | TSan covers one demo | only `scripts/fibers-accept.sh` builds and runs `wovm_tsan` | | no fuzzing, no CI | no `.github/`, no fuzz target | -| one framework, five samples, one consumer | exact: `writeonce-framework`; employee, employee-list, fibers, gc-cycle, log-watcher; `web-app` | +| one framework, five samples, one consumer | exact: `writeonce-serve`; employee, employee-list, fibers, gc-cycle, log-watcher; `web-app` | ### Consequence diff --git a/docs/examples/shop/README.md b/docs/examples/shop/README.md index 0592262..e3bd455 100644 --- a/docs/examples/shop/README.md +++ b/docs/examples/shop/README.md @@ -38,19 +38,19 @@ fn render() -> Text { } ``` -Every `render()` makes its class a **component** — wo-html's structural +Every `render()` makes its class a **component** — writeonce-view's structural `Component` interface, satisfied by having the method, never declared. Parent components hold children directly (`cards: multi Component`) and render them with `render_all`, so `ProductListPage` knows nothing about `ProductCard` beyond `render()`. The document itself is a component too: `AppShell { title, content }` in `layout/app.wo`, which links a real stylesheet rather than inlining one — that is why it is its own shell and -not wo-html's `Layout`. +not writeonce-view's `Layout`. Two holes, and the difference is the whole escaping story: - `{{ expr }}` **HTML-escapes** — it compiles to a call to the `esc` in - scope (wo-html's, unless the app declares its own). Display data goes + scope (writeonce-view's, unless the app declares its own). Display data goes here; a typo'd field is a compile error, not a broken page. - `${ expr }` is **raw** — for markup you built yourself, like the `${stock}` fragment above or `${content}` in the app shell. @@ -70,7 +70,7 @@ up, or sandbox. | `product_list/view.wo` | VIEW — classes with `fn render() -> Text`, fields = exactly what is displayed | `product-list/view.html` | | `product_list/controller.wo` | CONTROLLER — query the model, fill the view, answer a `Resp`; beside its view in the same module | component `.ts` + service | | `product_page/`, `orders/` | one module per feature: `view.wo` + `controller.wo` | feature folders | -| `static_files/controller.wo` | `/assets/*` from disk, traversal-safe, typed | `angular.json` assets | +| `/assets/*` | served by the framework's `StaticFiles` — the template no longer carries its own copy | `angular.json` assets | | `assets/style.css` | ONE real stylesheet, sectioned per feature | the `.scss` files | | the `render()` bodies | ONE raw text literal each: real newlines, real double-quoted attributes, source indentation removed at compile time, `${}` raw holes and `{{ }}` auto-escaping ones | Vue `