

Express 3.0.0 alpha1 and Express 4.x Roadmap - jordhy
http://tjholowaychuk.com/post/21162751096/express-3-0-0-alpha1

======
courtewing
I am ecstatic to see that some node.js frameworks are trying to move toward
being aggregations of standalone modules rather than growing into monolithic
coupled frameworks.

Monolithic frameworks are plentiful in the PHP community, but recently some of
the larger frameworks have started moving toward this aggregate component
model. Unfortunately, the PHP frameworks are much older than node.js, so many
of the corresponding micro-communities are entrenched in the idea that their
framework is "best". This means that while it is awesome that frameworks are
allowing you to consume individual components, you still do not see it
happening very frequently. You almost never see the frameworks themselves
sharing components, for example.

Obviously the module system baked into node.js helps steer the community
toward the concept of consuming modules, but I'm optimistic that the community
is also young enough to completely embrace the idea of frameworks being little
more than aggregates of the most common modules for building apps and also
that "sharing" between frameworks is not something to frown upon.

~~~
bergie
One big difference is that Node.js had an easy way to share small libraries
between projects almost right from the beginning. Something like NPM is only
now starting to appear in PHP, and seems to be slowly breaking projects out of
the reinventing-the-wheel mindset. A great example is Drupal using the
Symfony2 HTTP foundation (request and response objects, etc)

[http://bergie.iki.fi/blog/composer_solves_the_php_code-
shari...](http://bergie.iki.fi/blog/composer_solves_the_php_code-
sharing_problem/)

------
ricardobeat
I really like the fact the the code is shrinking. It's refreshing to be able
to read and understand _all_ of the source code that your apps are using.

There are a few changes that worry me:

* req.get() instead of req.header() - 'get' is an ambiguous word here, might be confused with req.params(). I'd keep the overloaded req.header() just dropping the `defaultValue` parameter

* res.render(404, 'not here') doesn't work anymore. res.statusCode goes against the rest of the 'minimal' api like res.xhr and res.type

* removal of layout/partials (but curious to see what will come out of it)

~~~
bmelton
What would you suggest in lieu of the layouts/partials for visual elements?

The Django community has issues with this from time to time, where packages
sometimes don't include any templating, leaving people to guess at what needs
to be there.

I don't know of an obvious solution though, except maybe a kitchen sink
example of some sort. Thoughts?

~~~
tjholowaychuk
Up to the engines now, Jade implements django-like inheritance and includes,
same with swig and a few of the others. There are a few that do not have any
notion of IO so I plan on having a third-party implementation of the old
partial() function, removing it greatly simplified the view system for people
who were not using it previously anyway, and some of the rules partial()
employed were needlessly confusing (collections etc).

------
tferris
Anyone who came from other frameworks to node/express and like to share
experiences they made?

~~~
daliusd
I have experience in Python (wsgi, paste, pylons, GAE) and ASP.NET (MVC). I
like programming using node/express - node packaging system is very simple,
express code is understandable and very readable. There are some things that
you do not get out of the box but overall that's minor problems.

The only problem for me as automated testing and in result I have written my
tests in Python.

~~~
hkarthik
_The only problem for me as automated testing and in result I have written my
tests in Python._

To a Ruby developer like myself, this seems like a pretty significant gap.

Have you looked at Jasmine or some of the other testing frameworks for Node?
Or is there something inherent about writing async apps that makes them
difficult to test?

~~~
funksta
There are some good testing libraries for node (eg.
<https://github.com/visionmedia/mocha>, by the same author as Express), that
make async testing fairly painless. However, there are things like DB
setup/teardown that aren't integrated and you might be used to getting "for
free" with other frameworks (eg. Django). I'm curious to hear what the parent
commenter has found to be a roadblock.

~~~
daliusd
Actually no roadblocks (details in other comment). Just python was simpler and
I don't see problem writing different parts in different languages.

