{"id":23007171,"url":"https://github.com/bgokden/gowebian","last_synced_at":"2025-10-30T09:33:09.096Z","repository":{"id":57510837,"uuid":"223635384","full_name":"bgokden/gowebian","owner":"bgokden","description":"A web library for writing web pages with Golang","archived":false,"fork":false,"pushed_at":"2020-08-16T14:36:27.000Z","size":54,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T11:01:43.901Z","etag":null,"topics":["golang","html","wasm","webass","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bgokden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-23T18:33:08.000Z","updated_at":"2024-11-17T14:51:00.000Z","dependencies_parsed_at":"2022-09-26T17:50:58.239Z","dependency_job_id":null,"html_url":"https://github.com/bgokden/gowebian","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bgokden/gowebian","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgokden%2Fgowebian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgokden%2Fgowebian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgokden%2Fgowebian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgokden%2Fgowebian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bgokden","download_url":"https://codeload.github.com/bgokden/gowebian/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgokden%2Fgowebian/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266580281,"owners_count":23951191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","html","wasm","webass","webassembly"],"created_at":"2024-12-15T08:14:50.589Z","updated_at":"2025-10-30T09:33:04.065Z","avatar_url":"https://github.com/bgokden.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoWebian\n\nGoWebian is a go library to generate html files and WebAssembly bindings.\n*GoWebian is work in progress*\n\nIt can only be used for server side html generation and building websites with Golang.\nWebAssembly bindings are easy to do and doesn't require writing Javascript code.\n\nMain target of GoWebian is splitting the visual logic and application logic.\nVisual logic will be done with HTML/CSS/Javascript and application logic is done with WebAssembly.\n\nGoWebian support page page definition and custom component definition.\nJavascript event binding, dom manipulation and messaging between components.\n\n### Running Examples\n\nGit Clone this repo and go into the directory\n\n```shell\n$ git clone https://github.com/bgokden/gowebian.git\n$ cd gowebian\n```\nBasic example:\n\n```shell\n$ ./buildpage.sh examples/basicpage/\n$ go run serve/serve.go ./examples/basicpage/public/\n````\n\nGo to your browser http://localhost:8080\nClick on the button, it will add random component to the list.\nEnter text to the text field and press enter, text will be copied to the text field\n\nMDB basic page\n\n```shell\n$ ./buildpage.sh examples/mdbpage1/\n$ go run serve/serve.go ./examples/mdbpage1/public/\n````\n\nMDB grid page\n\n```shell\n$ ./buildpage.sh examples/mdbpage2/\n$ go run serve/serve.go ./examples/mdbpage2/public/\n````\n\n### Current problems in WebAssembly and solutions in GoWebian:\n\n#### Problem:\nCurrently go WebAssembly WASM file sizes are big. Example page sizes are reaching to 5Mb. With Gzip it can be compressed to less than 1.5Mb. Main reason is Go runtime is bundled in this executable.\nThere are promising projects like tinygo which has a smaller runtime, but GoWebian doesn't work with it due to depending go packages ( template/text, template/html packages and go routines ). `I don't fully use these packages so I may prefer to rewrite to fully support tinygo builds.`\nAlso there are proposals to embed common libraries of common languages into the browser runtimes which is a good solution.\nProbably we will see both solutions in a year.\n\n#### Current solution:\n\nGoWebian generates a working HTML representation per page. This can be integrated into web server, user will see this page on load. While user see a functioning page, the WASM code loads. WASM has support for streaming instantiation, which means compile as the payload downloading. Depending on the network, WASM download and compile time can be faster than complex Javascript libraries.\n\n#### Notes:\n\n* Material Design Bootstrap page and components are added for examples, they will be probably move to another repository.\n* I will a client that do tasks of `buildpage.sh` and `serve/serve.go`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgokden%2Fgowebian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgokden%2Fgowebian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgokden%2Fgowebian/lists"}