Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion JSGI Middleware

Received: by 10.68.212.98 with SMTP id nj2mr495543pbc.8.1325213220601;
        Thu, 29 Dec 2011 18:47:00 -0800 (PST)
X-BeenThere: commonjs@googlegroups.com
Received: by 10.68.74.199 with SMTP id w7ls36016892pbv.7.gmail; Thu, 29 Dec
 2011 18:46:59 -0800 (PST)
Received: by 10.68.191.41 with SMTP id gv9mr26194589pbc.5.1325213219364;
        Thu, 29 Dec 2011 18:46:59 -0800 (PST)
Received: by 10.68.191.41 with SMTP id gv9mr26194588pbc.5.1325213219351;
        Thu, 29 Dec 2011 18:46:59 -0800 (PST)
Return-Path: <christ...@christophdorn.com>
Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca. [64.59.134.9])
        by gmr-mx.google.com with ESMTP id n6si44445506pbg.2.2011.12.29.18.46.58;
        Thu, 29 Dec 2011 18:46:59 -0800 (PST)
Received-SPF: neutral (google.com: 64.59.134.9 is neither permitted nor denied by best guess record for domain of christ...@christophdorn.com) client-ip=64.59.134.9;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 64.59.134.9 is neither permitted nor denied by best guess record for domain of christ...@christophdorn.com) smtp.mail=christ...@christophdorn.com
Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd6ml3no-ssvc.prod.shaw.ca) ([10.0.144.222])
  by pd7mo1no-svcs.prod.shaw.ca with ESMTP; 29 Dec 2011 19:46:58 -0700
X-Cloudmark-SP-Filtered: true
X-Cloudmark-SP-Result: v=1.1 cv=gFGh1ScE7ROJHT2jhivHYaSHya8441O0LZB7wkhlVyo= c=1 sm=1
 a=aanwr3ToRf0A:10 a=LSI6K67ZlBAA:10 a=anZJ3YWCyNIA:10 a=BLceEmwcHowA:10
 a=LV9VgYOtwyAjpHlsWn1mDQ==:17 a=NEAV23lmAAAA:8 a=EAZAc-2dp5NxoUS6nFAA:9
 a=UkqBBIeIp_Q4yseV1ToA:7 a=wPNLvfGTeEIA:10 a=pGLkceISAAAA:8
 a=ELU1qVDfx1MALtQD288A:9 a=r23_YHqYhxb8ATON-BsA:7
 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117
Received: from unknown (HELO macbook1-home-cadorn-net-2.local) ([174.4.14.179])
  by pd6ml3no-dmz.prod.shaw.ca with ESMTP; 29 Dec 2011 19:46:58 -0700
Message-ID: <4EFD2620.8000700@christophdorn.com>
Date: Thu, 29 Dec 2011 18:46:56 -0800
From: Christoph Dorn <christ...@christophdorn.com>
Reply-To: christ...@christophdorn.com
User-Agent: Postbox 2.5.3 (Macintosh/20110907)
MIME-Version: 1.0
To: commonjs@googlegroups.com
Subject: Re: [CommonJS] JSGI Middleware
References: <CAGg-Cd4MFhoNNmj7=nwHt=-0ieUbzOJbq_kKyLdhKig-z9O...@mail.gmail.com> <CAKySqA99a0tw29b8JLkENMmY9XrODxC+EGh7Ef8oZEs0raF...@mail.gmail.com> <4EFB82DF.8090...@christophdorn.com> <CAGg-Cd7iDM2UbnDiMAdFpp6ODX+T8WC78_=Em00CVEOHv35...@mail.gmail.com>
In-Reply-To: <CAGg-Cd7iDM2UbnDiMAdFpp6ODX+T8WC78_=Em00CVEOHv35...@mail.gmail.com>
Content-Type: multipart/alternative;
 boundary="------------080505040407020304080507"

This is a multi-part message in MIME format.
--------------080505040407020304080507
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Nathan Stott wrote:
>
>         benefit of making it possible to use a piece of middleware at
>         multiple
>         branches of a route. I do not think that it is particularly
>         elitist to
>         push JavaScripters to learn how to use closures.
>
>
>     For some reason this particular closure seems harder to
>     understand. I had a good understanding of closures yet the JSGI
>     interface took me more time to remember and understand. Maybe that
>     is an indicator that it combines too much? We are not even talking
>     about streaming or returning promises.
>
>
>
> It's my belief that this is because of the difference between 
> middleware and app in JSGI, a difference I think we'd be wise to do 
> away with.
> The reason I make this proposal is that I really want to see JSGI 
> compete with Connect in the Node.JS sphere as I like JSGI a lot more. 
>  I believe this one change would go a long way in making the fight for 
> mindshare easier.  We're already asking people to learn a lot as 
> Christoph points out so aptly in his message.

FYI, here is a crude Connect middleware that provides a JSGI interface: 
https://github.com/pinf/server-js/blob/master/lib/vendor/connect/middleware/jsgi.js

Christoph


--------------080505040407020304080507
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">Nathan Stott wrote:
<blockquote 
cite="mid:CAGg-Cd7iDM2UbnDiMAdFpp6ODX+T8WC78_=Em00CVEOHv35...@mail.gmail.com"
 type="cite">
  <blockquote class="gmail_quote" style="margin:0 0 0 
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><blockquote
 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc 
solid;padding-left:1ex">
benefit of making it possible to use a piece of middleware at multiple<br>
branches of a route. I do not think that it is particularly elitist to<br>
push JavaScripters to learn how to use closures.<br></blockquote>
<br></div>
For some reason this particular closure seems harder to understand. I 
had a good understanding of closures yet the JSGI interface took me more
 time to remember and understand. Maybe that is an indicator that it 
combines too much? We are not even talking about streaming or returning 
promises.</blockquote>

  <div><br></div>
  <div><br></div>
  <div>It's my belief that this is because 
of the&nbsp;difference&nbsp;between middleware and app in JSGI, a difference I 
think we'd be wise to do away with.</div>
  <div>The reason I make this 
proposal is that I really want to see JSGI compete with Connect in the 
Node.JS sphere as I like JSGI a lot more. &nbsp;I believe this one change 
would go a long way in making the fight for mindshare easier. &nbsp;We're 
already asking people to learn a lot as Christoph points out so aptly in
 his message.</div>
</blockquote>
<br>
FYI, here is a <span><span></span>crude </span><span>Connect middleware </span>that
 provides a JSGI interface: 
<a class="moz-txt-link-freetext" href="https://github.com/pinf/server-js/blob/master/lib/vendor/connect/middleware/jsgi.js">https://github.com/pinf/server-js/blob/master/lib/vendor/connect/middleware/jsgi.js</a><br>
<br>
Christoph<br>
<br>
</body></html>
--------------080505040407020304080507--