Skip to content

Commit

Permalink
Copy content from loopbackio/loopback-next#485
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Feng committed Oct 10, 2017
1 parent 9ab7c72 commit 6688c9c
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions pages/en/lb4/LoopBack-3.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ This topic will help existing users of LoopBack 3.x (or earlier versions) to und
- What's on the roadmap to achieve functional parity
- What you can try with the beta release

## Overview

At high-level, LoopBack 3.x applications consist of three big "parts"

- Persistence layer (this includes talking to backend services like SOAP/REST)
- Outwards facing REST API
- App-wide setup - Express middleware, boot scripts, etc.

In the persistence layer, users can contribute the following artifacts:

1. Definitions of Model data types (properties, validations)
2. Definition of data sources
3. Configuration of models (which datasource are they attached to)
4. Operation hooks

At the public API side, users can define:

1. Which built-in methods should be exposed (think of `disableRemoteMethodByName`)
1. Custom remote methods
2. before/after/afterError hooks at application-level
3. before/after/afterError hooks at model-level
4. before/after/afterError hooks at model method level

LoopBack Next was intentionally designed to allow users to choose their ORM/persistence solution, and our initial version of @loopback/repository is based on juggler 3.x. That makes it possible for users to reuse their existing model definitions, migrating their application incrementally.

## Concept/feature mapping

In Loopback 3.x (and earlier), models were responsible for both accessing data in other systems (databases, SOAP services, etc.) and providing the application's external REST API. This made it easy to quickly build a REST interface for an existing database, but difficult to customize the REST API and fine-tune it to the needs of application clients.
Expand All @@ -29,27 +54,28 @@ LoopBack v4 is moving to the well-known Model-(View-)Controller pattern, where t
| Concept/Feature | LoopBack 3.x | LoopBack 4 |
| --------------------- | ------------ | --------------------------------- |
| Programming Language | JavaScript | TypeScript & JavaScript |
| Core foundation | Express | IoC |
| Model Definition | code/json | |
| Model Persistence | | |
| Model Relation | | |
| Model Remoting | | |
| API Sepc | | |
| API Spec | | |
| API Explorer | | |
| DataSource | | |
| Connector | | |
| Mixin | | |
| Middleware | | |
| Remote hooks | | |
| Boot script | | |
| CRUD operation hooks | | |
| Built-in models | | |
| Authentication | | |
| Authorization | | |
| Component | | |
| Tooling | | |


## What happened to models?

{% include content/tbd.html %}
## What's in the beta release

## How to transform an LB3 app to an LB4 app
## Tentative roadmap

{% include content/tbd.html %}

0 comments on commit 6688c9c

Please sign in to comment.