Re:Strata Web Framework
by moomin on Wednesday September 21, 2011 @08:52AM
(#3021762)
I guess the obvious question is: what does this offer that you don't get from connect/express?
[ Parent
| on HN ]
From the official announcement https://groups.google.com/forum/m/#!topic/nodejs/fqBTNLwhEAI
The main advantages/differences over Connect/Express at this point are:
- Patterned after WSGI/Rack. This implies some significant differences in the API.
- Built on node 0.4; takes full advantage of streams.
- Built-in support for streaming multipart parsing/file uploading (uses node-formidable's parser).
- Built-in support for gzip encoding, URL rewriting, and URL mapping.
- RFC-compliant support for content negotiation using the Accept, Accept-Language, Accept-Encoding, and Accept-Charset HTTP headers.
- A specification with middleware to enforce it.So nothing? Streams, multiparts, gzip, that is all in Connect/Express. I'm sorry but adhering to some spec that few people use or care about is hardly an advantage over Connect. Wouldn't it be trivial for Connect to adhere to the spec anyways?
tjholowaychuk has done extensive testing/benchmarking of Connect/Express. I'd really like to see some benchmarks and code coverage.
Re:Strata Web Framework
by theyCallMeSwift on Wednesday September 21, 2011 @12:34PM
(#3022641)
+1 for wanting a solid answer to this question
Re:Strata Web Framework
by mjijackson on Wednesday September 21, 2011 @01:23PM
(#3022881)
Connect/Express do little more than set up a callback chain for you that passes along the request and response objects it received from node's request listener.
Strata gives you a sane environment modeled after the WSGI/Rack/CGI model, which has been the backbone of web servers for years.
Also, Strata's API matches the WSGI/Rack model. This may seem small, but in practice it's a significant benefit.
Add to that the list of features cited in the release email, including native support for streams in node 0.4.
What can't you do with streams in Connect/Express?
Re:Strata Web Framework
by tjholowaychuk on Wednesday September 21, 2011 @08:09PM
(#3024222)
It's easier with Connect/Express haha, stream.pipe(res) vs callback(200, {}, stream). We've been down this road in the past, in fact Express started out a bit more like this, abstracting away node's req/res, but it's a leaky abstraction that doesn't really provide any real benefit. As far as "filtering" on streams etc, this is something node core should provide (and will be shortly) so it's irrelevant in that respect as well
Re:Strata Web Framework
by tjholowaychuk on Wednesday September 21, 2011 @02:29PM
(#3023148)
you get leaky abstractions that have already been proven to fail! :)
Re:Strata Web Framework
by mjijackson on Wednesday September 21, 2011 @03:21PM
(#3023302)
Proven to fail? You haven't proven anything. Abstractions can be useful. You use lots of them every day. Node itself is an abstraction.
Re:Strata Web Framework
by tjholowaychuk on Wednesday September 21, 2011 @03:50PM
(#3023395)
you're certainly welcome to think what you like, I dont have time to argue