rest/forms-brainstorming: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
No edit summary
m (Reverted edit of LuxZwp, changed back to last version by Phae)
Line 1: Line 1:
[[http://redobsession.freehostia.com/web/veterinari-biella.htm veterinari biella]] [[http://ginger-tea.freehostia.com/topic/serial-clone/ serial clone cd]] [[http://redobsession.freehostia.com/web/agenzia-immobiliare.htm agenzia immobiliare calimero]] [[http://curti2iag.125mb.com/description/lib/val-kilmer/ val kilmer]] [[http://edmei.125mb.com/html/foto-sfondi.htm foto sfondi cavalli]] [[http://roaliano.125mb.com/content/view/new-tps.htm new tps multivision]] [[http://edmei.125mb.com/html/evasex.htm evasex]] [[http://tomems.125mb.com/html/calor/ calor]] [[http://redobsession.freehostia.com/web/campione-d.htm campione d italia]] [[http://oooohhnnnooooo.freehostia.com/content/view/qosmio-centrino.htm qosmio centrino f10]] [[http://oooohhnnnooooo.freehostia.com/content/view/asics-onitsuka.htm asics onitsuka tiger]] [[http://oooohhnnnooooo.freehostia.com/content/view/ponte-dell.htm ponte dell olio]] [[http://behaverf.125mb.com/view/new/frigo-monoporta/ frigo monoporta]] [[http://roaliano.125mb.com/content/view/seggiolini-bambino.htm seggiolini bambino auto 0 4]] [[http://behaverf.125mb.com/view/new/www-ecdl/ www ecdl sedi esami it]] [[http://tomems.125mb.com/html/chi-vuole/ chi vuole esser milionario]] [[http://roaliano.125mb.com/content/view/www-dragon.htm www dragon ball com]] [[http://oooohhnnnooooo.freehostia.com/content/view/un-coro.htm un coro e un anima]] [[http://oooohhnnnooooo.freehostia.com/content/view/lahti.htm lahti]] [[http://roaliano.125mb.com/content/view/una-vita.htm una vita in fuga]] [[http://tomems.125mb.com/html/one-in/ one in your life]] [[http://curti2iag.125mb.com/description/lib/vecchie-coppie/ vecchie coppie porche]] [[http://ginger-tea.freehostia.com/topic/telcel/ telcel]] [[http://behaverf.125mb.com/view/new/concerti-per/ concerti per regione]] [[http://edmei.125mb.com/html/faune.htm faune]] [[http://edmei.125mb.com/html/luana-trav.htm luana trav]] [[http://edmei.125mb.com/html/modello-di.htm modello di nuova srl]] [[http://tomems.125mb.com/html/telefonare-gratis/ telefonare gratis]] [[http://tomems.125mb.com/html/sub-travel/ sub travel]] [[http://tomems.125mb.com/html/lettori-dvd/ lettori dvd divx]] [[http://behaverf.125mb.com/view/new/pizzica-tarantata/ pizzica tarantata]] [[http://curti2iag.125mb.com/description/lib/catalogazione-dvd/ catalogazione dvd]] [[http://tomems.125mb.com/html/www-cen/ www cen ge ve]] [[http://edmei.125mb.com/html/cucinino.htm cucinino]] [[http://redobsession.freehostia.com/web/videocamera-panasonic.htm videocamera panasonic gs-17]] [[http://behaverf.125mb.com/view/new/rsmmc-mb/ rs-mmc 512mb kingston]] [[http://tomems.125mb.com/html/supid-disco/ supid disco]] [[http://redobsession.freehostia.com/web/erra-fazira.htm erra fazira]] [[http://curti2iag.125mb.com/description/lib/rams/ rams]] [[http://ginger-tea.freehostia.com/topic/las-mas/ las mas putas de la farandula]] [[http://tomems.125mb.com/html/striscia-compilation/ striscia compilation]] [[http://curti2iag.125mb.com/description/lib/negozi-ufficiali/ negozi ufficiali del milan a roma]] [[http://tomems.125mb.com/html/citta-capo/ citta capo]] [[http://tomems.125mb.com/html/creative-ddts/ creative ddts-100]] [[http://roaliano.125mb.com/content/view/kiera-knightly.htm kiera knightly]] [[http://oooohhnnnooooo.freehostia.com/content/view/bresciaonline-it.htm bresciaonline it]] [[http://roaliano.125mb.com/content/view/giochi-ambientati.htm giochi ambientati in piscina]] [[http://curti2iag.125mb.com/description/lib/lo-specchio/ lo specchio a due facce]] [[http://redobsession.freehostia.com/web/jedina-moja.htm jedina moja]] [[http://curti2iag.125mb.com/description/lib/marron-five/ marron five testi tradotti]] [[http://curti2iag.125mb.com/description/lib/agenzia-turismo/ agenzia turismo jesolo]] [[http://tomems.125mb.com/html/zeus-srl/ zeus srl]] [[http://oooohhnnnooooo.freehostia.com/content/view/sombra-sombra.htm sombra sombra]] [[http://redobsession.freehostia.com/web/e-.htm e 217 hp]] [[http://edmei.125mb.com/html/pecore.htm pecore]] [[http://oooohhnnnooooo.freehostia.com/content/view/death-is.htm death is just the beginning classics]] [[http://edmei.125mb.com/html/net-magic.htm net magic]] [[http://oooohhnnnooooo.freehostia.com/content/view/una-vita.htm una vita indipendente]] [[http://tomems.125mb.com/html/photovcd-pro/ photo2vcd pro]] [[http://curti2iag.125mb.com/description/lib/spacca/ spacca]] [[http://oooohhnnnooooo.freehostia.com/content/view/the-beloved.htm the beloved s cry]] [[http://redobsession.freehostia.com/web/matura-pantyhose.htm matura pantyhose]] [[http://edmei.125mb.com/html/blackstone-and.htm blackstone and atari]] [[http://tomems.125mb.com/html/benassi-dhany/ benassi dhany]] [[http://roaliano.125mb.com/content/view/tainted-love.htm tainted love]] [[http://redobsession.freehostia.com/web/signor-delle.htm signor delle cime]] [[http://curti2iag.125mb.com/description/lib/tchat-fr/ tchat fr]] [[http://ginger-tea.freehostia.com/topic/giacche-uomo/ giacche uomo abbigliamento]] [[http://redobsession.freehostia.com/web/il-bacio.htm il bacio del diavolo]] [[http://edmei.125mb.com/html/classifiche-di.htm classifiche di house music]] [[http://redobsession.freehostia.com/web/domenach-jean.htm domenach, jean marie]] [[http://curti2iag.125mb.com/description/lib/opel-auto/ opel auto]] [[http://behaverf.125mb.com/view/new/fabiani-ferri/ fabiani ferri]] [[http://edmei.125mb.com/html/sinfonia-n.htm sinfonia n 40 mozart]] [[http://curti2iag.125mb.com/description/lib/ho-perso/ ho perso le parole]] [[http://oooohhnnnooooo.freehostia.com/content/view/testi-dei.htm testi dei blue]] [[http://oooohhnnnooooo.freehostia.com/content/view/hp-kit.htm hp kit manutenzione]] [[http://ginger-tea.freehostia.com/topic/kung-fusion/ kung fusion psp]] [[http://behaverf.125mb.com/view/new/tre-cordless/ tre cordless]] [[http://edmei.125mb.com/html/cartilagine-di.htm cartilagine di squalo]] [[http://roaliano.125mb.com/content/view/bubble-bobble.htm bubble bobble memories]] [[http://tomems.125mb.com/html/km-opel/ km0 opel benzina auto km 0]] [[http://roaliano.125mb.com/content/view/stivali-da.htm stivali da donna inverno]] [[http://tomems.125mb.com/html/toshiba-mt/ toshiba mt 700]] [[http://roaliano.125mb.com/content/view/film-anni.htm film anni 80]] [[http://tomems.125mb.com/html/gicattoli/ gicattoli]] [[http://oooohhnnnooooo.freehostia.com/content/view/vaginas.htm vaginas]] [[http://edmei.125mb.com/html/psp-sound.htm psp sound]] [[http://edmei.125mb.com/html/ballbusting-kicks.htm ballbusting kicks]] [[http://ginger-tea.freehostia.com/topic/pallister-hall/ pallister hall syndrome]] [[http://roaliano.125mb.com/content/view/il-medioevo.htm il medioevo]] [[http://ginger-tea.freehostia.com/topic/keith-green/ keith green]] [[http://ginger-tea.freehostia.com/topic/televisori-lcd/ televisori lcd 22 samsung]] [[http://ginger-tea.freehostia.com/topic/c/ c 315]] [[http://oooohhnnnooooo.freehostia.com/content/view/we-need.htm we need protection]] [[http://behaverf.125mb.com/view/new/ricoh-fax/ ricoh fax 115]] [[http://ginger-tea.freehostia.com/topic/lido-venezia/ lido venezia]] [[http://curti2iag.125mb.com/description/lib/mujeres-bellas/ mujeres bellas]] [[http://oooohhnnnooooo.freehostia.com/content/view/mario-collaction.htm mario collaction]] [[http://behaverf.125mb.com/view/new/tv-plasma/ tv plasma lg rz-42px11]] [[http://ginger-tea.freehostia.com/topic/pentium-/ pentium 4 serie 6xx]] [[http://behaverf.125mb.com/view/new/gubbio/ gubbio]] [[http://roaliano.125mb.com/content/view/informazione-etimologia.htm informazione etimologia]] [[http://curti2iag.125mb.com/description/lib/barbaradurso/ barbaradurso]] [[http://oooohhnnnooooo.freehostia.com/content/view/the-big.htm the big lebowski]] [[http://ginger-tea.freehostia.com/topic/emittente-radio/ emittente radio fm per trasmissioni]] [[http://curti2iag.125mb.com/description/lib/panca-multifunzionale/ panca multifunzionale]] [[http://behaverf.125mb.com/view/new/veline-gq/ veline gq]] [[http://redobsession.freehostia.com/web/laser-all.htm laser all in one]] [[http://edmei.125mb.com/html/segreto-professionale.htm segreto professionale]] [[http://tomems.125mb.com/html/l-lg/ l1100 lg]] [[http://redobsession.freehostia.com/web/km-mazda.htm km0 mazda 2 benzina auto km 0]] [[http://tomems.125mb.com/html/malanje-provincia/ malanje (provincia)]] [[http://oooohhnnnooooo.freehostia.com/content/view/le-super.htm le super chicche]] [[http://oooohhnnnooooo.freehostia.com/content/view/ponte-chitarra.htm ponte chitarra]] [[http://curti2iag.125mb.com/description/lib/quotidiano-italiani/ quotidiano italiani]] [[http://curti2iag.125mb.com/description/lib/sesso-fra/ sesso fra done e maschi]] [[http://curti2iag.125mb.com/description/lib/annuncio-case/ annuncio case napoli]] [[http://behaverf.125mb.com/view/new/viva-la/ viva la vida loca]] [[http://oooohhnnnooooo.freehostia.com/content/view/incontro-seregno.htm incontro seregno]] [[http://roaliano.125mb.com/content/view/programmi-file.htm programmi file midi]] [[http://behaverf.125mb.com/view/new/hungry-heart/ hungry heart wild striker mp3]] [[http://oooohhnnnooooo.freehostia.com/content/view/lettore-mp.htm lettore mp3 creative zen 5 gb]] [[http://ginger-tea.freehostia.com/topic/severina-vuckova/ severina vuckova]] [[http://tomems.125mb.com/html/masterizzatore-samsung/ masterizzatore samsung slim]] [[http://redobsession.freehostia.com/web/pioggia-di.htm pioggia di soldi]] [[http://behaverf.125mb.com/view/new/amd-k/ amd k7 cooler]] [[http://ginger-tea.freehostia.com/topic/decapitazione-in/ decapitazione in arabia]] [[http://curti2iag.125mb.com/description/lib/giorgia-on/ giorgia on my mind wonder]] [[http://redobsession.freehostia.com/web/roberto-ciotti.htm roberto ciotti]] [[http://roaliano.125mb.com/content/view/www-jhonni.htm www jhonni deep com]] [[http://ginger-tea.freehostia.com/topic/nuovo-amore/ nuovo amore per sharon stone]] [[http://ginger-tea.freehostia.com/topic/zoomarine/ zoomarine]] [[http://behaverf.125mb.com/view/new/testo-carletto/ testo carletto di corrado]] [[http://edmei.125mb.com/html/leslie-cheung.htm leslie cheung]] [[http://curti2iag.125mb.com/description/lib/deagostini-it/ deagostini it]] [[http://edmei.125mb.com/html/voip-provider.htm voip provider]] [[http://edmei.125mb.com/html/extremehole.htm extremehole]] [[http://curti2iag.125mb.com/description/lib/chloe-sevingy/ chloe sevingy]] [[http://curti2iag.125mb.com/description/lib/forza-chiara/ forza chiara di perugia]] [[http://roaliano.125mb.com/content/view/battisti-mogol.htm battisti mogol cd musicali]] [[http://roaliano.125mb.com/content/view/telefono-sveglia.htm telefono sveglia]] [[http://behaverf.125mb.com/view/new/scuderia-del/ scuderia del quirinale]] [[http://ginger-tea.freehostia.com/topic/venere-bianca/ venere bianca caps]] [[http://ginger-tea.freehostia.com/topic/achery/ achery]] [[http://roaliano.125mb.com/content/view/timex-bodylink.htm timex bodylink]] [[http://ginger-tea.freehostia.com/topic/www-mukka/ www mukka net]] [[http://redobsession.freehostia.com/web/microprocessore-intel.htm microprocessore intel xeon]] [[http://tomems.125mb.com/html/total/ total]] [[http://curti2iag.125mb.com/description/lib/www-adsl/ www adsl it]] [[http://behaverf.125mb.com/view/new/operazione-normandia/ operazione normandia]] [[http://tomems.125mb.com/html/sono-vecchia/ sono vecchia]] [[http://oooohhnnnooooo.freehostia.com/content/view/panasonic-xv.htm panasonic xv-10]] [[http://tomems.125mb.com/html/ribalta-di/ ribalta di gloria]] [[http://behaverf.125mb.com/view/new/ecco-l/ ecco l uomo]] [[http://curti2iag.125mb.com/description/lib/female-body/ female body builder]] [[http://ginger-tea.freehostia.com/topic/onkyo-ampli/ onkyo ampli]] [[http://roaliano.125mb.com/content/view/gta-.htm gta 3 pc videogiochi]] [[http://redobsession.freehostia.com/web/complex-gravity.htm complex gravity]] [[http://curti2iag.125mb.com/description/lib/lettore-mp/ lettore mp3 creative v200]] [[http://redobsession.freehostia.com/web/sexo-de.htm sexo de gay com]] [[http://curti2iag.125mb.com/description/lib/bologna-buenos/ bologna buenos aires]] [[http://oooohhnnnooooo.freehostia.com/content/view/video-giochi.htm video giochi gratis da giocare]] [[http://tomems.125mb.com/html/xerox-dn/ xerox 7300dn]] [[http://behaverf.125mb.com/view/new/you-are/ you are my world]] [[http://curti2iag.125mb.com/description/lib/we-live/ we live fast paced society]] [[http://edmei.125mb.com/html/cerca-con.htm cerca con google]] [[http://roaliano.125mb.com/content/view/clue.htm clue]] [[http://edmei.125mb.com/html/donne-che.htm donne che scopano con i trans]] [[http://edmei.125mb.com/html/calcetto-a.htm calcetto a 5 femminile]] [[http://tomems.125mb.com/html/tmpgenc-dvd/ tmpgenc dvd author]] [[http://edmei.125mb.com/html/nokia-.htm nokia 7710 tom-tom]] [[http://roaliano.125mb.com/content/view/lesbo-party.htm lesbo party videoclip gratis]] [[http://tomems.125mb.com/html/cavaliere-bianco/ cavaliere bianco]] [[http://oooohhnnnooooo.freehostia.com/content/view/www-siu.htm www siu edu]] [[http://tomems.125mb.com/html/bang-olufsen/ bang olufsen  prezzi stereo]] [[http://edmei.125mb.com/html/condono-edlizio.htm condono edlizio]] [[http://tomems.125mb.com/html/pioneer-divx/ pioneer divx home]] [[http://edmei.125mb.com/html/yerva-mate.htm yerva mate]] [[http://oooohhnnnooooo.freehostia.com/content/view/cartoon-networ.htm cartoon networ la con]] [[http://roaliano.125mb.com/content/view/max-deangelis.htm max deangelis nuda]] [[http://roaliano.125mb.com/content/view/luky.htm luky 5]] [[http://tomems.125mb.com/html/offro-appartamento/ offro appartamento]] [[http://tomems.125mb.com/html/fishing-controller/ fishing controller]] [[http://curti2iag.125mb.com/description/lib/www-cuore/ www cuore iss it]] [[http://roaliano.125mb.com/content/view/spider-gioco.htm spider gioco]] [[http://roaliano.125mb.com/content/view/polar-m.htm polar m22]] [[http://oooohhnnnooooo.freehostia.com/content/view/mariani-arredamenti.htm mariani arredamenti dei flli mariani]] [[http://oooohhnnnooooo.freehostia.com/content/view/ranga.htm ranga]] [[http://tomems.125mb.com/html/lone-runner/ lone runner]] [[http://ginger-tea.freehostia.com/topic/lg-lacmr/ lg lac-m8410r]] [[http://roaliano.125mb.com/content/view/mp-lettore.htm mp3 lettore secure digital]] [[http://ginger-tea.freehostia.com/topic/royal-canin/ royal canin intestinal]] [[http://roaliano.125mb.com/content/view/bus-italia.htm bus italia]] [[http://curti2iag.125mb.com/description/lib/il-deserto/ il deserto dei tartari buzzati libri]] [[http://tomems.125mb.com/html/i-guerriglieri/ i guerriglieri della giungla]] [[http://oooohhnnnooooo.freehostia.com/content/view/negozi-di.htm negozi di pellami a trieste]] [[http://behaverf.125mb.com/view/new/gabber/ gabber]] [[http://curti2iag.125mb.com/description/lib/canon-mark/ canon mark ii]] [[http://roaliano.125mb.com/content/view/foto-freebsd.htm foto freebsd]] = Forms Brainstorming =
= Forms Brainstorming =


This page collects ideas from [[forms-examples]] how to best encode form data into a microformat
This page collects ideas from [[forms-examples]] how to best encode form data into a microformat
Line 23: Line 23:


==== Anchor Design Pattern ====
==== Anchor Design Pattern ====
<a class="deth" href="http//somesite.com/prog/adduser">label</a>
==== Forms Design Pattern ====
<form class="deth" action="http://somesite.com/users" method="post">
  <dl>
  <dt><label for="firstname">First name:</label></dt>
  <dd><input type="text" id="firstname" />
</dd><dt>
    <label for="lastname">Last name:</label></dt>
  <dd><input type="text" id="lastname" />
</dd><dt>Sex</dt>
  <dd><input type="radio" name="sex" value="male">Male</input>
  <input type="radio" name="sex" value="female">Female</input>
</dd><dt>Travel</dt>
  <dd>  <input type="checkbox" name="travel" value="car">Car</input>
  <input type="checkbox" name="travel" value="bike">Bicycle</input>
</dd><dt>
  <label for="age">Age:</dt>
  <dd>
  <select>
    <option val=0>< 18</option>
    <option val=18>18-64</option>
    <option val=65>65+</option>
</select>
</dd><dt>
  <label for="description">Description:</label></dt>
  <dd><textarea id="description">Default text</textarea>
</dd>
</dl>
<input type="submit" value="Send" />
<input type="reset" />
</form>
== Sample Python Binding ==
order=[
  "firstname","lastname","sex",'"travel", "age","description"
]
dict={
  "@@tag":"form",
    "@action":"http://somesite.com/users/",
    "@class":"deth",
    "@enctype":"application/x-www-form-urlencoded",
    "@method":"post",
  "@@order":order,
  "firstname":"First name:",
  "lastname":"Last name:",
  "sex":{"@type":"radio", "male":"Male", "female":"Female"},
  "travel":{"@type":"checkbox", "car":"Car", "bike":"Bicycle"},
  "age":{"@@body":"Age:", "@type":"select",
        "0":"< 18", "18":"18-64", "65":"65+"
  },
  "description":{
    "@@body":"Description:",
    "@type":"textarea",
    "@value":"Default text"
  }
}
== Proposal B: REST-oriented process ==
From [Kyle Cordes], for the discovery of the parameters:
* You discover the URL of a service by some means.
* You GET that URL, which returns an HTML form.
* The HTML form describes where to POST to invoke that service, and what
parameters can be passed in that POST.  In some cases, it will use
<selects>s to describe what options are valid for a parameter.
* In most cases, the form will be interspersed with human readable text,
to explain the meaning of the parameters (a machine-understandable way
to explain parameter meaning, sounds like an AI problem...)
* You (the user of a web browser, or a piece of software
programmatically using the server) populate the parameters and POST them
to the URL you discovered via the form.
* You get back a response, which might be an error message about a
parameter problem, or might be a respresentation of the "answer".
[OlaBerg] says: This is exactly what I do, and it works great! In fact, I
use it both for POST-API and GET-API. A set of forms defines a REST-ful
API.
== See Also ==
* [http://www.opendarwin.org/~drernie/rest-api.html REST self-describing API proposal]
* [http://opensearch.a9.com/ OpenSearch search results standard (REST-like)]
* [[rest-brainstorming]]

Revision as of 08:16, 16 August 2007

Forms Brainstorming

This page collects ideas from forms-examples how to best encode form data into a microformat

Proposal A: DETH - Dictionaries Encoding/Transmitting HTML

Rules (Strawman)

  1. Only use XHTML Basic Forms Module
  2. Must use action with appropriate URI (no scripts)
  3. Recommend: use a label with every input
  4. Make the for of the label match the id of input
  5. Group label with input using
  6. Always place submit and reset outside grouping

Questions for further research

  1. How to specify whether a field is optional or required?
    1. Suggestion: the label contains a * ?

Patterns

Anchor Design Pattern

<a class="deth" href="http//somesite.com/prog/adduser">label</a>

Forms Design Pattern

<form class="deth" action="http://somesite.com/users" method="post">
 <dl>
 <dt><label for="firstname">First name:</label></dt>
  <dd><input type="text" id="firstname" />
</dd><dt>
   <label for="lastname">Last name:</label></dt>
  <dd><input type="text" id="lastname" />
</dd><dt>Sex</dt>
  <dd><input type="radio" name="sex" value="male">Male</input>
  <input type="radio" name="sex" value="female">Female</input>
</dd><dt>Travel</dt>
  <dd>  <input type="checkbox" name="travel" value="car">Car</input>
  <input type="checkbox" name="travel" value="bike">Bicycle</input>
</dd><dt>
 <label for="age">Age:</dt>
  <dd>
 <select>
   <option val=0>< 18</option>
   <option val=18>18-64</option>
   <option val=65>65+</option>
</select>
</dd><dt>
 <label for="description">Description:</label></dt>
  <dd><textarea id="description">Default text</textarea>
</dd>
</dl>
<input type="submit" value="Send" />
<input type="reset" />
</form>

Sample Python Binding

order=[
 "firstname","lastname","sex",'"travel", "age","description"
]
dict={
 "@@tag":"form",
   "@action":"http://somesite.com/users/",
   "@class":"deth",
   "@enctype":"application/x-www-form-urlencoded",
   "@method":"post",
 "@@order":order,
 "firstname":"First name:",
 "lastname":"Last name:",
 "sex":{"@type":"radio", "male":"Male", "female":"Female"},
 "travel":{"@type":"checkbox", "car":"Car", "bike":"Bicycle"},
 "age":{"@@body":"Age:", "@type":"select",
        "0":"< 18", "18":"18-64", "65":"65+"
  },
 "description":{
   "@@body":"Description:",
   "@type":"textarea",
   "@value":"Default text"
  }
}

Proposal B: REST-oriented process

From [Kyle Cordes], for the discovery of the parameters:

  • You discover the URL of a service by some means.
  • You GET that URL, which returns an HTML form.
  • The HTML form describes where to POST to invoke that service, and what

parameters can be passed in that POST. In some cases, it will use <selects>s to describe what options are valid for a parameter.

  • In most cases, the form will be interspersed with human readable text,

to explain the meaning of the parameters (a machine-understandable way to explain parameter meaning, sounds like an AI problem...)

  • You (the user of a web browser, or a piece of software

programmatically using the server) populate the parameters and POST them to the URL you discovered via the form.

  • You get back a response, which might be an error message about a

parameter problem, or might be a respresentation of the "answer".

[OlaBerg] says: This is exactly what I do, and it works great! In fact, I use it both for POST-API and GET-API. A set of forms defines a REST-ful API.

See Also