> The question simply is: Do you consider it proper tiddlywiki code, putting
> the values into the HTML and taking them from there.
>

No, it's not the right way to do it. You shouldn't need to store any state
in the DOM.

As I think I posted elsewhere, the key to understanding how TW5 works
internally is to realise that the refresh mechanism requires that any
region of the DOM can be regenerated at any time. This means that the
entire state of the UI must reside in the tiddlers, and not in the DOM.

It also determines the standard UI flow:

* An event handler on a widget is triggered
* The event handler can manipulate the DOM nodes directly created by the
widget, and/or modify the state of the tiddler store
* The core then issues a store change event which triggers the refresh cycle
* Each widget in the tree then gets a chance to refresh itself to reflect
the changes in the store if they need to

>From a technical perspective, TW5 is a fairly classic MVC architecture,
with strict separation of concerns. The model is the tiddler store, the
view is a rendering tree (such as the one created
from $:/core/ui/PageMacros in startup.js), and the controller is the TW5
core code itself.

Best wishes

Jeremy.

-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to