- From: Melvin Carvalho <melvincarvalho@gmail.com>
- Date: Wed, 18 Dec 2013 21:40:19 +0100
- To: Henry Story <henry.story@bblfish.net>
- Cc: Luggen Michael <michael.luggen@bfh.ch>, "public-rdfjs@w3.org" <public-rdfjs@w3.org>
- Message-ID: <CAKaEYhJthDFr-eBJV5jCNpQb_cY8M=o_mrVJKSCpvgxs4cEz8g@mail.gmail.com>
On 18 December 2013 21:38, Melvin Carvalho <melvincarvalho@gmail.com> wrote: > > > > On 18 December 2013 19:28, Henry Story <henry.story@bblfish.net> wrote: > >> >> >> >> On 18 Dec 2013, at 17:50, Luggen Michael <michael.luggen@bfh.ch> wrote: >> >> > Hi Henry, >> > >> > In which kind of format comes the PointedGraph? If you can transform it >> into a JSON Structure you can take any of the numerous JavaScript Template >> Libraries around. I personally prefer Handlebars, but also Mustache, >> Underscore are valid contenders. The interesting tidbit is how to map a >> Graph to a defined JSON Structure which can be consumed by a Template. >> >> Hi Michael! :-) >> >> That is what we are doing right now by hand to map the pointed graph to >> JS. >> We could automate it of course. ( if there is a library to do that already >> that would save us some time, please let us know ). >> >> The problem is that we want to put actions on the HTML so that when a >> field is updated >> it should update a particular graph in the store ( and the remote LDP >> resource of course ). >> But for this the field needs to know what relation it was to what >> subject, so >> that the triple can be updated or removed. If one has create json that >> contains >> each of the properties, the types, etc, that seems a bit heavy. >> >> ( But perhaps that can be done with JSON=LD ? ... Hmmm.... The problem >> with JSON-LD would be >> that we then would then risk serialisng the whole graph into JSON-LD when >> perhaps only a small >> part will be needed in the html template... It is the template that >> really queries the >> graph to fill it out.) >> >> So the problem is to solve the mapping into HTML in such a way that it is >> easy to map back >> to the store when changes are made.. >> > > One way is HTTP PATCH over JSON. Code and demo here: > > http://hello.rww.io/hellopatch.html > SPARQL Update version: http://hello.rww.io/hellosparql.html > > >> >> >> >> >> > >> > Michael >> > >> > >> > On 18.12.2013, at 17:04, Henry Story <henry.story@bblfish.net> wrote: >> > >> >> Hi all, >> >> >> >> I have a quick question: >> >> >> >> Is there a simple RDF to HTML templating library? >> >> >> >> We have developed an initial PointedGraph library for >> >> rdflib [1], and would like to have a function such as >> >> >> >> template.apply(pg,template) >> >> >> >> which would bind the pointed graph to a template. >> >> I imagine this could be best done with an RDFa >> >> template, but I don't know what the issues with >> >> this are. I am quite open to other suggestions too. >> >> >> >> I have seen Vie, but this seems to require a whole >> >> framework. It would be nice to have a library dedicated >> >> to just this functionality, so that one can use it with >> >> different libraries, or develop our own. >> >> >> >> All the best, >> >> >> >> Henry Story >> >> >> >> >> >> [1] >> https://github.com/stample/rww-play/blob/withPointedGraph/public/ldp/lib/pointedGraph.js >> >> We'd like to then have an rdfstore implementation for this later. >> >> >> >> Social Web Architect >> >> http://bblfish.net/ >> >> >> >> >> > >> >> Social Web Architect >> http://bblfish.net/ >> >> >> >
Received on Wednesday, 18 December 2013 20:40:46 UTC