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

Decouple wiring of implementation bits from application configuration #742

Closed
19 of 20 tasks
bajtos opened this issue Nov 16, 2017 · 4 comments
Closed
19 of 20 tasks

Comments

@bajtos
Copy link
Member

bajtos commented Nov 16, 2017

Right now, Application constructor accepts a config/options object that mixes two very different concerns:

  1. The functionality/features the application should implement - what controllers it contains, what repositories are registered, etc. ("the assembly instructions")
  2. The configuration - what port to listen on, what database servers to connect to, etc.

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

@shimks
Copy link
Contributor

shimks commented Feb 7, 2018

@bajtos @kjdelisle Are the implementation of configs for port and database connection string out of scope for this task? Nevermind, those already exist within servers

@bajtos
Copy link
Member Author

bajtos commented Feb 8, 2018

@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 strongloop-archive organization is no longer maintained.

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?

@shimks
Copy link
Contributor

shimks commented Feb 8, 2018

@bajtos There's no changes that need to be made in loopback4-example-microservices, so we're good with that repository for now.

@shimks
Copy link
Contributor

shimks commented Feb 13, 2018

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:

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.

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

2 participants