-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Domain model of selections, text and code for #2 #5
Comments
This is rather simple, as well as open to expansion e.g. for a more complete coverage of the full REFI model Text document and Text coding (or any document and their coding – imagine an ImageDocument having an ImageCoding) are closely coupled and know about each other (so the coding can e.g. check its own validity of being within the range of text of the document etc.) The text document itself does currently not deal with text formatting – for applying codings we only need text boundaries (text from/to) no matter how the text itself is formatted. It might make sense to introduce a "TextContent"-Interface that just provides a "getRange(from,to)" and can, in addition hold any formatting. In domain driven design terms, the documents would be aggregate roots that contain their codings. |
Hey @jdittrich thanks for the input. Let me comment while reading through:
|
Yes… what I called "coding" collapsed REFIs "coding" and "selection". REFI, it seems to have separate "selection" and "coding" abstractions, where the "selection" is document specific (like "audio selection") and the "coding" seems to be the thing that codes are applied to.
I think that the source/selection aggregate needs functionality to change the source and manage itself – this would allow it to ensure its own integrity (Otherwise, I think, it would create an anemic domain model). The document would not need to know how users change e.g. the text itself – a bridge between editor and document could call the respective methods or send commands. (I think here might be a conflict between what vue.js seems to expect: potentially rich interfaces that operate on JSON data – and classic OOP with its assumption of ensuring integrity by having data in objects?)
Yes! If I have a selection in an interview that is "I always struggle here – I hate this computer", I can create a selection on " I hate this computer" and assign the codes "anger" and "technology" to it. This "assigning multiple codes to a selection" is something that seems to be very common, since any part of the text can have multiple meanings on different levels. (Now the data could still assume these to be a 1:1 match on selections, but that would deviate from the users’ assumption of "this is a part of the text that I coded with 3 different codes".
I did not model text formatting yet (with this I mean stuff like the text document itself, as opened in MS word or so, having passages that are bold, italic or green). I first thought of it but then did not: For the selection, coding or code, it should not matter whether the text is green or bold |
First core domain entities and values that can be used in #2
Probably:
The text was updated successfully, but these errors were encountered: