Express-Alternative Feathers: The power of the Node.js-Framework differently

You don’t need a JavaScript Framework? But! Feathers is Open Source and is a bit different than the other. Since this week, Version 4, is available to the public – an occasion, the Underdog with the species of birds in the version name for a closer look.

FeathersJS is a client-side Node.JS-Framework, with your Real-Time applications and REST API in Node.JS, React.JS and your Browser will create. The Framework is based on a combination of Design Patterns, and Tools.

Many Lower-Level Node.JS Frameworks such as Express, Koa, Fastify and Hapi are suitable for almost everything – if you want to orchestrate almost everything myself, and to build. In Express, the most popular of them are developers, for example, just concepts for Routing and Handling of HTTP Requests to the Hand. This provides for freedom, but also that you have to think of the rest of the architecture itself. In Rails, there are API and clearly defined guidelines for the handling of project structure, configuration, Database Layer, authentication, Logging, Error Handling, and even Job Queues. Many Higher-Level Frameworks for Node.JS – for example, Sails or NestJS – copy the MVC structure of Rails. MVC stands for one of the components of the Model, controller and Views to existing Software architecture.

Services and Hooks as a Basis

The Design of the Feathers is based on Services and the so-called Hooks. The Service Layer you can as a common Interface that will be used by different Clients, for example, the Interface of your Web App, the command line Tool or Integration gateway – together. These Clients differ in their use, to interact, but often together with an App. Your Routes, HTTP Requests, the Controller and the Response Handler needs. The Service Layer combines the logic of the interaction in a common Interface – that means: no Routing, no Response-Handler, no HTTP Requests, no Controller, and in the end less complicated Code. Services are simple JS objects with one or more methods that can be registered as Express Middleware. Workflows rows of so-called Hooks, or Middleware are to each other-functions that can be before, after, or within the Service methods registered. Data flow and error messages are controlled by so-called Continuations – the result of a function is passed on to the next. This is one of the programming style is also a Continuation-Passing-Style, in contrast to the so-called Direct-Style, with the results after the execution of a function back to the caller will be returned. Hooks are a transport independent – it doesn’t matter if they were accessed via HTTP(S), Socket or Primus and service-agnostic, they can be used with any service. Using Hooks, for example, validation, Logging, or the sending of Notifications can be controlled. The flexibility of the logic of your application is maintained. The Good thing is, it’s easy to test and debug the Codebase in a clear and easy. Due to the Service Layer architecture, you can get your App to a REST API or Websocket Real-Time API, or protocols, such as HTTP2, or GraphQL add, without changing anything in the Code of your App.

TypeScript Support

Feathers’ Core Libraries and Database Adapter can be used with TypeScript. In the official Guide and the API documentation, you will find all of the examples now in TypeScript. Who wants to, can, of course, remain in JavaScript.

New Authentication Mechanism

The new User-authentication in Feathers 4 provides Protocol-independent authentication strategies, which can be according to your Wish to customize. It supports multiple Login methods such as, for example, oAuth, password/Username and JSON Web Tokens.

New Homepage, and revised documentation

We don’t know the old docu – therefore, no comparison. The Feathers Guide is definitely written, understandable, and even fun. With the Tutorial your first REST API in just 15 minutes for a Chat function with REST or Websocket-API-inclusive front-end, Unit Tests, user registration, and GitHub Login, you need to allow for about two hours.

Since the Release of Feathers 1.0 meanwhile, nearly five years have passed. The Open-Source Framework to offer in the Tradition of other, more minimalist framework like Express or Koa for its users in the future, a base that can be to their needs. A large part of the for the next Release planned Updates will be Plugins and add-ons by your environment, any opportunity to expand. In planning a Koa-inspired Hook system, which you can use with any JavaScript or TypeScript method. The new authentication mechanism, Version 4, allows you to easy Transport Adapter to add. A KoaJS-Framework-Integration and a native HTTP and HTTP2 Adapter are already in the works.

Looks promising. Who knew Feathers before, at least throw with Version 4 a look at it. Especially appealing, we find the modularity and the clear project structure, resulting from the use of the framework. Eventually, the Open-Source could be Offered solution even as an Alternative to fee-based BaaS like Firebase be considered. The current name of the donor is by the way a crow.

This could also interest you:

This could also interest you

Ready to see us in action:

More To Explore

IWanta.tech
Logo
Enable registration in settings - general
Have any project in mind?

Contact us:

small_c_popup.png