-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Decouple wiring of implementation bits from application configuration #742
Comments
|
@shimks We have deprecated some of the example repositories recently. Their GitHub projects are archived and read-only now, there is no need to keep them up-to-update anymore. Basically anything that's in I am not sure what to do about https://github.com/strongloop/loopback4-example-microservices (formerly loopback-next-example). The last time I worked with that codebase, it didn't even compile against the current version of LB4 dependencies. I am proposing to timebox any work on this repository, for example to 2 hours or a half-day at most. There are already some existing issues and pull requests, please update them accordingly after you are done:
@kjdelisle thoughts? |
@bajtos There's no changes that need to be made in |
With comment from @virkt25 in mind (#975 (comment)), I'd like to close the issue as done. I will create a separate issue (#990) for the discussion of whether the following requirement is necessary or not:
|
Right now,
Application
constructor accepts a config/options object that mixes two very different concerns:IMO, the consumers of an application must not change its functionality and features (with the exception of enabling/disabling explicit feature flags) and therefore the config/options argument should contain only the configuration (port numbers, connection strings, feature flags).
Acceptance criteria
The
ApplicationConfig
class should contain only things like HTTPport
and database connection strings, there should be no entries related to what component, controller, repositories (etc.) the application is using. User application classes should callthis.controller()
,this.repository()
(etc.) to register their artifacts, and eventually use the new bootstrapper module.Update our docs for extension developers to describe this as a best practice
Enhance
app.component
,app.controller
and other related APIs to accept an array of constructors too(or create a new API). This way users don't have to repeat the method call for each entity they are registering.Review all code examples in our documentation on loopback.io and fix it to follow the new way
Update the templates used by our CLI
Update all other repositories
The text was updated successfully, but these errors were encountered: