-
Notifications
You must be signed in to change notification settings - Fork 54
0020 datashare bootstrap
Bruno Thomas edited this page Oct 24, 2023
·
6 revisions
Date: 2023-10-24
Accepted
For now Datashare initialization process is:
- reading command line arguments and passing them to
DatashareCli
that returns properties. - calling apps (
CliApp
,WebApp
,BatchApp
...) start method accordingly to the CLI--mode
option - each app is creating its mode with
CommonMode.create(properties)
and doing its own init process
images/adr20/datashare_bootstrap.drawio.png
For complex CLI extensions, it would be convenient to use dependency injection and specifically services that are defined in the app. As the injector is in CommonMode
it is not possible.
Datashare will create a children injector for CLI extensions and pass it to an init method.
In a near future we will refactor the CLI:
- to use multi-command cli mode
- to separate intrinsic and extrinsic application parameters
images/adr20/app_and_config.png
It will impact the datashare-cli
module and datashare-app
.