Since the release of Developer Preview #1 in November 2017, the LoopBack team have been focusing on adding features for application developers to define and implement REST APIs with Controllers and Repositories. We also continue to improve the core modules of the framework, such as Decorator/Metadata and Context/Dependency Injection. A lot of efforts are put into documentation and developer productivity. We’re pleased to announce that Developer Preview #2 of LoopBack 4 is available today!
Highlights of Developer Preview 2
- New LoopBack logo determined by our community
- BootStrapper and booters for Repository and Controller
- OpenAPI v3 support for staying with the latest technologies
- Enhanced command-line interfaces for better developer experience
- Decorator and metadata utilities
- Improved IoC container and Dependency Injection
- Improved documentation
- Simplified and improved development process
- Generation of JSON schema from models
Let’s take a closer look at each highlight.
The Swagger/OpenAPI specification has become the de facto standard of defining and describing machine-readable RESTful APIs over the past few years and announced its major release of version 3.0.0 in 2017. The new version also changes the official name from “Swagger” to “OpenAPI”. As a framework for building microservices, LoopBack keeps improving its user experience of creating RESTful APIs and always upgrades the tooling to stay with the latest industry standards. Given the community feedback we have received in the last few months, we decided to adopt the OpenAPI 3.0.0 specification to describe the exposed RESTful APIs of a LoopBack application. LoopBack 4 users can now build their OpenAPI 3.0.0 endpoints with upgraded packages.
In this series, we will work through creating a basic LoopBack 4 application that exposes REST APIs, calls out to GitHub APIs through octokat.js (a GitHub API client) to get the number of stargazers on a user-specified GitHub organization and repository, and persists the data into a Cloudant database.
In Part 1 of this blog post series, we created a LoopBack 4 application and created a REST endpoint in
GHRepoController that takes GitHub organization and repository as the path parameters. We’ll continue by adding logic to the
getRepoStargazers function in
With the emergence of Progressive Web Apps and browser APIs such as persistent storage, payments, geolocation, and push notifications, it is now possible to build mobile apps on the web platform that have many of the same features as native apps. LoopBack makes a great backend web and API server for a frontend Progressive Web App. This post demonstrates how you can serve a Progressive Web App from LoopBack that:
- ⚙️ Uses a Service Worker to enable the app to work whether or not the end user’s device has an internet connection (this is what is referred to as an Offline First approach)
- 📱 Contains a web app manifest to control how the app is experienced by end users
- 🔐 Is served over HTTPS for security
- 🚀 Is served over HTTP/2 for performance
- 💯 Scores 100s in all categories within the Lighthouse web app audit tool
With spring in the air, we’ve been hard at work gearing up for a new major release of LoopBack 4, which we’ve dubbed the “Developer Preview 2”. The team has been focusing on the items needed for this release in the March Milestone. You can also see the April Milestone to see the work we have planned for the month of April.
Read on to learn about the March Milestone’s accomplishments and more.