-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: added ability to serialize/deserialize pods list and content items #213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments below, but it can be merged from my side after @tomicvladan approved.
This approach could work, but it will be still complicated to use. Because there is no uniform API. The proxy object in Blossom will have to intercept each call and analyze whether it should apply serialization/deserialization or not. This might be difficult to maintain later when new changes are applied to fdp-storage. It will be difficult to keep track of changes and whether they require updates on the proxy side. Instead of that, I think much better approach would be to reorganize these two classes: In the future we can keep the same approach for new features, so each method returns only pure objects without any methods inside. I think that will make fdp-storage much more usable, especially because we plan to use it in a variety of environments. |
@nugaon wdyt? |
I agree with @tomicvladan let's rid of the classes and make simple objects/arrays from those. |
I think all the changes should be:
|
I remembered one more class that needs to be handled somehow, the |
Now the returned results are simple objects that can be converted via JSON.stringify/parse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have a breaking change and make all returns JSON compatible without any mapping and transitions.
@tomicvladan, approve this PR if everything goes smoothly in Blossom.
Other than class names, it looks good. I just think that we need to remove the |
before merge, please update PR details about the interface changes |
This PR changes the return data format for some methods. In general, all methods now return plain objects/arrays for ease of conversion to/from JSON.
Changed methods:
fdp.directory.read
fdp.file.downloadData
fdp.personalStorage.list
fdp.personalStorage.create
Close #209