loopbackio / loopback-next

LoopBack makes it easy to build modern API applications that require complex integrations.
https://loopback.io
Other
4.95k stars 1.07k forks source link

Improve Extension authoring #953

Closed bajtos closed 3 years ago

bajtos commented 6 years ago

List of issues in the current design of Extensions:

I think we should step back to the drawing board, build/update the requirements (a list of things extensions typically want to accomplish), and come up with the best solution that will support these requirements while making developer experience superb.

More requirements to keep in mind:

  1. The ability to expose an extension point to allow customization of a service and fall back to a default implementation. For example, a user management component by default uses bcrypt for password hashing but it should allow an optional external binding for the hashing function.

  2. The ability to organize artifacts as extension points/extensions, for example, bootstrapper -> booters, authenticator -> strategies, rest -> servers, even app -> components. The extension point should be able to depend on a list or map of extension instances for delegation. Each extension point and extension should be able to receive corresponding configurations.

  3. The ability to maintain isolated and connected contexts for an app, a component, or an extension point.

raymondfeng commented 6 years ago

Cross-post: https://github.com/strongloop/loopback-next/pull/858#issuecomment-362713495

raymondfeng commented 6 years ago

@bajtos In addition to what you have listed, I also have the following requirements in mind:

  1. The ability to expose an extension point to allow customization of a service and fall back to a default implementation. For example, a user management component by default uses bcrypt for password hashing but it should allow an optional external binding for the hashing function.

  2. The ability to organize artifacts as extension points/extensions, for example, bootstrapper -> booters, authenticator -> strategies, rest -> servers, even app -> components. The extension point should be able to depend on a list or map of extension instances for delegation. Each extension point and extension should be able to receive corresponding configurations.

  3. The ability to maintain isolated and connected contexts for an app, a component, or an extension point.

bajtos commented 6 years ago

@raymondfeng thanks, I'll add you items to the top-level description. I think the scope of this issue has overgrown the size of a single user story, I am going to change this issue to an epic.

stale[bot] commented 3 years ago

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.

stale[bot] commented 3 years ago

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.