From 4f1effc7eda493548a63a445fde79ec0ee90098b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Tue, 5 May 2020 16:34:23 +0200 Subject: [PATCH] fixup! address review + update links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miroslav Bajtoš --- .../migration/components/current-context.md | 3 ++ docs/site/migration/components/overview.md | 38 ++++++++----------- .../migration/components/project-layout.md | 19 +--------- 3 files changed, 21 insertions(+), 39 deletions(-) diff --git a/docs/site/migration/components/current-context.md b/docs/site/migration/components/current-context.md index 19af0489bf63..928f7cac885b 100644 --- a/docs/site/migration/components/current-context.md +++ b/docs/site/migration/components/current-context.md @@ -39,6 +39,9 @@ information. For example: - `@inject.setter(key)` to obtain a setter function for writing values to the context +To keep the contextual data per-request (as opposed to per-application), the +`TRANSIENT` binding scope should be used. + Components can keep using the old `options`-based approach where it makes more sense than Dependency Injection, typically when working with existing `options`-based code like Repository APIs. diff --git a/docs/site/migration/components/overview.md b/docs/site/migration/components/overview.md index 4184fe473c10..2e934cd8dfa1 100644 --- a/docs/site/migration/components/overview.md +++ b/docs/site/migration/components/overview.md @@ -17,12 +17,6 @@ following GitHub issue: [loopback-next#3955](https://github.com/strongloop/loopback-next/issues/3955) " %} - - In LoopBack 3, a component is essentially a function that extends and/or patches the target application. @@ -45,24 +39,24 @@ import those artifacts. LoopBack 4 components can contribute: - - -- Model and Entity classes -- Mixins -- Sequence Actions -- Controllers -- Life cycle observers -- Repositories -- Service proxies -- Servers -- Extensions for Extension Points - - Booters - - Model API builders +- [Model and Entity classes](../../Model.md) +- [Mixins](../../Mixin.md) +- [Decorators](../../Creating-decorators.md) +- [Sequence Actions](../../Sequence.md#actions) +- [Controllers](../../Controllers.md) +- [Life cycle observers](../../Extension-life-cycle.md) +- [Repositories](../../Repositories.md) +- [Service proxies](../../Calling-other-APIs-and-Web-Services.md) +- [Servers](../../Creating-servers.md) +- [HTTP request parsers](../../Extending-request-body-parsing.md) +- Extensions for [Extension Points](../../Extension-point-and-extensions.md) + - [Booters](../../Booting-an-Application.md#custom-booters) + - [Model API builders](../../Extending-Model-API-builder.md) - Extensions for Extension Points defined by 3rd-party component - Any other values to be bound in `Application`'s context: - - Classes - - Providers - - Arbitrary bindings (instances of `Binding` class) + - [Classes](../../Binding.md#a-class) + - [Providers](../../Binding.md#a-provider) + - [Arbitrary bindings](../../Binding.md) (instances of `Binding` class) As the last resort, LoopBack 4 components can also modify the target application directly by calling `Application` APIs (this is similar to LoopBack 3 approach). diff --git a/docs/site/migration/components/project-layout.md b/docs/site/migration/components/project-layout.md index 1e3bc77041ad..3480982a3058 100644 --- a/docs/site/migration/components/project-layout.md +++ b/docs/site/migration/components/project-layout.md @@ -112,20 +112,5 @@ repository. We recommend to create a new project using incrementally migrate artifacts from the original LoopBack 3 component to the new project. - +{% include note.html content="The extension project template used by `lb4 extension` is a bit outdated now, please refer to [loopback-next#5336](https://github.com/strongloop/loopback-next/issues/5336) for more details. +" %}