Are you a front-end developer, interested in Solid, but unfamiliar with Linked Data? Try Tripledoc


#1

There are a number of great libraries available for building Solid apps, such as LDflex for Solid and rdflib*. They’re very useful, but also primarily aimed at making life easy for developers already familiar with the concepts of Linked Data, RDF, etc.

Some of you will have seen glimpses of it already, but since it might be useful to others as well, here’s an explicit forum post to share Tripledoc.

Tripledoc was created while writing documentation for developers new to Solid. It that process, it turned out there was quite a distance between how the explanation of Solid’s concepts, and the code you would write. Thus, the main motivation for Tripledoc is to provide something that is:

  • Well documented.
  • Makes it as easy as possible to understand for developers with limited familiarity with Linked Data.

So where LDflex contains many clever shortcuts to make it easier to write Linked Data applications, Tripledoc will often be wordier - but hopefully with fewer surprises.

Check out the documentation, play around with it, and let me know what you think and how it works for you.

* I should also give a shout-out to @jeffz solid-file-client, which makes it easy to store arbitrary files on a Solid Pod. I’m mainly focusing on storing structured data here, though :slight_smile:


#2

This sounds great. I like the idea very much. I tried the quick start link but am not seeing anything but Tim’s name underneath: The following name is fetched from https://www.w3.org/People/Berners-Lee/card:

Using Firefox on Android tablet. Same with Chrome on Android tablet.


#3

Ah, thanks for the heads-up. It should show the source code next to it, but it probably doesn’t do that on a tablet screen size by default. You can click the little bar on the left-hand side to reveal and edit the code - though editing is probably easier on a full computer.


#4

Ah ok, I did get the source up by accident on Chrome but couldn’t close it! I was expecting some output under Tim’s name. Is it expected to be blank?


#5

It’s just example code that fetches Tim’s name from his Pod to give a feel for how Tripledoc works, so yes, Tim’s name is the only output. Consider the area below it to be a blank canvas that you can fill with your own code :wink:

If you want a more elaborate example, the docs also point to a CodeSandbox with a note-taking app. (Which was the basis for my earlier post: Notepod, a note-taking app for Solid .)


#6

Tripledoc is really nice. One thing though, I get a 404 on clicking ‘read our guide to writing Solid apps’


#7

Ah, well spotted! Fixed now, thanks for the heads-up :slight_smile:


#8

hi @Vincent looks really great! I really like your “Writing a Solid app” docs; I might give it a try and see if I can replicate a basic “notes” type app.


#9

Excellent! Do not hesitate to ask any questions if things are unclear - with any luck, the answers will help others too :slight_smile:


#10

do you have any cdn links to the relevant minified js files?


#11

@Vincent gave me an example here


You can do

<script src="https://unpkg.com/rdflib/dist/rdflib.min.js"></script>
    <script>
      window.rdflib = window.$rdf;
    </script>
    <script src="https://unpkg.com/tripledoc@2.4/umd/index.js"></script>
    <script>
      Tripledoc.fetchDocument("https://vincentt.inrupt.net/profile/card").then(
        doc => console.log(doc))
</script> 

#12

thanks; that was helpful!