Implementing a Task Manager using Solid
|Started:||November 12, 2018 (Ongoing)|
Some months ago I started working on a protocol to build applications that decouple storage from service providers. You can read about that here: https://noeldemartin.github.io/autonomous-data.
Well, one month ago Tim Berners-Lee (inventor of the World Wide Web) announced he's been working on a project called Solid, which is very similar to what I had in mind.
So I'll start working on a simple task manager using Solid to get my feet wet, and I'll decide whether to focus my efforts on Solid or continue developing my protocol.
Started working on it.
Since I started looking into Solid, I realized it's built on top of many existing technologies I didn't know much about. These are some basic concepts I'd recommend getting familiar with before learning Solid:
- Resource Description Framework (RDF) Primer
- RDF Schema
- Turtle Serialization Format
- Linked Data Platform (LDP) Primer
- SPARQL Query Language
And using this website you can find vocabularies to define your data models: https://lov.linkeddata.es
Today I finished the first version that stores tasks in a Solid POD (including a hierarchy of lists and workspaces). The code for this project can be found on this github repo: github.com/NoelDeMartin/solid-focus.
I still have many things to complete before I can consider this MVP "done". For example, making more efficient requests (I didn't succeed on querying with SPARQL yet), validating my use of Solid standards with community members, adding more RDF attributes, etc.
After some more digging, I found that SPARQL is not supported yet! Which makes performance a problem for applications with a lot of data (like a Task Manager). Instead, they suggest to use Globbing for the short term.
I guess this was to be expected, since Solid hasn't been declared as "production-ready", as far as I know. And this is the kind of thing I wanted to learn doing this project. So, good, let's see how this evolves and what I have when I complete this MVP.
I have been chatting with the guys working on Solid using gitter, and they are quite responsive :D. I opened an issue in the GitHub repo to keep track of this: https://github.com/solid/node-solid-server/issues/962
Today I've been working in something that lead me stray from the path to complete this task, but I think it was worth it to explore possibilities.
The first thing I did when I started working on this task manager is storing user data in local storage, in order to have the skeleton of the app before getting into anything Solid specific. I did it in such a way that everything was behind an interface, so I just had to reimplement the interfaces using Solid.
And what I realized today, is that it wouldn't be too difficult to maintain both implementations, and let users decide whether to use local storage or Solid (or potentially other backends in the future). This is obviously not something to take lightly, but since this is only an exploratory task, to learn Solid and alternative architectures, I thought it'd be a good idea to do it and see how it goes.
I have completed a first version were both offline and Solid storages are working locally, but the application is throwing an error when logging with my solid.community account. So I'll have to see what's different from my local Solid server for development.
I have also deployed a version to github pages, so if you are curious to see how it looks you can visit this page: noeldemartin.github.io/solid-focus. But keep in mind that you'll just be able to use the offline option at the moment. I'll post an update when I get it working correctly!
And it's done! The app is working both locally and using my solid.community account. You can head to the github repo if you want to check it out.
I'm still not closing this task because there are still some things to improve (globbing for better performance, UI tweaks, RDF types, etc.). But I would say the most important part has been finished.
Once I've completed what's left I'll close this and head to gitter and my socials to ask for feedback.
You know when sometimes you get wrapped up in something completely irrelevant to the project at hand? Well this happened today, not that it's a problem or that it took long.
Turns out the problem was with SVG SMIL animations. They were deprecated, then they weren't, and now I don't even know what's the status. So I decided to move the animation to CSS. It wasn't straightforward because they don't share the same syntax nor the same operations. You can see how I did it in this commit.