Skip to content
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

Reduce code surface #19

Closed
michielbdejong opened this issue Oct 31, 2022 · 3 comments
Closed

Reduce code surface #19

michielbdejong opened this issue Oct 31, 2022 · 3 comments

Comments

@michielbdejong
Copy link
Contributor

The app code comes together, mainly through copy-paste from two sources:

One way to reduce this surface is to extend from FederatedShareProvider and overwrite the addShareToDb method, and same for the other two classes?

@michielbdejong
Copy link
Contributor Author

OCA\FederatedGroups\LocalShareProvider
OCA\FederatedGroups\RemoteShareProvider

@michielbdejong
Copy link
Contributor Author

If we create a full two-sided federated share for each group member as per #18 (comment) then we don't even need the RemoteShareProvider class that skips the add-to-local-db step. We would just create 1 local group share and n federated shares.

@michielbdejong
Copy link
Contributor Author

Code surface reduced to 300 lines :)

   6 appinfo/app.php
  28 appinfo/info.xml
   9 appinfo/routes.php
  14 lib/Application.php
 154 lib/GroupShareProvider.php
  97 lib/ShareProviderFactory.php
 308 total

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

No branches or pull requests

1 participant