4.x roadmap

Douglas Christopher Wilson edited this page Jun 12, 2014 · 14 revisions

This roadmap is a WIP and does not represent any final decisions.


Connect 3.x may serve as a collection of high-quality, fully tested modules, and not provide any concept of "middleware", aka .use() etc. The middleware system would then become the responsibility of Express. For example when used with a regular node http server:

var send = connect.static(root);
http.createServer(function(req, res){
  send(req.url, function(err){
    // handle errors

Express could then implement .use() to retain the original APIs.

HTTP utility methods

Effectively all of the express.response and express.request prototype methods could be separated into npm modules for use within the community. To do so we'll need to also create npm modules out of many of Connect's utilities.


Configuration is a surprisingly opinionated mechanism, for this reason, and because app.configure() acts largely as "sugar" confusing new users the app.configure() function will likely be removed. The methods app.set(), app.enable() and others will remain as they're necessary for core options and can still be leveraged for configuration. You'll have the app.env property available to do conditional config.

View system

The view system in many respects could also be abstracted into a separate module, which would use consolidate for template engine support. This system would have to extend the response prototype if it were to provide the same res.locals / res.render() features.


The router may also be abstracted out, and Express would become the aggregate of these components, but still allow non-express users to use them separately.

Error handling

Instead of "error handling" middleware, we may or may not move to a single app.error() function that gets invoked. When an application is mounted perhaps this would then delegate to the "parent" application. The one benefit of this is that app.error could be invoked from anywhere in the req/res cycle, however the downside is that users must then check if (res.headerSent) etc... so this needs more thought.


Deprecate .__express engine hook, require that users explicitly map extensions to engines, ex:

app.engine('jade', require('jade').renderFile);

The reasoning for this change is that ".jade" and ".haml" are among the only engines which define their own format, many will map to ".html" for highlighting and IDE integration

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.