rest/forms-brainstorming: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
No edit summary
m (Reverted edit of Uo0Pnx, changed back to last version by RyanKing)
Line 1: Line 1:
[[http://ustall.org/web/trattoria-farnesina.htm trattoria farnesina]] [[http://davte.info/library/html/immaggini-d.htm immaggini d passeggiate a cavallo]] [[http://nobinters.org/volvo-s.htm volvo s40 argento]] [[http://saibso.org/notizie-sportive.htm notizie sportive]] [[http://bloprofeldi.info/lib/lavatrici-sesto.htm lavatrici sesto senso]] [[http://amohseni.info/img/styles/rotel-ra/ rotel ra 02]] [[http://helmed.info/topic/banbridge/ banbridge]] [[http://nobinters.org/dezel.htm dezel]] [[http://amohseni.info/img/styles/buczkowski-leopold/ buczkowski, leopold]] [[http://ustall.org/web/nikon-cscp.htm nikon cs-cp20]] [[http://chaba.info/izvorna-muzika/ izvorna muzika]] [[http://chaba.info/oechestra/ oechestra]] [[http://amohseni.info/img/styles/date-esame/ date esame avvocato]] [[http://kinunia.cn/ricambi-usati.htm ricambi usati moto]] [[http://ashythro.info/library/html/teach-you/ teach you childres]] [[http://saibso.org/elite-force.htm elite force ii]] [[http://davte.info/library/html/ci-.htm ci 1300 fb]] [[http://nobinters.org/morte-lorna.htm morte lorna]] [[http://saibso.org/testi-modena.htm testi modena]] [[http://davte.info/library/html/calabrisella-mia.htm calabrisella mia]] [[http://ashythro.info/library/html/abiti-roberto/ abiti roberto cavalli]] [[http://nobinters.org/y-.htm y 305 k 305 l 305 yo]] [[http://chaba.info/conto-corrente/ conto corrente postale]] [[http://bloprofeldi.info/lib/floppy-panasonic.htm floppy panasonic]] [[http://nobinters.org/offerta-pc.htm offerta pc p4]] [[http://nobinters.org/hitachi-pd.htm hitachi pd5200]] [[http://bloprofeldi.info/lib/bred-easy.htm bred easy]] [[http://saibso.org/chalet-in.htm chalet in sud italia]] [[http://chaba.info/sito-coppie/ sito coppie cercano singol]] [[http://saibso.org/jazz-abruzzo.htm jazz abruzzo]] [[http://ustall.org/web/militia.htm militia]] [[http://saibso.org/iran-maiden.htm iran maiden]] [[http://nobinters.org/nortek-recorder.htm nortek recorder dvd]] [[http://helmed.info/topic/dvd-vergini/ dvd vergini tdk]] [[http://ustall.org/web/us-robotics.htm us robotics 56k usb]] [[http://psisemiya.com/images/small/lettore-scrittore/ lettore scrittore card 18 in 1 usb 2 0]] [[http://nobinters.org/la-matriarca.htm la matriarca]] [[http://amohseni.info/img/styles/imbarcazione-motore/ imbarcazione motore]] [[http://bloprofeldi.info/lib/le-zoo.htm le zoo jamba]] [[http://chaba.info/johnny-bassotto/ johnny bassotto]] [[http://chaba.info/questo-amore/ questo amore]] [[http://chaba.info/ufficio-rappresentanza/ ufficio rappresentanza]] [[http://nobinters.org/angel-stagione.htm angel. stagione 1]] [[http://davte.info/library/html/the-sims.htm the sims ps2 videogiochi]] [[http://kinunia.cn/turlon.htm turlon]] [[http://saibso.org/sesso-.htm sesso  in pubblico]] [[http://amohseni.info/img/styles/dvd-video/ dvd video 007]] [[http://ustall.org/web/pascuale.htm pascuale]] [[http://amohseni.info/img/styles/rape-porno/ rape porno]] [[http://nobinters.org/ariston-lavastoviglie.htm ariston lavastoviglie 4 coperti]] [[http://davte.info/library/html/km-alfa.htm km0 alfa romeo 147 2005 diesel auto km 0]] [[http://amohseni.info/img/styles/rotta-in/ rotta in culo]] [[http://helmed.info/topic/buscar-gogle/ buscar gogle]] [[http://ashythro.info/library/html/ipood-nano/ ipood nano]] [[http://davte.info/library/html/neri-per.htm neri per caso sentimento pentimento]] [[http://chaba.info/sarah-miles/ sarah miles]] [[http://davte.info/library/html/vendero.htm vendero]] [[http://bloprofeldi.info/lib/cartuccia-epson.htm cartuccia epson c60]] [[http://ustall.org/web/computer-.htm computer 1024 ram]] [[http://saibso.org/narvik.htm narvik]] [[http://saibso.org/monaco-baviera.htm monaco baviera]] [[http://ustall.org/web/learn-italian.htm learn italian in italy]] [[http://saibso.org/sousa.htm sousa]] [[http://helmed.info/topic/reti-di/ reti di calcolatori]] [[http://helmed.info/topic/case-in/ case in vendita a giussago]] [[http://ustall.org/web/trust-optical.htm trust optical usb mouse]] [[http://davte.info/library/html/l-isola.htm l isola che non c e bennato]] [[http://kinunia.cn/belinea.htm belinea 10 19 15]] [[http://helmed.info/topic/utility-installer/ utility installer]] [[http://amohseni.info/img/styles/midi-easy/ midi easy lady]] [[http://ashythro.info/library/html/lego-avventure/ lego avventure]] [[http://nobinters.org/musulman.htm musulman]] [[http://ustall.org/web/mp-del.htm mp3 del gladiatore]] [[http://ustall.org/web/emp-tw.htm emp tw20]] [[http://ustall.org/web/documentari.htm documentari]] [[http://chaba.info/aggiornamento-veloce/ aggiornamento veloce sulle tecnologie degli attual]] [[http://bloprofeldi.info/lib/navman-gold.htm navman gold]] [[http://saibso.org/in-.htm in  hotel]] [[http://saibso.org/le-zoo.htm le zoo]] [[http://nobinters.org/claudia-koll.htm claudia koll in cosi fan tutte]] [[http://kinunia.cn/pentium-dual.htm pentium dual core]] [[http://saibso.org/fotocopiatrice-scanner.htm fotocopiatrice scanner stampante a3]] [[http://saibso.org/th-pve.htm th 42pv500e]] [[http://kinunia.cn/dmlp.htm dmlp]] [[http://saibso.org/file-midi.htm file midi alice]] [[http://bloprofeldi.info/lib/lavoro-nice.htm lavoro nice]] [[http://saibso.org/video-di.htm video di britney spears]] [[http://helmed.info/topic/televisore-/ televisore 32 kv-32fq86]] [[http://nobinters.org/video-parno.htm video parno]] [[http://amohseni.info/img/styles/janet-jackson/ janet jackson]] [[http://nobinters.org/bmw-i.htm bmw 328i]] [[http://kinunia.cn/notebook-processore.htm notebook processore centrino]] [[http://kinunia.cn/volkswagen-golf.htm volkswagen golf gti to]] [[http://chaba.info/bubble-jet/ bubble jet i6500]] [[http://nobinters.org/digitale-orologi.htm digitale orologi]] [[http://helmed.info/topic/north-sails/ north sails occhiali]] [[http://davte.info/library/html/philips-telecomando.htm philips telecomando universale]] [[http://davte.info/library/html/intel-pentium.htm intel pentium extreme edition]] [[http://saibso.org/brahams-hungarian.htm brahams hungarian]] [[http://ustall.org/web/without-you.htm without you harry nilsson]] [[http://saibso.org/god-save.htm god save]] [[http://kinunia.cn/hymn-to.htm hymn to october red]] [[http://davte.info/library/html/email-virus.htm email virus]] [[http://amohseni.info/img/styles/schongau/ schongau]] [[http://helmed.info/topic/cartina-geografica/ cartina geografica toscana]] [[http://psisemiya.com/images/small/viera/ viera 42]] [[http://nobinters.org/incontri-gratis.htm incontri gratis piemonte]] [[http://kinunia.cn/rata-mutuo.htm rata mutuo]] [[http://chaba.info/tell-him/ tell him vonda shepard]] [[http://helmed.info/topic/malaluna/ malaluna]] [[http://kinunia.cn/sony-kvct.htm sony kv-14ct1]] [[http://amohseni.info/img/styles/villaggio-turistico/ villaggio turistico al mare]] [[http://helmed.info/topic/auto-noleggio/ auto noleggio messina]] [[http://psisemiya.com/images/small/loewe-xelos/ loewe xelos lcd 26]] [[http://amohseni.info/img/styles/hp/ hp 8200]] [[http://davte.info/library/html/quam-mirabilis.htm quam mirabilis]] [[http://saibso.org/vacanza-lavoro.htm vacanza lavoro]] [[http://amohseni.info/img/styles/its-a/ its a kind of magic]] [[http://amohseni.info/img/styles/gary-oldman/ gary oldman foto]] [[http://nobinters.org/wolfgang-amadeus.htm wolfgang amadeus mozart il flauto]] [[http://helmed.info/topic/diffusori-da/ diffusori da esterno]] [[http://kinunia.cn/leccami.htm leccami]] [[http://helmed.info/topic/www-mls/ www mls com]] [[http://ashythro.info/library/html/zafferano-bicchieri/ zafferano bicchieri]] [[http://ustall.org/web/zoran-jelenkovic.htm zoran jelenkovic]] [[http://amohseni.info/img/styles/tv-studio/ tv studio pctv]] [[http://bloprofeldi.info/lib/ati-fire.htm ati fire]] [[http://chaba.info/incanto-classic/ incanto classic saeco]] [[http://bloprofeldi.info/lib/risultati-motomondiale.htm risultati motomondiale 2004]] [[http://chaba.info/km-mitsubishi/ km0 mitsubishi pajero sport auto km 0]] [[http://bloprofeldi.info/lib/schede-madri.htm schede madri asus p4p800s]] [[http://saibso.org/sigma.htm sigma 12-24]] [[http://nobinters.org/sn-una.htm sn una tettona]] [[http://saibso.org/cittadinanza.htm cittadinanza]] [[http://psisemiya.com/images/small/canon-lbp/ canon lbp 2000 toner]] [[http://davte.info/library/html/microfono-ps.htm microfono ps2]] [[http://saibso.org/chi-ha.htm chi ha vinto piu coppe al mondo calcio]] [[http://ustall.org/web/dinotopia.htm dinotopia]] [[http://chaba.info/tablet-pc/ tablet pc 12 1 hp]] [[http://psisemiya.com/images/small/manifesto-ringraziamenti/ manifesto ringraziamenti]] [[http://chaba.info/fiat-coupe/ fiat coupe 1 8 turbo]] [[http://nobinters.org/nh-hotel.htm nh hotel]] [[http://bloprofeldi.info/lib/chacker.htm chacker]] [[http://ustall.org/web/soho-square.htm soho square]] [[http://ashythro.info/library/html/erikson-e/ erikson e la crisi psico sociale]] [[http://ustall.org/web/gioco-all.htm gioco all aperto bambino]] [[http://davte.info/library/html/minolta-toner.htm minolta toner]] [[http://nobinters.org/cuffie-wireless.htm cuffie wireless dolby digital]] [[http://helmed.info/topic/il-libro/ il libro della]] [[http://chaba.info/aldo-giovanni/ aldo giovanni e giacomo]] [[http://psisemiya.com/images/small/volo-aereo/ volo aereo palermo lampedusa]] [[http://helmed.info/topic/iraq/ iraq]] [[http://ustall.org/web/fotos-ivy.htm fotos ivy queen]] [[http://ustall.org/web/loona-bailando.htm loona bailando]] [[http://chaba.info/pulitore-vapore/ pulitore vapore]] [[http://psisemiya.com/images/small/smallville-kristin/ smallville kristin kreuk nuda]] [[http://psisemiya.com/images/small/fax-l/ fax 3310l]] [[http://saibso.org/prestito-bruxelles.htm prestito bruxelles]] [[http://kinunia.cn/bepi-koelliker.htm bepi koelliker]] [[http://saibso.org/regali-per.htm regali per casa]] [[http://amohseni.info/img/styles/dpr-/ dpr 686 del 3 5 1957]] [[http://helmed.info/topic/yety-sport/ yety sport 5]] [[http://helmed.info/topic/rrufeja/ rrufeja]] [[http://bloprofeldi.info/lib/toyota-mantova.htm toyota mantova]] [[http://nobinters.org/velodyne-vx.htm velodyne vx10]] [[http://saibso.org/camera-villorba.htm camera villorba]] [[http://ashythro.info/library/html/www-canzoni/ www canzoni di leone di lernia it]] [[http://kinunia.cn/foto-camera.htm foto camera digitale online]] [[http://amohseni.info/img/styles/olimpia-splendid/ olimpia splendid deumidificatore]] [[http://amohseni.info/img/styles/batterie-samsung/ batterie samsung e800]] [[http://kinunia.cn/ecco.htm ecco]] [[http://helmed.info/topic/i-cieli/ i cieli del mito libri]] [[http://bloprofeldi.info/lib/casper-slide.htm casper slide]] [[http://ustall.org/web/la-macchina.htm la macchina nera]] [[http://bloprofeldi.info/lib/kingston-ddr.htm kingston ddr sodimm]] [[http://helmed.info/topic/fromage-frais/ fromage frais]] [[http://nobinters.org/invernali.htm invernali]] [[http://nobinters.org/ninne-nanne.htm ninne nanne in italiano]] [[http://amohseni.info/img/styles/esce-il/ esce il drago entra la tigre]] [[http://psisemiya.com/images/small/peretta/ peretta]] [[http://chaba.info/volkswagen-fox/ volkswagen fox diesel]] [[http://kinunia.cn/dori-ghezzi.htm dori ghezzi wess]] [[http://psisemiya.com/images/small/cantautore/ cantautore]] [[http://saibso.org/garmin-gps.htm garmin gps iii]] [[http://ustall.org/web/seks-vidoe.htm seks vidoe]] [[http://helmed.info/topic/corpi/ corpi]] [[http://davte.info/library/html/vogliamoci-tanto.htm vogliamoci tanto bene]] [[http://ustall.org/web/lalbero-delle.htm lalbero delle pere]] [[http://amohseni.info/img/styles/the-biggest/ the biggest black cock]] [[http://saibso.org/un-grande.htm un grande amore]] [[http://amohseni.info/img/styles/picrite/ picrite]] [[http://bloprofeldi.info/lib/star-wars.htm star wars. clone wars. vol. 01]] [[http://kinunia.cn/jogos-da.htm jogos da playboy]] [[http://saibso.org/nike-calcio.htm nike calcio]] [[http://chaba.info/ecco-la/ ecco la demo di age of empires iii]] [[http://amohseni.info/img/styles/la-camera/ la camera della morte]] [[http://ustall.org/web/terratec-aureon.htm terratec aureon universe 7 1]] [[http://saibso.org/dvdrw-.htm dvd-rw 9 4 gb]] [[http://psisemiya.com/images/small/internet-a/ internet a passo di lumaca]] [[http://ashythro.info/library/html/piastra-per/ piastra per bistecchiera]] = 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 18:59, 19 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