Skip to content

GoFrame v0.2.0-preview.2

Pre-release
Pre-release

Choose a tag to compare

@graybuton graybuton released this 03 Jul 19:34
v0.2.0-preview.2
53b2a15

Release Notes: v0.2.0-preview.2

Summary

v0.2.0-preview.2 is an experimental preview for GoFrame's web-first browser/WASM direction.

This release focuses on server-backed evidence and the smallest browser-side text loader now present in the runtime: experimental gf.FetchText.

The validated target remains interactive browser/WASM applications built with the GoFrame runtime, GOX, and goxc. This release does not claim production readiness, fullstack/server APIs, server functions, SSR/hydration, route loaders, JSON/data framework behavior, global caching, or production server behavior.

Highlights

  • examples/server-backed is now a persistent reference fixture for a packaged GoFrame browser/WASM app served by a plain Go net/http backend.
  • The fixture exposes a same-origin /api/greeting endpoint and exercises a resource/form flow from the browser app.
  • Browser smoke covers:
    • initial backend data;
    • form-driven updates;
    • controlled backend HTTP 500 failure UI;
    • recovery after a valid submission;
    • delayed stale-response no-overwrite behavior.
  • Experimental gf.FetchText provides a browser/WASM text-only helper that fits the gf.UseResource / ResourceLoader[string] shape.
  • examples/server-backed uses gf.FetchText.
  • examples/resource is now the second adoption point for gf.FetchText while keeping parsing and lifecycle demonstration local to the example.
  • The cmd/goxc workspace dependency characterization test now keeps the inner go list baseline robust under GOFLAGS=-buildvcs=false.

Server-backed Evidence

The server-backed fixture demonstrates a narrow integration boundary:

  • goxc package ./examples/server-backed --compiler=go produces the browser/WASM app bundle;
  • examples/server-backed/cmd/server is a plain Go net/http server;
  • the backend serves the packaged standalone directory as static files;
  • the backend exposes /api/greeting on the same origin as the app;
  • the browser app renders backend data through gf.UseResource and a small form flow.

This is evidence for a server-backed browser/WASM pattern, not a GoFrame server framework.

Experimental gf.FetchText

gf.FetchText is an experimental browser/WASM text loader for the ResourceLoader[string] contract.

In browser/WASM builds, it:

  • calls browser fetch with the provided key as the URL;
  • uses AbortController for cleanup;
  • reads successful responses with response.text();
  • rejects non-OK HTTP responses with an ordinary error whose text includes the status code;
  • rejects fetch/network failures with an ordinary error;
  • prevents resolve/reject callbacks after cleanup.

Host builds compile with a stub that rejects with a clear ordinary error and returns a safe no-op cleanup.

gf.FetchText is text-only. It does not provide JSON parsing, UseFetch, public HTTPError, a browser subpackage, caching, retry/backoff, deduplication, route loaders, server APIs, auth/session behavior, SSR, hydration, or production server behavior.

Compatibility

  • Existing gf.UseResource semantics did not change.
  • Existing custom ResourceLoader implementations remain valid.
  • gf.FetchText is Experimental Frontier, not Public-Candidate.
  • examples/server-backed is an example/integration fixture, not a server framework.
  • Existing browser/WASM app workflows remain experimental preview workflows.

Not Supported / Not Claimed

This release does not claim:

  • production readiness;
  • stable 1.0 API compatibility;
  • fullstack/server APIs;
  • server functions;
  • SSR or hydration;
  • route loaders;
  • JSON/data framework behavior;
  • global resource cache;
  • auth/session helpers;
  • production server behavior;
  • history-mode router or server fallback automation;
  • broad reusable package ecosystem stability;
  • Player/Engine;
  • .gfapp.

Install

go install github.com/graybuton/goframe/cmd/goxc@v0.2.0-preview.2

Full Notes

See docs/release-notes-v0.2.0-preview.2.md for the complete release notes, validation scope, compatibility notes, upgrade notes, and known limitations.

Known issue

goxc version and generated goframe-package.json metadata self-report 0.1.0 in this preview.

The Go module tag itself is correct: v0.2.0-preview.2.

This is fixed in v0.2.0-preview.3.