Re: [apps-discuss] draft-ietf-weirds-bootstrap-00 and our lawn -- feedback?

Graham Klyne <GK@ninebynine.org> Mon, 17 February 2014 09:02 UTC

Return-Path: <GK@ninebynine.org>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2CEBD1A00C9 for <apps-discuss@ietfa.amsl.com>; Mon, 17 Feb 2014 01:02:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Level:
X-Spam-Status: No, score=-3.151 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DATE_IN_PAST_12_24=1.049, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TZNYe27gUJIh for <apps-discuss@ietfa.amsl.com>; Mon, 17 Feb 2014 01:02:22 -0800 (PST)
Received: from relay14.mail.ox.ac.uk (relay14.mail.ox.ac.uk [163.1.2.162]) by ietfa.amsl.com (Postfix) with ESMTP id B51171A00B6 for <apps-discuss@ietf.org>; Mon, 17 Feb 2014 01:02:22 -0800 (PST)
Received: from smtp0.mail.ox.ac.uk ([129.67.1.205]) by relay14.mail.ox.ac.uk with esmtp (Exim 4.80) (envelope-from <GK@ninebynine.org>) id 1WFK5h-0006ZK-jj; Mon, 17 Feb 2014 09:02:17 +0000
Received: from gklyne.plus.com ([80.229.154.156] helo=conina.local) by smtp0.mail.ox.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from <GK@ninebynine.org>) id 1WFK5f-0000ZT-2M; Mon, 17 Feb 2014 09:02:16 +0000
Message-ID: <53009C37.3030009@ninebynine.org>
Date: Sun, 16 Feb 2014 11:08:39 +0000
From: Graham Klyne <GK@ninebynine.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:15.0) Gecko/20120907 Thunderbird/15.0.1
MIME-Version: 1.0
To: John Levine <johnl@taugh.com>
References: <20140216035539.2686.qmail@joyce.lan>
In-Reply-To: <20140216035539.2686.qmail@joyce.lan>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Oxford-Username: zool0635
Archived-At: http://mailarchive.ietf.org/arch/msg/apps-discuss/duN5uIwJx3KkgkAqMLDOwK9HW6c
Cc: darrel@tavis.ca, apps-discuss@ietf.org
Subject: Re: [apps-discuss] draft-ietf-weirds-bootstrap-00 and our lawn -- feedback?
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss/>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Feb 2014 09:02:25 -0000

On 16/02/2014 03:55, John Levine wrote:
>> One of the major advantages of using URI templates, beyond freeing the
>> server from conforming to conventions, is that it makes client code
>> really simple.
>
> People keep saying this.  My client is a three line shell script that
> uses wget and grep (really.)  Could you explain how that works with
> templates?

I've done something like this for apps I write by providing a simple template 
expansion service (POST template+parameters as JSON, get URI back).

E.g.

[[
# URI template expansion

echo "==== Request URI-template expansion ===="
cat >sample-params.txt <<END
{
   "template": "$TEMPLATE",
   "params":
   {
     "RO": "http://sandbox.wf4ever-project.org/rodl/ROs/simple-requirements/",
     "minim": "checklist-runnable.rdf",
     "purpose": "Runnable"
   }
}
END

EVALURI=$HOST`curl -X POST --data @sample-params.txt $HOST/uritemplate`

echo "==== URI: $EVALURI"
]]

#g
--