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 Real POST/GET

 Nitrogen Web Framework for Erlang" <nitrogenweb@googlegroups.com>
Received: by 10.213.121.129 with SMTP id h1mr3043607ebr.4.1336432594576;
        Mon, 07 May 2012 16:16:34 -0700 (PDT)
X-BeenThere: nitrogenweb@googlegroups.com
Received: by 10.213.109.153 with SMTP id j25ls259290ebp.5.gmail; Mon, 07 May
 2012 16:16:33 -0700 (PDT)
Received: by 10.213.152.1 with SMTP id e1mr3042331ebw.9.1336432593638;
        Mon, 07 May 2012 16:16:33 -0700 (PDT)
Received: by 10.213.152.1 with SMTP id e1mr3042330ebw.9.1336432593620;
        Mon, 07 May 2012 16:16:33 -0700 (PDT)
Return-Path: <sigmas...@gmail.com>
Received: from mail-ey0-f177.google.com (mail-ey0-f177.google.com [209.85.215.177])
        by gmr-mx.google.com with ESMTPS id u54si4139848eeb.2.2012.05.07.16.16.33
        (version=TLSv1/SSLv3 cipher=OTHER);
        Mon, 07 May 2012 16:16:33 -0700 (PDT)
Received-SPF: pass (google.com: domain of sigmas...@gmail.com designates 209.85.215.177 as permitted sender) client-ip=209.85.215.177;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of sigmas...@gmail.com designates 209.85.215.177 as permitted sender) smtp.mail=sigmas...@gmail.com; dkim=pass header...@gmail.com
Received: by eaak13 with SMTP id k13so1766461eaa.22
        for <nitrogenweb@googlegroups.com>; Mon, 07 May 2012 16:16:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:in-reply-to:references:from:date
         :x-google-sender-auth:message-id:subject:to:content-type
         :content-transfer-encoding;
        bh=Ee1ke4z+cDdG92HA0ajh7shZKX2FQZNisyOwwlRNegk=;
        b=LbMpQjO44sZkY/cK9TB1fwPtfsgcE8dNP1LIt79NQOVBbO+u4KAmb3ekwR4eDjxZHK
         ixGKc3HB1/Zt5+prTxCM44FSPd0r9Zc9v+KW3qvqDSE1Z4DAF5Ip/WSGK9EL0hPt84Ye
         dRNbeN8FJtC8FUZaBHsiT/gjd4VSXmY9y1McSMn0UNT7g/EHljSDser84ObCUMPc3tsK
         80cm1Q3ZguZbZjf5GUzkyCLDuUoRL/lHApboOPdTzM6IsQZ1B9nSZ7CT3M9CGp1Y8iz9
         Y+xAhBIeX+1WzWJNUKXVcs/wtEFwDe5VcGS+1cWX5Kl4bfO8Upi4jHdsGsWeclRriNbi
         T9Cw==
Received: by 10.213.28.208 with SMTP id n16mr3090747ebc.106.1336432593427;
 Mon, 07 May 2012 16:16:33 -0700 (PDT)
MIME-Version: 1.0
Sender: sigmas...@gmail.com
Received: by 10.213.103.204 with HTTP; Mon, 7 May 2012 16:16:13 -0700 (PDT)
In-Reply-To: <CAPTXyXebiJj8_FBx=OcT8c__OFL3+3EnR84UtCjsVV2of1L...@mail.gmail.com>
References: <CAOP+2N60wc4HcSOkSLvcmuyT1Jkssmgnf4Cy6WqHbRyDyOh...@mail.gmail.com>
 <CAPTXyXebiJj8_FBx=OcT8c__OFL3+3EnR84UtCjsVV2of1L...@mail.gmail.com>
From: Jesse Gumm <g...@sigma-star.com>
Date: Mon, 7 May 2012 18:16:13 -0500
Message-ID: <CAPTXyXdoQiBjkdh+FY8CceZj4KqyAGZdo8ipEPgN-Jgihwq...@mail.gmail.com>
Subject: Re: Real POST/GET
To: nitrogenweb@googlegroups.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

As far as what I think should be added for adding restful elements:

1) I'm undecided on the idea naming: #rest_form{}, #html_form{},
#form{} ?  (I don't think I like #form{} despite it's succinctness,
just due to the implication of the others that this is indeed a normal
restful form, and not some special nitrogen construct.

2) #rest_submit{}, #html_submit{}l, #submit{}? (same arguments apply
above, though I'm less apprehensive about #submit{} as I am for
#form{}).  Convince me :)

3) Either modifying #textbox, #password, etc to have either the
nitrogen id be emitted as the html name attribute, or add a 'name'
attribute to these elements.  The latter, however, will begin to make
the naming of elements in nitrogen RATHER convoluted, since there will
be 'id' (the nitrogen ID), 'html_id' (the HTML ID), and then 'name'
(the name html attribute for forms).  I think I prefer having the
nitrogen ID being emitted as the name of the form, but then the
inconsistency of having the HTML id being separated while the 'name'
not separated does not sit too well with me.  I'll give this some
thought.

4) Validation: The validation is currently set to work with postbacks
and javascript, and not with standard submission.  Reworking the
validation wiring would take some work.  Something to consider.

So those are some thoughts that run through my head with this
proposal.  I'm curious to hear what you and/or others would think
about this.

-Jesse

On Mon, May 7, 2012 at 6:06 PM, Jesse Gumm <g...@sigma-star.com> wrote:
> Hi Steffen,
>
> As you've noted, Nitrogen is very much a javascript heavy framework,
> but it is possible to operate a bit RESTfully. =A0wf:q/1 does retrieve
> both POST and GET variables.
>
> I can see the value in adding elements like a #rest_form, and
> #rest_submit which would work like the related <form> and <input
> type=3Dsubmit> html elements.
>
> As for the reason they haven't been added? It just hasn't been. =A0I
> haven't found a dire need in my operations, and obviously Rusty didn't
> find it critical, so it just never happened. =A0But if you wanted to
> implement some restful elements, I certainly encourage it and will be
> happy to bring in a pull request for it.
>
> As for adding a real id attribute to the elements, this is something
> that will be merged in soon, though it needs a bit of testing to
> ensure nothing is majorly broken as a result of it. There's a pending
> pull request for adding an html_id attribute to the elements
> (https://github.com/nitrogen/nitrogen_core/pull/17), I just haven't
> had a chance to get to testing it before bringing it in.
>
> -Jesse
>
> On Mon, May 7, 2012 at 3:02 PM, Steffen Panning
> <steffen.pann...@googlemail.com> wrote:
>> Hi folks,
>>
>> I like this framework but I need something that is not supported on purp=
ose.
>> At least this is how it looks like.
>>
>> I need a real form element and a real post or get.
>> I have a reason for that: I think the basic operations on a
>> website should work without javascript. The javascript is for the fancy =
stuff.
>> Look at google search. You can still use it without javascript.
>> If you have javascript activated it is way more comfortable,
>> but if not it still works.
>>
>> So here is my question:
>> * Is there a good reason not to apply a 'real' id attribute to the
>> input elements?
>> * Is there a good reason not to add a form element?
>> * Is there a good reason not to add a real 'submit button'?
>>
>> I think these extensions are added quite easily,
>> but I wonder if such a change has a
>> chance to make it into the main branch.
>>
>> Thanks for suggestions
>>
>> Steffen
>>
>> --
>> You received this message because you are subscribed to the Google Group=
s "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
>> To post to this group, send email to nitrogenweb@googlegroups.com.
>> To unsubscribe from this group, send email to nitrogenweb+unsubscribe@go=
oglegroups.com.
>> For more options, visit this group at http://groups.google.com/group/nit=
rogenweb?hl=3Den.
>>
>
>
>
> --
> Jesse Gumm
> Owner, Sigma Star Systems
> 414.940.4866=A0|| sigma-star.com || @jessegumm



--=20
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm