ds-wizard / legacy-wizard

Data Stewardship Wizard for the questions from DS Knowledge Model
Apache License 2.0
1 stars 1 forks source link

As an expert with my own {web|book} resource, I would like to be able to use a deep link to any specific part of the knowledge tree, so that my readers can suggest/comment on the contents. #7

Open rwwh opened 7 years ago

rwwh commented 7 years ago

Would it e.g. be possible to open and highlight a question if people are linked to http://dmp.fairdata.solutions/jump?namespace=core&chapter=2&question=44

MarekSuchanek commented 7 years ago

How should it treat the required questions (above in the branch) for that one defined by URL? Should it auto-answer all questions above in the branch leading to the question? What if there is a listor fill-in type question above in the branch?

rwwh commented 7 years ago

Something to think about indeed. It becomes even harder when people can be logged in and have stored plans for projects.

This is a request from Barend, he would like to be able to point to the site from the book like we are doing in reverse. It can enable people to give feedback to the book even if they are not using the site to make a plan.

Probably it is only possible by answering the dependent questions in the right way, and putting "example" in the list and fill-in branches.

roper79 commented 7 years ago

Preparing a few concrete examples will probably show how this may be approached.

rwwh commented 7 years ago

I had a further discussion about this with Barend. What he really needs to link to are a page with external resources (one link per page of his book) that corresponds to the external resources we give with the question. So: if the list of external resources has a separate URL, that would also work.

What Barend would need (relatively soon, in a week or two) is the schema to construct the URL. The URL itself only needs to be live in a few months when the book/e-book really is published.

roper79 commented 7 years ago

This version is definitely feasible. @MarekSuchanek please propose a link structure that fits the KM; Wizard does not care, it has a translation table consisting of chapterid - questionid - bookref (section). We may use these or smt. else.

MarekSuchanek commented 7 years ago

I propose there will be just the bookref information in the URL and page will contain a book content and a list of related questions (which has this bookref in their references). We can work on the "jump to question" functionality later and Barend will have links which won't change even when some questions are (re)moved or added. Is it satisfactory?

The URL can be:

The dmp_book slug can be replaced. I think almost any format is OK, it just must contain <bookref> (as resource ID) and some identification of a resource type (DMP Book). It just should be self-explanatory (what's there) for the users and not too long.

The bookref format is going to be just "numbers and dots" (([0-9]\.)+[0-9]) or something else?

rwwh commented 7 years ago

One possible problem with that approach is that we can not be sure that the book section numbers will stay the same indefinitely. Somehow, even if we perform a "renumbering" effort (e.g. a single new page is added somewhere), we have to have persistent URLs so that old versions of the book are not getting stale references.

Our own question numbers are more stable, but unfortunately they are not all "done" for all pages in the book yet.

Can we think of another alternative? Some keywords from the title of the chapter that uniquely identify the question?

MarekSuchanek commented 7 years ago

As long as this keywords string would be unique, there is no problem. We might also use these in the KM (DMP book reference can have a "chapter" and also "keywords").

rwwh commented 7 years ago

Keywords; or any other short unique ID we can guarantee not to change would be fine too. Good idea to put it in the book reference this way. An "opaque identifier" is even better than keywords from the title (imagine a future version would change a chapter title).

roper79 commented 7 years ago

We will probably end with UUID for each question ;-)

MarekSuchanek commented 7 years ago

RFC 4122 UUID? Don't know if we can consider a 128-bit number as "short unique ID" but I don't see a problem with that. End users won't get in touch with UUID (link only, can be redirected within wizard to some nicer URL) and 2128 IDs should be sufficient 😄

We just have to set-up some mechanism how to create UUID within ds-km (generator with checking for collisions). It will be simplified when we create some sort of DS KM editor.

rwwh commented 7 years ago

I think a UUID would be a nice joke since Barend used to be talking about UUIDs a lot, but it is not practical for this purpose. I would suggest to use a sequence of 4 or 5 random non-ambiguous alpha characters (e.g. avoid 0, O, l, I) which we add to each page/chapter of the book. A little like a standard URL shortener. 20^4 or 20^5 is also plenty namespace for us. Maybe we can even use a standard url shortener library/application to support it on the site.

roper79 commented 7 years ago

OK, so we just assign strings like this to questions: https://www.random.org/strings/?num=600&len=5&loweralpha=on&unique=on&format=html&rnd=new

resulting in URLS: /dmp_book/NNNNN

We show the URL in the DMP book details section. @rwwh, is the end of this week sufficient to deploy this functionality?