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

Refactoring #11

Open
jonasraoni opened this issue Dec 2, 2020 · 1 comment
Open

Refactoring #11

jonasraoni opened this issue Dec 2, 2020 · 1 comment

Comments

@jonasraoni
Copy link
Owner

Origin: Comments from this PR.

  1. In order to avoid (decrease) the chances of this plugin being broken by iterations over the PKP's API, it should probably interface directly with the NativeImportExportPlugin:
  • As a transform tool: transform/produce XML, in the format expected by the native plugin, and forward the generated file to it (or maybe emit the generated content and let the user adjust/upload by himself).
  • As a plugin: extend the native plugin through code/hooks and let this one acting as a pipe, transforming data on the fly.

Note: before proceeding with this, maybe it will be needed to refactor the native plugin as it failed to export large amounts of data for me (I didn't check if the import is optimized).

  1. Get rid of duplicated code by making the plugin's interface more generic.
  • Forward to the parsers a generic object to input data (createIssue()->setVolume()->etc()).
  • The parsers can opt in/out of producing data by implementing interfaces X implements IssueProducerInterface (limited and problematic due to PHP limitations).
  • [...]
@jonasraoni
Copy link
Owner Author

Given the API will be available for all systems at 3.4, perhaps it will be feasible to integrate with it.

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