mirror of
https://github.com/quasar/Quasar.git
synced 2026-04-25 15:25:59 +03:00
[GH-ISSUE #577] Refactoring packet response handlers to not use GUI as data store #337
Labels
No labels
bug
bug
cant-reproduce
discussion
duplicate
easy
enhancement
help wanted
improvement
invalid
need more info
pull-request
question
wont-add
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Quasar#337
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dwendt on GitHub (Jan 12, 2017).
Original GitHub issue: https://github.com/quasar/Quasar/issues/577
I went to add automated on-connect commands and near the end I realized the majority of packet handling code is directly tied to forms currently being open (GetPasswordsResponse, etc). Rendering that feature I wrote mostly useless.
So, data ingestion/storage in HandlePacket and the views for this data need to be decoupled. This is probably the first step to porting the server to be usable via CLI as well.
I'd propose this design pattern for the refactored handlers, though I'm not a C# pro:
Here's a list of handlers that store packet results directly to GUI that need to be modified, ones left out only act as a success-indicator for GUI actions.
So that's going to be a weekend project for (me || anyone else who needs this quicker) eventually, I'd love input from people on the project if you'd like to see it implemented differently :)
@chico-depressive commented on GitHub (Jan 18, 2017):
@dwendt good!
@dwendt commented on GitHub (Jan 24, 2017):
Hey @MaxXor, I've abstracted getting/setting data for unique clients into a Storage singleton. For actually handling the writing/getting/searching in this class a DB makes the most sense. Would you be against a PR that rolls in http://www.litedb.org/ to do this in a local file? This can be extended to connect to and use some real external DB with minimal effort later, but litedb can be rolled in.
Alternatively, if JSON objects are a pain in litedb, maybe https://github.com/praeclarum/sqlite-net
edit: nope, they are not a pain. very simple.
@life-coder commented on GitHub (Mar 15, 2017):
@dwendt I like your idea, but porting all that would rewrite a big part. I think you want to do something like on client connection, request chrome passwords.? Or? You could fix that by adding a new packet, like: ServerRequestPasswords and create a commandhandler entry for it to save it to a file ;)
@MaxXor commented on GitHub (Jun 8, 2020):
This has been fixed in https://github.com/quasar/Quasar/releases/tag/v1.4.0