LoopBack, an open source API framework built by company StrongLoop. StrongLoop is an important contributor to the latest Node version and long-time maintainers of Express as well.

It is a framework for creating APIs and connecting them with backend data sources. Built on top of Express, it can take a data model definition and easily generate a fully functional end-to-end REST API that can be called by any client.

LoopBack makes it easy to build modern applications that require complex integrations.Some features are:

  • Fast, small, powerful, extensible core
  • Generate real APIs with a single command
  • Define your data and endpoints with OpenAPI
  • Create dynamic end-to-end REST APIs with little or no coding.
  • Access data from Oracle, MySQL, PostgreSQL, MS SQL Server, MongoDB, SOAP and other REST APIs.
  • Incorporate model relationships and access controls for complex APIs.

APIs generated via LoopBack are Swagger APIs.

LoopBack CLI can reduce hours of development work by helping in the creation of data models and setting up authentication.

LoopBack consists of:

  • A library of Node.Js modules.
  • Yeoman generators for scaffolding applications.
  • Client SDKs for iOS, Android, and web clients.

LoopBack tools include:

  • Command-line tool loopback-cli to create applications, models, data sources, and so on

LoopBack 4 introduces some new concepts that are important to understand:

  • Application: The central class for setting up all of your module’s components, controllers, servers and bindings. The Application class extends Context and provides the controls for starting and stopping its associated servers.
  • Server: An implementation for inbound transports/protocols such as REST (http, https), gRPC (http2) and graphQL (http, https). It typically listens on a specific endpoint (protocol/host/port), handles incoming requests, and then returns appropriate responses.
  • Context: An abstraction of states and dependencies in your application that LoopBack uses to manage everything. It’s a global registry for everything in your app (configurations, state, dependencies, classes and so on).
  • Binding: An abstraction of items managed by a context. Each binding has a unique key within the context and a value provider to resolve the key to a value.
  • Dependency Injection: The technique used to separate the construction of dependencies of a class or function from its behavior to keep the code loosely coupled.
  • Controller: A class that implements operations defined by the application’s REST API. It implements an application’s business logic and acts as a bridge between the HTTP/REST API and domain/database models. A Controller operates only on processed input and abstractions of backend services / databases.
  • Route: The mapping between your API specification and an Operation. It tells LoopBack which Operation to invoke()when given an HTTP request.
  • Sequence: A stateless grouping of Actions that control how a Server responds to requests.
  • Model: The definition of an object in respect to the datasource juggler. The @loopback/repository module provides special decorators for adding metadata to TypeScript/JavaScript classes to use them with the legacy implementation of DataSource Juggler. In addition, @loopback/repository-json-schema module uses the decorators’ metadata to build a matching JSON Schema.
  • DataSources: A named configuration for a Connector instance that represents data in an external system.
  • Repository: A type of service that represents a collection of data within a DataSource.
  • Relation: A mapping between two models which describes a real world link between them and exposes CRUD APIs based on the configuration.
  • Decorator: The pattern used to annotate or modify your class declarations and their members with metadata.
  • Component: A package that bundles one or more Loopback extensions.

Suffering from Knowledge Quest

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store