What’s New in Midway 3.0? Deep Dive into the Latest Backend Framework Features

Midway 3.0 was officially released on January 20, 2022, introducing multi‑version documentation, a clarified tech stack for standard, serverless, and integration projects, a redesigned API syntax with zero‑API calls, enhanced operators, Prisma ORM support, a new full‑stack suite, and a lightweight request SDK for both Node.js and browser environments.

Node Underground
Node Underground
Node Underground
What’s New in Midway 3.0? Deep Dive into the Latest Backend Framework Features

In January 2022 Midway held a live winter briefing and officially launched Midway & Integration 3.0.

1. 3.0 Version Release

Midway 3.0 was released on 2022‑01‑20. New features are listed in the Midway v3 preview video.

2. Multi‑Version Documentation on the Official Site

The website now supports switching between documentation versions; the default version is 3.0.

3. Clarified Technical Stack

Midway 3.0 defines three stacks:

Standard projects use Class + IoC for traditional Node.js web development.

Serverless projects support Alibaba Cloud, Tencent Cloud, and are integrating KNative.

Integration projects combine front‑end and back‑end development with functional programming, and the new Integration 3.0 is announced.

4. Appreciation for Open‑Source Contributors

Midway thanks contributors who submitted PRs in 2021 and offers gifts for eligible participants.

5. Upcoming Work

Provide Egg template.

Release OpenTelemetry integration after the new year.

Synchronize internal Alibaba version after the new year.

Integration 3.0 Overview

Integration 3.0 follows the 2021 2.0 release and adds new syntax, routing, and a full‑stack suite.

Current Status

Since its 2020 inception, over 2,800 applications have been built with Midway Integration, making it a mainstream development model at Alibaba.

New Syntax

Version 2.x used concepts such as “function‑as‑interface”, “zero‑API call”, and file‑system routing. Version 3.0 redesigns the entire syntax while retaining those concepts and adds full functionality.

An API definition now consists of: Api(): define the interface function.

Zero‑API calls remain supported, allowing direct function imports on the front‑end.

HTTP Triggers

All HTTP methods are now configurable, simplifying scenarios like OAuth2.

Additional Trigger Support

New triggers include timers, OSS callbacks, etc.

Operators

Operators are the core of Integration 3.0 and support three functions:

Declaration (e.g., Query/Params/Header).

Definition (e.g., Middleware).

Execution (e.g., Validate/HttpCode/Redirect).

Complex logic can be expressed by composing operators instead of writing tangled code.

Request & Response Operators

Request operators declare input types ( Query / Params / Headers) and automatically transform zero‑API calls into proper request structures. Response operators are also provided.

Middleware

Developers can define middleware using the Middleware operator.

Validate & ValidateHttp

Validation uses Zod; Validate(...schemas) checks input at runtime while preserving TypeScript static type safety.

Prisma ORM

Prisma generates a TypeScript‑typed ORM client from a schema, eliminating manual model definitions and enabling type‑safe database access.

New Routing

Version 3.0 simplifies routing:

No path: route generated from function or file name.

Specified path: supports dynamic parameters.

New Full‑Stack Suite

Version 3.0 introduces a unified dev/start/build configuration, reducing learning and cognitive overhead.

New Request SDK

The @midwayjs/rpc client replaces the previous Axios‑based client, shrinking size by 64% (5.6 KB → 2 KB) and supporting both browser and Node.js environments with configurable middleware.

Front‑End Builder

Based on unplugin, Midway provides Vite/Webpack plugins for one‑line front‑end integration.

Preview

The Integration 3.0 preview is publicly available; documentation and trial can be accessed at https://midwayjs.org/.

backendserverlessTypeScriptIntegrationNode.jsAPIFrameworkMidway
Node Underground
Written by

Node Underground

No language is immortal—Node.js isn’t either—but thoughtful reflection is priceless. This underground community for Node.js enthusiasts was started by Taobao’s Front‑End Team (FED) to share our original insights and viewpoints from working with Node.js. Follow us. BTW, we’re hiring.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.