8000 GitHub - utsavanand2/gooey: :smiling_imp: :gun: Opinionated Go WebASM framework
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

😈 💥 🔫 Opinionated Go WebASM framework

License

Notifications You must be signed in to change notification settings

utsavanand2/gooey

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gooey

Gooey (GUI) is a Pure Go Web UI framework made for stateless HTML in Web Views. It bridges the gaps between Go, WebASM, Browser APIs, unified App Layouts and reusable Themes.

Opinions

HTML Elements

  • Static elements can never be removed from the DOM
  • Static elements can have DOM event listeners
  • Static elements always have an id property
  • Dynamic elements can be removed from the DOM
  • Dynamic elements should not have DOM event listeners

App Architecture

App Layout

  • App Layout always consists of header, main, and footer elements
  • App Views are represented by different main > section[data-view=...] elements
  • App Views can contain aside elements representing the sidebar

Web Clients

  • Web Clients are REST API clients using either fetch or xhr
  • Web Clients are fulfill an interface with Validate() bool, err
  • Web Clients are routable via a map[URL]struct for each supported route

Web Forms

Note: This is currently work-in-progress

  • Web Forms are static elements
  • Web Forms with enctype="application/json" use a REST compatible API endpoint
  • Web Forms with an action URL are automatically validateable
  • Web Forms are serializable via json.Marshal() into a struct
  • Web Forms are fulfill an interface with Validate() bool, err

Implementation Details

  • docs/BINDINGS.md documents the state of implemented bindings
  • TODO.md documents the work-in-progress of things that will be implemented next

Examples

The examples folder contains minimal test cases that show how you can use the bindings. They also contain a separate main.go which is compiled into a main.wasm file and a serve.go which reflects the local webserver.

All examples are served on http://localhost:3000 if you execute the build.sh.

These examples also serve as unit tests, because go test cannot generate binaries for the syscall/js platform.

Projects

These are the Projects using gooey as a library. This list is meant to showcase how to use the library, how to integrate it into your workflow, and how to integrate it with webview/webview_go.

License

This project is licensed under the MIT license.

About

😈 💥 🔫 Opinionated Go WebASM framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%
0