You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This story is extracted from #4099, where we researched existing LoopBack 3 components and various techniques they use.
Now we need to write documentation for extension authors to show how to solve the following use cases in LoopBack 4:
Add a new local service (a class providing JS/TS API), e.g. Push service or (database) Migration service.
The service must be configurable by the target app (e.g. Apple & Google credentials for push notifications, transport config for logger frameworks, Amazon S3 credentials for storage component, etc.).
LB3 typically uses component configuration. I think in LB4, we can use @configure specific to each service (see the logger extension for an example).
Inject LB3 models (LB4 entities & repositories) to the service. These models can be provided either by the extension or by the target application. When using models from the target application, the developer needs an option to specify which models (entities) and associated repositories to use.
Note: In LB4, models/entities are used primarily for the type information (to describe the shape of model data). As part of the follow-up research, we will need to decide if it's enough to inject LB4 Repository to a component or if we need to inject model/entity classes too. Also note that DefaultCrudReposiory class provides a public instance property entityClass referencing the model/entity it's bound to.
Provide a service factory to create services dynamically at runtime, e.g. named child loggers created via app.log('name') in LB3.
Provide a custom service connector requiring (environment-specific) configuration and providing a static service API (static means the API is always the same, as opposed to API generated dynamically from WSDL or OpenAPI.
In most cases, the new content will be useful to authors building new LB4 components too, therefore we should structure the content in two parts:
A guide explaining how to build a component contributing a service, this should go to Extending LoopBack
A guide explaining how to migrate LB3 components, this guide should go to Migrating components and extensions and focus on aspects unique to extensions migrating from LB3 and refer to content in Extending LoopBack wherever possible & appropriate.
The text was updated successfully, but these errors were encountered:
Link to follow-up issues for the following areas:
- Services: #5424
- API transports: #5425
- Instrospection: #5426
Propose to not write any migration guide for auth/auth extensions yet.
Add a placeholder page for migration of Models, finalize LB4 sidebar
and the component-migration overview page.
Signed-off-by: Miroslav Bajtoš <[email protected]>
Link to follow-up issues for the following areas:
- Services: #5424
- API transports: #5425
- Instrospection: #5426
Propose to not write any migration guide for auth/auth extensions yet.
Add a placeholder page for migration of Models, finalize LB4 sidebar
and the component-migration overview page.
Signed-off-by: Miroslav Bajtoš <[email protected]>
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.
This story is extracted from #4099, where we researched existing LoopBack 3 components and various techniques they use.
Now we need to write documentation for extension authors to show how to solve the following use cases in LoopBack 4:
Add a new local service (a class providing JS/TS API), e.g. Push service or (database) Migration service.
The service must be configurable by the target app (e.g. Apple & Google credentials for push notifications, transport config for logger frameworks, Amazon S3 credentials for storage component, etc.).
LB3 typically uses component configuration. I think in LB4, we can use
@configure
specific to each service (see the logger extension for an example).Inject LB3 models (LB4 entities & repositories) to the service. These models can be provided either by the extension or by the target application. When using models from the target application, the developer needs an option to specify which models (entities) and associated repositories to use.
Note: In LB4, models/entities are used primarily for the type information (to describe the shape of model data). As part of the follow-up research, we will need to decide if it's enough to inject LB4 Repository to a component or if we need to inject model/entity classes too. Also note that
DefaultCrudReposiory
class provides a public instance propertyentityClass
referencing the model/entity it's bound to.Provide a service factory to create services dynamically at runtime, e.g. named child loggers created via
app.log('name')
in LB3.Provide a custom service connector requiring (environment-specific) configuration and providing a static service API (static means the API is always the same, as opposed to API generated dynamically from WSDL or OpenAPI.
In most cases, the new content will be useful to authors building new LB4 components too, therefore we should structure the content in two parts:
The text was updated successfully, but these errors were encountered: