Back in April, we kicked off LoopBack 4 as the next major advance of the popular Node.js based open source API framework. The team has been working on the new code base since then. Today I’m super excited to announce that the first Developer Preview release of LoopBack 4 is ready for you to test drive.

What’s new in the release?

  1. A brand new LoopBack core written in TypeScript with great extensibility and flexibility.
    • Leveraging latest and greatest language features such as classes, optional typing, and decorators to boost development productivity and code quality.
    • Providing 100% Promise based APIs and full support of Async/Await to simplify asynchronous programming.
    • Implementing an Inversion of Control (IoC) container and Dependency Injection to manage artifacts and resolve dependencies.
    • Introducing components as the packaging model to bundle artifacts and extensions into modules for even better modularity and pluggability.
  2. An OpenAPI spec driven REST API creation experience.
  3. Experimental support for persistence.
    • Repositories as new interfaces for interacting with data stores.
    • A reference implementation using LoopBack 3.x juggler and connectors.
    • Divide the responsibility of LoopBack 3.x models into controllers, data models, repositories.
  4. Basic authentication support.
    • The module serves as a role model to validate the extensibility story of LoopBack 4 and showcase how to build extensions as a component.
    • A @authenticate decorator for application developers to express authentication requirements.
    • An action to be invoked for REST API sequence to perform authentication.
    • A way to plug in different strategies.
  5. Documentation.
    • The documentation for LoopBack 4 is available here.
    • To get started, follow instructions at here.
    • To understand key concepts, check out this.
    • To follow best practices, read Thinking in LoopBack 4.

Who is this for?

The Developer Preview release targets:

Extension developers (those who are interested in contributing new features to LoopBack)

The release makes the new foundation available for extension developers to create new extensions for LoopBack 4. Here are a few steps to get you started.

  1. Play with example extensions:
  2. Check out Extending LoopBack 4 and Crafting LoopBack 4.

  3. Read the wish list of extensions to find inspiration.

  4. Join the community efforts for some of the interesting extensions, such as:
  5. Create your own by scaffolding an extension project.
npm i -g @loopback/cli
lb4 extension <extension-name>

API application developers (those who are interested in using LoopBack to create APIs).

The Developer Preview releases implements basic REST API creation capabilities with preliminary database persistence. To try out the new ways of building APIs, you can follow the steps below:

  1. Play with sample applications.
  2. Follow instructions at Installation and Getting Started.

  3. Understand the key concepts as building blocks for LoopBack 4 applications.

  4. Use Components.

  5. Create your own by scaffolding an application project.
npm i -g @loopback/cli
lb4 app <app-name>

What’s different from LoopBack 3.x

If you are an existing user of LoopBack 3.x, you might wonder what’s different between 3.x and 4. Some of the questions are answered by http://loopback.io/doc/en/lb4/LoopBack-3.x.html.

What’s next?

The Developer Preview release is just the first milestone of our LoopBack 4 journey. A tentative plan is outlined at https://github.com/strongloop/loopback-next/wiki/Upcoming-Releases. Please note that it is not an official commitment and subject to adjustment as we make progress with the community contributions and feedbacks.

Call for action

LoopBack’s future success counts on you. We appreciate your continuous support and engagement to make LoopBack even better and meaningful for your API creation experience. Please join us and help the project by: