shurcooL/Go-Package-Store

Become a single-page application, render HTML on frontend.

dmitshur opened this issue · 2 comments

Currently, the Go Package Store app consists of a single piece of functionality displayed on a single page. It finds and presents available updates to Go packages.

It's implemented by rendering the HTML entirely on backend and streaming it to the browser.

This is very simple, pragmatic, and has worked really well for the purposes of GPS so far. There are some minor downsides, like the inability to move completed updates to bottom section while available updates are still loading (see TODO comment).

The current frontend script is very simple, at 76 lines of Go code.

However, in order to be able to expand functionality offered by Go Package Store, implement some of the planned enhancements, and have multiple tabs that can be switched at any time, it becomes no longer viable to render HTML on backend and have a short script.

Instead, I want to move Go Package Store towards a single-page application, render HTML on frontend, and have backend maintain state and provide services.

mvdan commented

I just realised that the frontend is written entirely in Go and that the repo has zero javascript. Hats off to you!

Yeah! It took almost 10 months to get all the prerequisites complete to make it possible. Now I want to take more of an advantage of that, which is what PR #71 is all about. :)