Re: [nodejs] [ANN] Protein

2012-04-12 Thread Mathias Buus
I glad you like it! You have a very good point about bundling middleware. I was conflicted about including any but decided to add a few mainly as examples. I like your approach with stack in keeping it super lean so I think I'll remove them in an upcoming version and add some better examples.

Re: [nodejs] [ANN] Protein

2012-04-12 Thread Guillermo Rauch
Interesting post that might hint at __proto__ never going away: https://mail.mozilla.org/pipermail/es-discuss/2011-December/019083.html On Thu, Apr 12, 2012 at 4:34 PM, Mathias Buus wrote: > You are completely right. I see a lot of other modules mutating __proto__ > though like express and socke

Re: [nodejs] [ANN] Protein

2012-04-12 Thread Tim Caswell
I'm just as guilty as anyone about using __proto__. It's here today and works in node. Even APIs and features that are standard may go away some time. I just try to find other solutions when I can since people get up in arms about using non-standard features. I think this use case is a good rea

Re: [nodejs] [ANN] Protein

2012-04-12 Thread Mathias Buus
You are completely right. I see a lot of other modules mutating __proto__ though like express and socket.io so hopefully v8 will continue to support it. On 12/04/2012, at 21.19, Tim Caswell wrote: > Cool. Just be aware that __proto__ is both non standard and deprecated. I'm > not sure how th

Re: [nodejs] [ANN] Protein

2012-04-12 Thread Nathan Rajlich
Tim, it looks like they're trying to standardize __proto__ for ES6 actually: http://wiki.ecmascript.org/doku.php?id=strawman:magic_proto_property On Thu, Apr 12, 2012 at 12:19 PM, Tim Caswell wrote: > Cool. Just be aware that __proto__ is both non standard and deprecated. > I'm not sure how thi

Re: [nodejs] [ANN] Protein

2012-04-12 Thread Tim Caswell
Cool. Just be aware that __proto__ is both non standard and deprecated. I'm not sure how this would be done with pure ES5 or ES6 code though. I really like how protein just returns a function and doesn't mess with the HttpServer or subclass it like connect does. On Thu, Apr 12, 2012 at 2:06 PM,

Re: [nodejs] [ANN] Protein

2012-04-12 Thread Mathias Buus
Yes I am mutating the __proto__ link of the request and response. > One question, how do you extend the prototypes once (not per request) without > changing the http prototypes. Are you mutating the .__proto__ of the request > when it comes in from node? > -- Job Board: http://jobs.nodejs.o

Re: [nodejs] [ANN] Protein

2012-04-12 Thread Tim Caswell
Very nice. I made a super simple connect compatable runner a while back called stack. But I like the extras you added here with the getters and custom methods. One question, how do you extend the prototypes once (not per request) without changing the http pr

[nodejs] [ANN] Protein

2012-04-12 Thread Mathias Buus Madsen
Protein is an HTTP middleware module for Node.js but with a twist! Blazing fast, Connect-compatible and the kicker is that there is a very powerful support for prototype methods, getters, and setters. https://github.com/mafintosh/protein -- Job Board: http://jobs.nodejs.org/ Posting guidelines: