# Is there a timeline for adding write functionality to the ld-flex library

**URL:** <https://forum.solidproject.org/t/is-there-a-timeline-for-adding-write-functionality-to-the-ld-flex-library/1965>\
**Category:** Solid App Development FAQs\
**Created:** [July 5, 2019, 12:37pm UTC](https://forum.solidproject.org/t/is-there-a-timeline-for-adding-write-functionality-to-the-ld-flex-library/1965 "2019-07-05T12:37:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hughgearse](https://avatars.discourse-cdn.com/v4/letter/h/f04885/32.png) [@hughgearse](https://forum.solidproject.org/u/hughgearse)\
**Post date:** [July 5, 2019, 12:37pm UTC](https://forum.solidproject.org/t/is-there-a-timeline-for-adding-write-functionality-to-the-ld-flex-library/1965/1 "2019-07-05T12:37:05Z")

</div>

Hi

I am looking to develop an app that will use a solid pod to manage all the user data. But it will require that my app is able to actually add and update data in the user’s pod. I read in Ruben Verborgh’s [post](https://ruben.verborgh.org/blog/2018/12/28/designing-a-linked-data-developer-experience/) that the aim is to realise a read/write web through linked data. Is there any kind of timeline on this?

Also, is there a way I could add new data manually via the web? This would give me the ability to continue developing my app in the interim

Thanks  
Des

---

<div class="post-metadata">

**Author:** ![A\_A](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/a_a/32/786_2.png) [@A\_A](https://forum.solidproject.org/u/A_A)\
**Post date:** [July 5, 2019, 1:21pm UTC](https://forum.solidproject.org/t/is-there-a-timeline-for-adding-write-functionality-to-the-ld-flex-library/1965/2 "2019-07-05T13:21:26Z")

</div>

I don’t know about the status of ld-flex, but you could use [solid-file-client](https://github.com/jeff-zucker/solid-file-client/) for working with files (reading/updating/creating). This project is currently getting a rework which will (hopefully) land within the next few weeks, but the current version should also fit your needs. As an interim solution it should definitely work.

---

<div class="post-metadata">

**Author:** ![megoth](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/megoth/32/8_2.png) [@megoth](https://forum.solidproject.org/u/megoth)\
**Post date:** [July 5, 2019, 3:41pm UTC](https://forum.solidproject.org/t/is-there-a-timeline-for-adding-write-functionality-to-the-ld-flex-library/1965/3 "2019-07-05T15:41:08Z")

</div>

Don’t know if you’ve considered it, but there’s also rdflib.js and it’s Fetcher and UpdateManager that can help you with creating and updating.

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [July 5, 2019, 3:49pm UTC](https://forum.solidproject.org/t/is-there-a-timeline-for-adding-write-functionality-to-the-ld-flex-library/1965/4 "2019-07-05T15:49:22Z")

</div>

Both solid-file-client and rdflib can write to pods. But so can query ldflex. It just isn’t documented yet. I showed a complete working example here : [How can I handle data form pod?](http://forum.solidproject.org/t/how-can-i-handle-data-form-pod/1787/8)

---

<div class="post-metadata">

**Author:** ![hughgearse](https://avatars.discourse-cdn.com/v4/letter/h/f04885/32.png) [@hughgearse](https://forum.solidproject.org/u/hughgearse)\
**Post date:** [July 10, 2019, 8:30am UTC](https://forum.solidproject.org/t/is-there-a-timeline-for-adding-write-functionality-to-the-ld-flex-library/1965/7 "2019-07-10T08:30:01Z")

</div>

I am sorry to say it is still not clear to me how I can add data to my Pod. How for example, can I add a simple text property to my Pod within a new context. So say I would like to add a new context called “tree” and within this context add a property called “oak” with a value of “acorn” (just a string property nothing more) how would I add it? Such that the same way I can call solid.data[“user.name”] in ldflex to return my name - I could now make a similar call sold.data[“tree.oak”] that returns “acorn”?

---

<div class="post-metadata">

**Author:** ![james.martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/james.martin/32/439_2.png) [@james.martin](https://forum.solidproject.org/u/james.martin)\
**Post date:** [July 10, 2019, 3:54pm UTC](https://forum.solidproject.org/t/is-there-a-timeline-for-adding-write-functionality-to-the-ld-flex-library/1965/8 "2019-07-10T15:54:14Z")

</div>

So, the quick explanation is that ldflex is abstracting out a triple - a Subject/Predicate/Object collection. In the case of `solid.data.user.name`, the subject is “user” which is an alias for your webID, and the predicate is “name” which is another alias for a name predicate (which one, I’d have to look up).

So to add data, you need to provide a subject to add it to, a predicate that describes it, and a value (aka object) to store.

The syntax for this is `solid.data[subject][predicate].add(value);` and in this case a subject can be a file or something else. For example, we use a lot of NamedNodes, which are like named collections of predicates. In the profile, an example of this is address - addresses are grouped together under namedNodes with names like id3874387438 (to be unique) and contain street address, locality, and other predicates. This way, one file can contain multiple addresses and keep them separated out and retrievable (instead of just lumping them all in one flat file).

To create a namedNode, it’s a similar syntax as above, except the value you’re adding is namedNode(name), where namedNode is coming from `import { namedNode } from '@rdfjs/data-model';` - Then you can use the namedNode as the subject. NamedNodes are separated by # signs in the url.

So if you had a file called trees.ttl, you could make a namedNode called acorn by using

`solid.data['path/to/file/trees.ttl'][predicate].add(namedNode('oak')` but I’m not sure what predicate you would want there. Then you could do `solid.data['path/to/file/trees.ttl#oak'][predicate].add('acorn');` but again I’m not sure what the best predicate is for that example.
