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

Evolution: make AsciidocFX pluggable #519

Open
3 of 13 tasks
Ayowel opened this issue Jun 12, 2021 · 1 comment
Open
3 of 13 tasks

Evolution: make AsciidocFX pluggable #519

Ayowel opened this issue Jun 12, 2021 · 1 comment

Comments

@Ayowel
Copy link
Contributor

Ayowel commented Jun 12, 2021

This is a tracking issue for the evolution as I'm going to split it in several issues

Goals :

  • Normalize & document interfaces
  • Lower coupling between services
  • Permit dynamic components loading

Target steps:

  • Move services to dedicated implementation folders - Create services interfaces #518
  • Create services interfaces and have implementations extend them - Create services interfaces #518
  • Ongoing: Create a Service Loader & update contructors (Related to Use a Service Loader for Services #272)
  • Ongoing: Add an event service to allow state change propagation without direct interactions - Feature/create services interfaces #521
  • Cleanup parameters & fix typos in interfaces functions (setWorkigDirectory...)
  • Lower internal models exposition in services interfaces (mostly : avoid JavaFX-specific/GUI object types in non-ui services functions), Create/update UI functions to handle those functionnalities
  • Add dynamic class loading to add build features (POC)
  • Add dynamic class loading to add build features - document interfaces
  • Add loaded classes configuration support in settings
  • Add injection points for plugins in UI
  • Add dynamic loading support for live enable/disable ?

POC:

  • Turn PDF generation support into a plugin
  • Move the dynamic working directory detection (with .asciidocfx 'project' directory) to a dedicated plugin. Add local project configuration loading support.

My end goal, which would be addressed in further PRs after this, is to be able to run AsciidocFX to build PDF/HTML/... with AsciidocFX on a server without GUI so that high-level users can rely on the output they see to be reproduced on a CI platform.

Design notes: Plugins should / could

  • Define their dependencies (with semver support ?)
  • Be added to a loading/unloading list. Best if there is dynamic loading; Must at least have start-up configuration-defined loading
  • Have user-defined configuration values
  • Provide new build targets/backends
  • Plug into the build pipeline
  • Provide new UI options. Preferably by configuration, but a programmatic entry point may be defined
  • Define new command-line options (is it do-able with the current parser ?)
  • Receive internally-dispatched events
@Ayowel
Copy link
Contributor Author

Ayowel commented Aug 16, 2021

Quick heads-up. I'm still looking into ways to properly handle dynamic resources loading and though I wanted to avoid it, I think I'll have to use OSGi to get a satisfactory solution, however that implies huge refactoring & splitting the codebase in several projects.

I probably won't have the time for such an undertaking before October.

Note that by the end of these modifications, products should be uploaded to maven/ant/... repositories so that developers can specify them as dependencies.

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

No branches or pull requests

1 participant