|
|
|
|
|
by NWoodsman
1282 days ago
|
|
Change my view: given any data storage medium, the smallest granularity of data must also be the most-child element of any markup language. Given the immense overhead of storing markups on a granular level, processing markup therefore must be a perpetual exercise in recursion. I.e. Poem->Verse->Line-> <char>
Book->Page->Chapter->Paragraph->Sentence->Word-> <char>
HTML->Body->Div->P-> <char>
Therefore, any given letter (here as a <char> type) can retain a back reference of parents, so the <char> object retains a hashset of {Line,Word,P} parent type references representing three domains, but really needs to be a Dictionary of key values, the key being the domain name, the value being the parent name, so that would be:Domain: Poetry, Value: Line Domain: Book Object Model, Value: Word Domain: HTML, Value: P Element We could then ask any letter arbitrarily "what is your Font Style in your HTML context?" and it would be able to walk up the parent P which obtains its style from a CSS markup, and return that correctly. Or "What is your Poem's name in your Poetry context?" and it could recurse up to the Poem element to find it's Title. |
|
And it's that last clause that is the killer for pretty much anything: "As your model gets richer you will find that breaks."
Plus the UI experience for that is awful. "I want to add this property to this Line but you're telling me it's a duplicate for some particular character? What the hell does that mean? I'm not adding a property to the character!" etc. etc.