Hi Danielo

I'm being dumb -- to use a random hash as an ID for a tiddler would be a 
waste of resources. Rather -- each tiddler should be given a hex string as 
an ID, where the hex string determines that tidders position in a Table of 
Contents (TOC). 

The existing TOC mechanism is cumbersome to use -- useable in a static 
situation, but useless for generating a dynamic TOC. What would be really 
nice is a TOC that functions alike Workflowy <https://workflowy.com/> -- 
where each entry is the title (clickable link) of the respective tiddler. 

This could be implemented if each tiddler were allocated a hex string as an 
ID which marked it's position in the TOC -- 16 branches at each level (I 
suppose two hex characters might be used for the first level -- allowing 
256 branches at the root level.)

Once this mechanism had been implemented (adding a suitable hex string 
field to each tiddler) -- creating a TOC tiddler (in the sidebar) to 
display the hierarchy should not be too difficult. With a little more 
effort, a drag and drop editor could be written to ease the creation and 
repositioning of tiddlers within the tree -- and TW could mimic the 
behaviour of Workflowy!

regards

On Wednesday, May 27, 2015 at 4:30:48 AM UTC+2, Matabele wrote:
>
> Hi Danielo
>
> It would be advantageous to give each instance of TW a  unique ID -- in 
> this way, two different tiddlers in two TW's with the same title can be 
> distinguished from one another -- in particular, this may involve two 
> different revisions of the same source tiddler. 
>
> I believe it would also be advantageous to give each tiddler a unique ID 
> via a plugin (could be a hash of the TW ID and the title of the tiddler) 
> but this would be redundant if the idea above were adopted (as titles 
> within each TW must be unique in any case.) 
>
> regards
>
> On Tuesday, May 26, 2015 at 10:59:21 AM UTC+2, Danielo Rodríguez wrote:
>>
>> Hello everyone,
>>
>> I know that the topic of titles as tiddlers ID have been discussed 
>> several times for TW itself. But what about external stores? This is 
>> directly related to sync adaptors and external databases as store for the 
>> tiddlers.
>> Normally in databases there is a primary key, that is unique and 
>> incremental, and then the user data/fields. This have several advantages 
>> like traceability of a single element among all their changes. Sticking to 
>> the name as an unique identifier we will lose track of tiddler in every 
>> database system once you rename it. This is because how TW handles 
>> tiddlers: every change on a tiddler means deleting the old version and 
>> substitute it with a totally new one. This is against any DB system I know, 
>> and recently I have faced several problems (like loosing related 
>> attachments) because of that.
>>
>> That's why I'm asking community for the best approach. Should we stick to 
>> titles as IDs when we sync to a remote database? Or should be treat the 
>> tiddler just as a collection of fields that we store in a particular entry 
>> of our DB? Of course the syncadaptor should handle the conversion however 
>> it's needed.
>>
>> Thanks for your point of view.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9f58010a-1f9a-439d-9d4e-abf7cd205ac2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to