-
Notifications
You must be signed in to change notification settings - Fork 23
Document posting a resource automatically creating a container (mkdir -p) #3
Comments
I'm not sure it should be an instead. While we definitely should point out the 'just post something and it'll also create a container' capability, it is crucial that we also show how to create containers. |
I agree with @dmitrizagidulin. This is a complete example, walking the user through different capabilities of the library. Basically a full CRUD example. The PUT operation that creates a full path is actually a feature of Solid (spec) not Solid.js. |
This documentation should not be of the form "we assume you know all about LDP and containers and RDF and Solid servers, and we want to show you how to do client-side LDP operations faster than you could before". It doesn't matter one inch that The PUT operation that creates a full path is actually a feature of Solid (spec) not Solid.js. Solid.js is not a toolbox for doing LDP with all its warts. It is an API for making apps, and it should cater to what the app dev is thinking and needing. |
If you want a CRUD example then you need Not The longer version gets more complicated when you have to check for things pre-existing or not also. |
@timbl agreed. The examples here are trying to reflect the functions provided by the library. It's not really a tutorial on how to build an app. In fact, it's something between a README and an API doc, with a few examples that try to stay within the same context. I will try to add some text which reflects this fact, as well as links to the real app tutorial. |
Let me attempt to clarify terms, so we can specify what we're arguing about. :)
Specifically, Solid itself (as in solid-spec) is an API for making apps, that should cater to developer convenience. Now, it so happens that the Solid spec is currently based on LDP. And I agree, since Solid is a set of extensions and improvements and clarifications on LDP, it should not be just be a toolbox for doing LDP with all its warts. And so if something in it causes developer awkwardness or pain, we should extend or modify the spec to solve that. Solid.js, however, is just some syntactic helper code for using the Solid API (not the LDP API). It is, by definition, a toolbox for using Solid with all its warts.
So, given the terms above, a solid.js tutorial kind of has to be a tutorial on the solid spec. And we shouldn't fork the tutorial (or the library), but instead modify the spec when needed, and then modify solid.js to match it.
I agree that CRUD tutorials should be simple. But what's getting lost here is that we're essentially documenting two CRUD workflows:
So, I agree with you overall, but I want to make sure we're not skipping important parts of the tutorial. |
The current example and method used is to complicated. Simplicity and speed is important.
Instead of
Just PUT the final result.
So much simpler. Note that all the solid methods which take URIs should also take rdf symbol objects. This from long experience that is saves worrying about which you use.
We know solid server are required to do the mkdir -p when they get a request like this.
This also points out that it is better to use a local variable within the document than the document itself as an object.
The text was updated successfully, but these errors were encountered: