From d511020378f6aff233a39d67fe6e119dd8a2f783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Fri, 11 Oct 2019 14:14:35 +0200 Subject: [PATCH 1/2] docs: reformat large table from Markdown to HTML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No changes in the actual content were made. Signed-off-by: Miroslav Bajtoš --- docs/site/Understanding-the-differences.md | 177 ++++++++++++++++++--- 1 file changed, 155 insertions(+), 22 deletions(-) diff --git a/docs/site/Understanding-the-differences.md b/docs/site/Understanding-the-differences.md index c38b36f63ade..061bcd7fe3fd 100644 --- a/docs/site/Understanding-the-differences.md +++ b/docs/site/Understanding-the-differences.md @@ -61,28 +61,161 @@ it is independent of the three services. We can define the APIs in facade the way we want. Thus, code responsible for data access and manipulation is separated from the code responsible for implementing client side APIs. -| Concept/Feature | LoopBack 3.x | LoopBack 4 | -| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Programming Language | Built with JavaScript ES5
Node.js callback | TypeScript 2.6.x & JavaScript ES2016/2017
Promise & Async/Await | -| Core foundation | Express with LoopBack extensions | Home-grown IoC container | -| Model Definition | Models can be defined with JavaScript or JSON | Models can be defined with TypeScript/JavaScript/JSON(TBA) | -| Model Persistence | A model can be attached to a datasource backed by a connector that implements CRUD operations | [Repositories](https://github.com/strongloop/loopback-next/tree/master/packages/repository) are introduced to represent persistence related operations; a repository binds a model metadata to a datasource | -| Model Relation | Relations can be defined between models | (TBA) Relations can be defined between models but they will be realized between repositories | -| Model Remoting | JavaScript/JSON remoting metadata is used to describe method signatures and their mapping to REST/HTTP
Swagger specs are generated after the fact | Remoting metadata can be supplied by OpenAPI JSON/YAML documents or generated automatically through TypeScript decorators | -| API Spec | Swagger 2.0 | OpenAPI Spec 3.0 and potentially other API specs such as GraphQL, gRPC, etc. | -| API Explorer | Built-in UI based on swagger-ui (/explorer) | (Beta) Expose OpenAPI specs and a browser redirect to Swagger UI hosted by loopback.io | -| DataSource | JSON and JS | JSON/JS/TypeScript | -| Connector | Plain JS | JS and TypeScript (TBA) | -| Mixin | Use a utility to add methods from the mixin to the target model class | Use ES2015 mixin classes pattern supported by [TypeScript 2.2 and above](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html) | -| Middleware | Express middleware with phase-based registration and ordering | Sequence consisting of actions | -| Boot script | Scripts to be invoked during bootstrapping | (TBD) | -| Remote hooks | Before/After hooks for remote methods | Sequence/actions | -| CRUD operation hooks | Hooks for CRUD operations | Sequence/actions | -| Built-in models | Built-in User/AccessToken/Application/ACL/Role/RoleMapping for AAA | (TBD) | -| Authentication | User model as the login provider
loopback-component-passport | (TBA) Authentication component ([@loopback/authentication](https://github.com/strongloop/loopback-next/tree/master/packages/authentication)) with extensibility to strategy providers | -| Authorization | Use built-in User/Application/AccessToken model for identity and ACL/Role/RoleMapping for authorization | (TBD) Authorization component | -| Component | A very simple implementation to configure and invoke other modules | A fully-fledged packaging model that allows contribution of extensions from other modules | -| Tooling | loopback-cli and API Connect UI | [@loopback/cli](https://github.com/strongloop/loopback-next/tree/master/packages/cli) | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Concept/FeatureLoopBack 3.xLoopBack 4
Programming LanguageBuilt with JavaScript ES5
Node.js callback
TypeScript 2.6.x & JavaScript ES2016/2017
Promise & Async/Await
Core foundationExpress with LoopBack extensionsHome-grown IoC container
Model DefinitionModels can be defined with JavaScript or JSONModels can be defined with TypeScript/JavaScript/JSON(TBA)
Model PersistenceA model can be attached to a datasource backed by a connector that + implements CRUD operations + Repositories + are introduced to represent persistence related operations; a repository + binds a model metadata to a datasource +
Model RelationRelations can be defined between models(TBA) Relations can be defined between models but they will be realized + between repositories +
Model RemotingJavaScript/JSON remoting metadata is used to describe method signatures + and their mapping to REST/HTTP +
Swagger specs are generated after the fact +
Remoting metadata can be supplied by OpenAPI JSON/YAML documents or + generated automatically through TypeScript decorators +
API SpecSwagger 2.0OpenAPI Spec 3.0 and potentially other API specs such as GraphQL, gRPC, etc.
API ExplorerBuilt-in UI based on swagger-ui (/explorer)(Beta) Expose OpenAPI specs and a browser redirect to Swagger UI hosted + by loopback.io +
DataSourceJSON and JSJSON/JS/TypeScript
ConnectorPlain JSJS and TypeScript (TBA)
MixinUse a utility to add methods from the mixin to the target model classUse ES2015 mixin classes pattern supported by + TypeScript 2.2 and above +
MiddlewareExpress middleware with phase-based registration and orderingSequence consisting of actions
Boot scriptScripts to be invoked during bootstrapping(TBD)
Remote hooksBefore/After hooks for remote methodsSequence/actions
CRUD operation hooksHooks for CRUD operationsSequence/actions
Built-in modelsBuilt-in User/AccessToken/Application/ACL/Role/RoleMapping for AAA(TBD)
AuthenticationUser model as the login provider
loopback-component-passport
(TBA) Authentication component + (@loopback/authentication) + with extensibility to strategy providers +
AuthorizationUse built-in User/Application/AccessToken model for identity and + ACL/Role/RoleMapping for authorization + (TBD) Authorization component
ComponentA very simple implementation to configure and invoke other modulesA fully-fledged packaging model that allows contribution of extensions + from other modules +
Toolingloopback-cli and API Connect UI@loopback/cli
## What's new and exciting in LoopBack 4 From 72b15f7007c937d008a388461d0138f5f1fdfff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Fri, 11 Oct 2019 14:53:15 +0200 Subject: [PATCH 2/2] docs: update "Understanding differences between LB3 and LB4" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the content to reflect features delivered since the page was created. Add more entries for LB3 features and components. Signed-off-by: Miroslav Bajtoš --- docs/site/Understanding-the-differences.md | 130 ++++++++++++++++----- 1 file changed, 100 insertions(+), 30 deletions(-) diff --git a/docs/site/Understanding-the-differences.md b/docs/site/Understanding-the-differences.md index 061bcd7fe3fd..4e2409a721ec 100644 --- a/docs/site/Understanding-the-differences.md +++ b/docs/site/Understanding-the-differences.md @@ -73,8 +73,10 @@ separated from the code responsible for implementing client side APIs. Programming Language - Built with JavaScript ES5
Node.js callback - TypeScript 2.6.x & JavaScript ES2016/2017
Promise & Async/Await + Built with JavaScript ES5
Node.js callbacks + Modern TypeScript with latest JavaScript features +
Promises & async/await, ES2016/2017 and beyond + @@ -83,10 +85,19 @@ separated from the code responsible for implementing client side APIs. Home-grown IoC container + + Tooling + loopback-cli and API Connect UI + @loopback/cli + + Model Definition Models can be defined with JavaScript or JSON - Models can be defined with TypeScript/JavaScript/JSON(TBA) + Models can be defined with TypeScript; +
TBD: JavaScript - see + loopback-next#560 + @@ -94,17 +105,17 @@ separated from the code responsible for implementing client side APIs. A model can be attached to a datasource backed by a connector that implements CRUD operations - Repositories - are introduced to represent persistence related operations; a repository - binds a model metadata to a datasource + Repositories are introduced to represent + persistence related operations; a repository binds a model metadata + to a datasource Model Relation Relations can be defined between models - (TBA) Relations can be defined between models but they will be realized - between repositories + Relations can be defined between models; queries and persistence are + implemented at repository level @@ -122,31 +133,35 @@ separated from the code responsible for implementing client side APIs. API Spec Swagger 2.0 - OpenAPI Spec 3.0 and potentially other API specs such as GraphQL, gRPC, etc. + OpenAPI Spec v3 and potentially other API specs such as GraphQL, gRPC, etc. API Explorer - Built-in UI based on swagger-ui (/explorer) - (Beta) Expose OpenAPI specs and a browser redirect to Swagger UI hosted - by loopback.io - + Built-in UI based on swagger-ui v2 (/explorer) + Built-in UI based on swagger-ui v3 (/explorer) DataSource - JSON and JS - JSON/JS/TypeScript + JSON + TypeScript and JSON; +
TBD: JavaScript - see + loopback-next#560 + - Connector - Plain JS - JS and TypeScript (TBA) + Connectors + Plain JavaScript, ES5 with callbacks + Plain JavaScript, ES5 with callbacks; +
TBD: TypeScript with async/await - see + loopback-next#889 + - Mixin + Mixins Use a utility to add methods from the mixin to the target model class Use ES2015 mixin classes pattern supported by TypeScript 2.2 and above @@ -156,25 +171,30 @@ separated from the code responsible for implementing client side APIs. Middleware Express middleware with phase-based registration and ordering - Sequence consisting of actions + Sequence consisting of actions; +
TBD: support for Express middleware, see + loopback-next#1293 + and + loopback-next#2035. + Boot script Scripts to be invoked during bootstrapping - (TBD) + Life cycle events and observers Remote hooks Before/After hooks for remote methods - Sequence/actions + Interceptors CRUD operation hooks Hooks for CRUD operations - Sequence/actions + (TBD) @@ -186,8 +206,7 @@ separated from the code responsible for implementing client side APIs. Authentication User model as the login provider
loopback-component-passport - (TBA) Authentication component - (@loopback/authentication) + Authentication component with extensibility to strategy providers @@ -197,7 +216,9 @@ separated from the code responsible for implementing client side APIs. Use built-in User/Application/AccessToken model for identity and ACL/Role/RoleMapping for authorization - (TBD) Authorization component + Authorization component + (work in progress). + @@ -209,9 +230,58 @@ separated from the code responsible for implementing client side APIs. - Tooling - loopback-cli and API Connect UI - @loopback/cli + Storage component + loopback-compontent-storage + + not available + + + + Push notifications + loopback-component-push + + not available + + + + OAuth 2.0 provider + loopback-component-oauth2 + + (TBD) + + + + 3rd-party logins via Passport + loopback-component-passport + + @loopback/authentication-passport +
(EXPERIMENTAL) + + + + + Offline synchronization + Synchronization component + (EXPERIMENTAL) + + not available + + + + Client SDKs + + AngularJS (1.x), + Android, + iOS, + Xamarin, + Isomorphic JavaScript + + + OpenAPI code generators, e.g. + swagger-codegen, + openapi-generator or + ng-openapi-gen + @@ -235,7 +305,7 @@ Some of the highlights of LoopBack 4 include: - Models: define schemas for business objects - Services: interact with existing REST APIs, SOAP Web Services, and other forms of services/microservices -- Refactor the ORM into separate modules for different concerns +- Refactor the ORM into separate modules for different concerns (TBD) As LoopBack 4 continues to grow, more features are continuously added. You can check out our [blog](https://strongloop.com/strongblog/tag_LoopBack.html) to