Skip to content

Instantly share code, notes, and snippets.

@DaveBitter
Last active June 28, 2017 12:21
Show Gist options
  • Save DaveBitter/5cb327970cb02cf4dd300971e2781d2a to your computer and use it in GitHub Desktop.
Save DaveBitter/5cb327970cb02cf4dd300971e2781d2a to your computer and use it in GitHub Desktop.
meesterproef_dave_bitter

Retrospect Wallscope Project

Retrospect Dave Bitter

Dave Bitter

Dave Bitter

Features

Verinote API Class

What did I do

One of the first features I build was the ability to make calls to the Verinote API, provided by Wallscope, to process inputted text to be then be returned to the client. I build a class that we could use to keep all our data fetching in one central place which we could call in every other file.

In verinote.js you are able to call methods to get for instance all enhancement chains (annotate) or get results back from a body of text (getChains). This class was later expanded with new methods by others to get for instance an entity.

Issues and Pull requests
Issues
Pull requests

Filtering Sorting and PouchDB

What did I do

The next feature I build was being able to filter and sort the results. Similarly to the previous feature I made a reusable class. In light of progressive enhancement I first made the filtering and sorting work with a basic POST to a route. This route will get the parameters and then use the filter and sort class to return the results exactly the way the user wants it.

After this, I enhanced the user experience by doing client-side filtering and sorting. Because we used browserify I could reuse the class by requiring it in the client-side code. The datavisualizations made use of this technique. @nickrttn later on used the filtering and sorting to live update the listview through Virtual Dom.

In order to reuse the results client-side for each change in filtering and sorting I used PouchDB which is build on IndexedDB. This way we could request the current state of the results from every client-side file. Another advantage of using PoucheDB is the ability to listen to change events to the database. When the results are altered by a filter, sort or anything else, an event triggers. This event will then trigger a redraw of the datavisualisations and listview.

Issues and Pull requests
Issues
Pull requests

Overall clarification and feedback

What did I do

Our system needed to provide some guidance for users. It can take a while to process the uploaded text. I simply added a small loader which loops through messages like 'linking data' or 'processing your text'. This gives visual feedback to the user that they did everything correctly but the system just needs a minute.

I also added small pieces of text throughout the system to clarify what you're looking at or should do. These small pieces of text give some explanation for the user.

Issues and Pull requests
Issues
Pull requests

Read more

What did I do

We provide a way for users to explore results. After they've found a result that they are interested in the should be able to read up on it.

For a lot of results we have the synopsis for the WikiPedia article. I made sure a user could click on a result in the listview to show this synopsis. I also added the link to the original article as a 'read more' link. I got this link by running all the results through the entityhub.

Issues and Pull requests
Issues
Pull requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment