Skip to content

Commit

Permalink
docs: add a skeleton of migration guide
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Bajtoš <[email protected]>
  • Loading branch information
bajtos committed Oct 17, 2019
1 parent 667b153 commit 438993e
Show file tree
Hide file tree
Showing 17 changed files with 235 additions and 7 deletions.
10 changes: 10 additions & 0 deletions docs/site/Migrating-from-LoopBack-3-redirect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
lang: en
title: 'Migrating from LoopBack 3'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/Migrating-from-LoopBack-3.html
---

The migration guide was moved to a new place:
[Migration guide](./migration-overview.md).
15 changes: 15 additions & 0 deletions docs/site/migration/authentication-authorization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
lang: en
title: 'Migrating authentication and authorization'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-authentication-authorization.html
---

TODO: explain how to migrate:

- authentication
- authorization
- built-in models (User, AccessToken, ACL)
- loopback-component-oauth2
- loopback-component-passport
9 changes: 9 additions & 0 deletions docs/site/migration/boot-scripts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
lang: en
title: 'Migrating boot scripts'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-boot-scripts.html
---

TODO: Explain how to migrate LB3 boot scripts to LB4 LifeCycle observers.
16 changes: 16 additions & 0 deletions docs/site/migration/clients.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
lang: en
title: 'Migrating clients'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-clients.html
---

Explain how to migrate client code using one of LB3 client SDKs:

- AngularJS (1.x)
- Angular (2+) (see loopback-sdk-builder)
- Android
- iOS
- Xamarin
- Isomorphic JavaScript
9 changes: 9 additions & 0 deletions docs/site/migration/datasources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
lang: en
title: 'Migrating datasources'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-datasources.html
---

TODO: show how to migrate a datasource from a LB3 app to LB4.
10 changes: 10 additions & 0 deletions docs/site/migration/express-middleware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
lang: en
title: 'Migrating Express middleware'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-express-middleware.html
---

TODO: show how to migrate a Express middleware from a LB3 app mounted inside LB4
to top-level, so that the middleware is executed for both LB3 and LB4 endpoints.
10 changes: 10 additions & 0 deletions docs/site/migration/extensions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
lang: en
title: 'Migrating components and extensions'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-extensions.html
---

TODO: explain how to migrate custom LB3 components/extensions written by our
community to make them usable in LB4 projects.
15 changes: 15 additions & 0 deletions docs/site/migration/models/core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
lang: en
title: 'Migrating models'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-models-core.html
---

TODO: Explain how to migrate core Model functionality:

- Model definition
- Persistence (via LB4 repositories)
- REST API (via LB4 controllers)

Show how to use `lb4 import-model`.
12 changes: 12 additions & 0 deletions docs/site/migration/models/methods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
lang: en
title: 'Migrating custom model methods'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-models-methods.html
---

TODO: Explain how to migrate custom model methods:

- Methods related to persistence go to LB4 Repository
- Remote methods (public API) go to Controller class
9 changes: 9 additions & 0 deletions docs/site/migration/models/mixins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
lang: en
title: 'Migrating model mixins'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-models-mixins.html
---

TODO: Explain how to migrate model mixins.
9 changes: 9 additions & 0 deletions docs/site/migration/models/operation-hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
lang: en
title: 'Migrating CRUD operation hooks'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-models-operation-hooks.html
---

TODO: Explain how to migrate CRUD Operation Hooks.
10 changes: 10 additions & 0 deletions docs/site/migration/models/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
lang: en
title: 'Migrating models'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-models-overview.html
---

TODO: Explain at high level how to migrate models from a LB3 app to a LB4
project. Refer to sub-sections for model details.
13 changes: 13 additions & 0 deletions docs/site/migration/models/relations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
lang: en
title: 'Migrating model relations'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-models-relations.html
---

TODO: Explain how to migrate model relations:

- Relation definition to LB4 model class
- Persistence (via LB4 Repositories), including inclusion resolver
- REST API (via LB4 Controllers)
16 changes: 16 additions & 0 deletions docs/site/migration/models/remoting-hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
lang: en
title: 'Migrating remoting hooks'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-models-remoting-hooks.html
---

TODO: Explain how to migrate remoting hooks to LB4 interceptors.

- Global hooks, e.g. `app.beforeRemote('**', handlerFn)`
- Model-level hooks, e.g. `app.beforeRemote('User.**', handlerFn)`
- Method-level hooks, e.g. `User.beforeRemote('create', handlerFn)`

Explain how to map properties provided by LB3 remoting context to LB4 concepts
and how to access those data via Dependency Injection.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
lang: en
title: 'Migrating from LoopBack 3'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3
title: 'Mounting a LoopBack 3 application'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/Migrating-from-LoopBack-3.html
permalink: /doc/en/lb4/migration-mounting-lb3app.html
---

For current LoopBack 3 users who want to migrate to LoopBack 4, LoopBack 4
Expand Down
12 changes: 12 additions & 0 deletions docs/site/migration/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
lang: en
title: 'Migration guide'
keywords: LoopBack 4.0, LoopBack 4, LoopBack 3, Migration
sidebar: lb4_sidebar
permalink: /doc/en/lb4/migration-overview.html
---

Migration guide from LoopBack 3 to LoopBack 4.

TODO: explain the high-level plan for upgrading in incremental steps, point to
sub-chapters for more details.
61 changes: 57 additions & 4 deletions docs/site/sidebars/lb4_sidebar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -620,17 +620,70 @@ children:
url: apidocs.index.html
output: 'web, pdf'

- title: 'For LoopBack 3.x users'
url: LoopBack-3.x.html
- title: 'Migration guide'
url: 'migration-overview.html'
output: 'web, pdf'
children:

- title: 'Understanding the differences between LoopBack 3 and LoopBack 4'
url: Understanding-the-differences.html
output: 'web, pdf'

- title: 'Migrating from LoopBack 3'
url: Migrating-from-LoopBack-3.html
- title: 'Mounting a LoopBack 3 application'
url: migration-mounting-lb3app.html
output: 'web, pdf'

- title: 'Migrating datasources'
url: migration-datasources.html
output: 'web, pdf'

- title: 'Migrating Express middleware'
url: migration-express-middleware.html
output: 'web, pdf'

- title: 'Migrating models'
url: migration-models-overview.html
output: 'web, pdf'
children:

- title: 'Model definitions and built-in APIs'
url: migration-models-core.html
output: 'web, pdf'

- title: 'Relations'
url: migration-models-relations.html
output: 'web, pdf'

- title: 'Custom methods'
url: migration-models-methods.html
output: 'web, pdf'

- title: 'Remoting hooks'
url: migration-models-remoting-hooks.html
output: 'web, pdf'

- title: 'CRUD operation hooks'
url: migration-models-operation-hooks.html
output: 'web, pdf'

- title: 'Mixins'
url: migration-models-mixins.html
output: 'web, pdf'

- title: 'Boot scripts'
url: migration-boot-scripts.html
output: 'web, pdf'

- title: 'Authentication & authorization'
url: migration-authentication-authorization.html
output: 'web, pdf'

- title: 'Components and extensions'
url: migration-extensions.html
output: 'web, pdf'

- title: 'Clients (API consumers)'
url: migration-clients.html
output: 'web, pdf'

- title: 'Best practices'
Expand Down

0 comments on commit 438993e

Please sign in to comment.