RE: [whatwg] Proposing URI Templates for WebForms 2.0

Mark;

Mark>> I didn't see any use cases in the original e-mail; did I miss
something? An example or two tends to focus discussion well...

Example use-cases? You want example use-cases? Happy to oblige. :-) 

But first let me ask you think in terms of the context where people can put
HTML put can't put Javascript such as in some hosting blogging platforms and
on forums. Also think in terms of websites being able to say "post this code
into your blog, etc." 

1.) I'm (hypothetically) the owner of atllogos.com and I want on provide an
HTML for to let visitors select from a drop-down to be able to visit the
Twitter users listed on http://atllogos.com/startup.html (Note that
"template" is a new attribute that is used for templates when no "action" is
specified):

See these people on Twitter:
<form method="get" template="http://twitter.com/{name}">
<select id="name">
<option>sanjay</option>
<option>lance</option>
<option>stephenfleming</option>
<option>keithmcgreggor</option>
<option>melaniebrandt</option>
<option>jhaynie</option>
<option>MikeSchinkel</option>
<option>coty</option>
<option>wei_yang</option>
<option>mmealling</option>
<option>pfreet</option> 
</select>
<input type="submit" value="Go!">
</form>

2.) I'm writing a blog post on WordPress.com where I am advocating that
people living in Georgia find and join a meetup group so I give them a form
with a drop-down that allows them to select their city:

Select your state:
<form method="get" template="http://www.meetup.com/cities/us/ga/{city}/">
<select id="city">
<option value="acworth">Acworth</option>
<option value="albany">Albany</option>
<!-- ... -->
<option value="warner_robins">Warner Robins</option>
<option value="woodstock">Woodstock</option>
</select>
<input type="submit" value="Find a Meetup Group in Georgia!">
</form>

3.) I am writing a blog post on Blogger.com about "Ride to Work Day" where I
am advocating people in the USA ride their motorcycle to work and I want to
include a form that let's them type in their ZIP code and check there
weather:

<form method="get" template="http://www.weather.com/weather/local/{zip}/">
<input type="text" name="zip"/>
<input type="submit" value="Check Weather!">
</form>

And I can go on and on like this if doing so is what it will take to get URI
Templates support in HTML5 forms. :-)

Currently what I am doing SIMPLY CANNOT be accomplished if one doesn't have
access to Javascript or when they don't have the programming skill.

BTW, I'm making a strong and reasonable assumption here that the URI
Authorities I've mentioned will each be documenting that their URL structure
and thus blessing this approach so this DOES NOT violate URI Opacity. 

In the case of #1 and #2, spiders like Google can crawl those as well but
could not crawl them. That's especially important if someone decides to
architect a site using "clean" URLs and then use drop-downs in forms to
allow people to navigate to pages. If implemented in Javascript it can't be
reliably called but if URI templates were supported in forms it could be.

As I told Ian in a private email recently, there are really only 3 things I
want to HTML5 and they all related to forms: 

1.) URI Templates in forms,
2.) PUT in forms, and 
3.) DELETE in forms. :-)

So do my use-case examples pass your "compelling" test, or do I have to
continue trying? :-)

-Mike Schinkel 
President; NewClarity LLC 
Organizer: Atlanta Web Entrepreneurs
http://www.linkedin.com/in/mikeschinkel
http://twitter.com/mikeschinkel
http://mikeschinkel.com
http://atlanta-web.org


-----Original Message-----
From: Mark Nottingham [mailto:mnot@mnot.net] 
Sent: Saturday, November 01, 2008 1:24 AM
To: Mike Schinkel
Cc: 'Ian Hickson'; 'Jerome Louvel'; whatwg@lists.whatwg.org; uri@w3.org;
rest-discuss@yahoogroups.com
Subject: Re: [whatwg] Proposing URI Templates for WebForms 2.0

I didn't see any use cases in the original e-mail; did I miss something? An
example or two tends to focus discussion well...

Cheers,


On 01/11/2008, at 12:59 PM, Mike Schinkel wrote:

> Mark>> compelling use cases for this, but we haven't seen those yet
> AFAIK.
>
> What classifies as a "compelling use-case" in your mind?
>
> -Mike Schinkel
> President; NewClarity LLC
> Organizer: Atlanta Web Entrepreneurs
> http://www.linkedin.com/in/mikeschinkel
> http://twitter.com/mikeschinkel
> http://mikeschinkel.com
> http://atlanta-web.org
>
>
> -----Original Message-----
> From: uri-request@w3.org [mailto:uri-request@w3.org] On Behalf Of Mark
> Nottingham
> Sent: Friday, October 31, 2008 6:38 PM
> To: Ian Hickson
> Cc: Jerome Louvel; whatwg@lists.whatwg.org; uri@w3.org;
> rest-discuss@yahoogroups.com
> Subject: Re: [whatwg] Proposing URI Templates for WebForms 2.0
>
>
> +1, although I'd say it a bit differently.
>
> Doing it in script precludes unintended reuse, e.g., for  
> accessibility,
> search engines, and so forth; it's not a good solution
> *if* there are compelling use cases for this, but we haven't seen  
> those yet
> AFAIK.
>
> Cheers,
>
>
> On 29/10/2008, at 6:20 AM, Ian Hickson wrote:
>
>>
>> On Fri, 12 Jan 2007, Jerome Louvel wrote:
>>>
>>> Even though the URI template RFC is not finalized yet, we already
>>> have a complete support for it, on the server-side, in the Restlet
>>> framework.
>>> We happily use them for our URI-based routing and I think they add a
>>> lot of expressiveness while keeping a simple syntax. Usage example:
>>> http://www.restlet.org/tutorial#part11
>>>
>>> They are also supported in WADL, the RESTful description language,
>>> and in the OpenSearch specification. Extending their usage to HTML
>>> forms sounds like a logical and useful step.
>>
>> It seems to me like URI templates can be trivially done from script
>> and from the server side already; given the poor
>> backwards-compatibility story of URI templates, what do we gain from
>> adding it to the language?
>>
>> -- 
>> Ian Hickson               U+1047E                )
>> \._.,--....,'``.    fL
>> http://ln.hixie.ch/       U+263A                /,   _.. \   _
>> \  ;`._ ,.
>> Things that are impossible just take longer.   `._.-(,_..'--
>> (,_..'`-.;.'
>>
>
>
> --
> Mark Nottingham     http://www.mnot.net/
>
>


--
Mark Nottingham     http://www.mnot.net/

Received on Saturday, 1 November 2008 07:24:45 UTC