GoFrame v0.2.0-preview.2
Pre-releaseRelease 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-backedis now a persistent reference fixture for a packaged GoFrame browser/WASM app served by a plain Gonet/httpbackend.- The fixture exposes a same-origin
/api/greetingendpoint 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.FetchTextprovides a browser/WASM text-only helper that fits thegf.UseResource/ResourceLoader[string]shape. examples/server-backedusesgf.FetchText.examples/resourceis now the second adoption point forgf.FetchTextwhile keeping parsing and lifecycle demonstration local to the example.- The
cmd/goxcworkspace dependency characterization test now keeps the innergo listbaseline robust underGOFLAGS=-buildvcs=false.
Server-backed Evidence
The server-backed fixture demonstrates a narrow integration boundary:
goxc package ./examples/server-backed --compiler=goproduces the browser/WASM app bundle;examples/server-backed/cmd/serveris a plain Gonet/httpserver;- the backend serves the packaged standalone directory as static files;
- the backend exposes
/api/greetingon the same origin as the app; - the browser app renders backend data through
gf.UseResourceand 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
fetchwith the provided key as the URL; - uses
AbortControllerfor 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.UseResourcesemantics did not change. - Existing custom
ResourceLoaderimplementations remain valid. gf.FetchTextis Experimental Frontier, not Public-Candidate.examples/server-backedis 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.2Full 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.