foxcpp / sutrc

SUT Remote Control - Too lightweight remote control system [Not maintained]
MIT License
5 stars 0 forks source link

Better web frontend? #15

Open ghost opened 5 years ago

vyamkovyi commented 5 years ago

Hi, could you please clarify what suggestions do you have regarding our web panel? It would be a pleasure to see our work from a different perspective!

ghost commented 5 years ago

My suggestions:

ghost commented 5 years ago

It would be good idea to use something like Backbone. Backbone.js already have:

ghost commented 5 years ago

Also, we should minify and/or build our assets. Builders

Minifier I recommend

ghost commented 5 years ago

Also, SammyJS is good too.

ghost commented 5 years ago

What I dislike in current frontend

Sorry for long thread but I want to separate my thoughts

vyamkovyi commented 5 years ago

Sure, nothing wrong with this way of expressing your thoughts.

Speaking of CDN, I don't think this is dangerous if used properly. We already use integrity property.

By the way, isn't ReactJS the same as Backbone?

ghost commented 5 years ago

Speaking of CDN, I don't think this is dangerous if used properly. We already use integrity property.

What if we would run it on computer without internet access?

By the way, isn't ReactJS the same as Backbone?

No. Backbone is a MVC Javascript framework but ReactJS is just a library for building views.

Also, Backbone has no built-in templating or anything like this but you can use Handlebars.js or other templating library.

ghost commented 5 years ago

Backbone.js + Knockout.js

vyamkovyi commented 5 years ago

What if we would run it on computer without internet access?

It would be unable to fetch any styles via CDN. I must agree that removing CDN is a good idea, but not because of security concerns. By design, this application may be running inside a network without any internet access.

ghost commented 5 years ago

So what are our plans for refactoring?

vyamkovyi commented 5 years ago

At this point, everything listed means we must nearly rewrite entire web panel from the scratch.

vyamkovyi commented 5 years ago

CDN: I don't believe in CDN, to be honest. We're not writing some kind of CNN news website or something that uses so many trackers that saving a millisecond can really help. Even in that case, I think this makes nearly zero sense - just use simple solutions if you really need your website to be speedy.

Bootstrap: writing everything from scratch is HARD. Really, really hard. There isn't a professional front-end developer. We're going to stick with Bootstrap, probably use some generator that can expunge things we don't really use.

ghost commented 5 years ago

Thank you for quick reply! I think your plan is awesome.

foxcpp commented 5 years ago

I'm not professional front-end developer at all, sorry. That's why current web frontend looks weird. If you can take care of rewritting it - you're welcome.

Server/agent-frontend protocol is documented in HTTP_API.md and you can use existing frontend as a example of how it should generally look like (however feel free to change UI if you know a better way to arrange things).

On CDN: I wanted to remove bundled libraries from repositories but I don't know anything about package management in JS world so I just switched to CDN. I was not aware of "no internet connectivity" requirement.

ghost commented 5 years ago

You can use npm, bower or git submodules for package management.