Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Use best practices on frontend #13

Closed
101arrowz opened this issue Oct 20, 2019 · 1 comment
Closed

Use best practices on frontend #13

101arrowz opened this issue Oct 20, 2019 · 1 comment

Comments

@101arrowz
Copy link
Contributor

101arrowz commented Oct 20, 2019

There are three things that could be improved on the frontend for GDBrowser.

Firstly, build tooling should be used. Build tools bundle together multiple files while minifying and improving cross-platform compatibility. If the Parcel bundler is used, the users could get the website delivered much faster and have it work on nearly any browser.

Using build tools goes hand in hand with making the website an SPA, or single-page application. The name should misleading; the main change will be putting all the HTML into one file and changing the shown page via JavaScript. This will make loading new pages instantaneous and has other benefits. This can be implemented by having multiple <section> tags that enclose the individual pages, having them all hidden by default, and showing them a certain page when their path matches that page's name. There are a couple more complex elements involved, such as using the Browser History API, but if you agree with this idea I'll submit a PR so you won't need to worry about it.

Lastly, removing jQuery is also a good idea. It's buggy, has security vulnerabilities, adds a ton to bundle size, and every feature it has can be replaced easily with native JS. That's why it isn't used in modern web development. Check out You Might Not Need jQuery. Again, I can submit a PR with the changes.

Its also possible to use a JS-based UI library such as React, which I'm very experienced with, but that requires a complete rewrite off the app, and it's hard to learn. That's why I'm not recommending it.

Let me know which (if any) of these suggestions you'd like me to implement. Thanks for taking the time to read!

@GDColon
Copy link
Owner

GDColon commented Oct 20, 2019

Heya!
I'll admit that these tweaks sound like they could be pretty nice. However, I (a simpleton) think that I'd rather keep the frontend how it is, mostly because I don't like to overcomplicate or change things. It's become very obvious that you know a lot more about Node and web design than I do, but I feel like it's best for me to keep things at my own level of simplicity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants