Skip to content
visionmedia edited this page Apr 20, 2012 · 10 revisions

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

Connect

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.

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.

Routing

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.

Clone this wiki locally