1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-29 08:43:14 +00:00

Docs update

This commit is contained in:
Jermolene 2013-12-03 09:05:53 +00:00
parent 5ccd4988aa
commit 88e0bd3251
2 changed files with 30 additions and 3 deletions

View File

@ -0,0 +1,26 @@
created: 20131203074550710
creator: JeremyRuston
modified: 20131203075203153
modifier: JeremyRuston
tags: introduction dev
title: TiddlyWiki5 for Developers
type: text/vnd.tiddlywiki
TiddlyWiki5 is published as OpenSource which means that anyone can read the code and contribute to its development. It's a big, complex piece of software and can be overwhelming to newcomers.
! Resources
! The one thing you need to know
TiddlyWiki5's architecture is very different from an HTML page written using jQuery. This section concisely explains what TiddlyWiki5 does differently. It may not make much sense on the first reading.
The key to understanding how TW5 works internally is to see that the RefreshMechanism requires that any region of the DOM can be regenerated at any time. This means that the entire state of the user interface must reside in the tiddler store, 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, TiddlyWiki5 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.

View File

@ -1,12 +1,13 @@
created: 201308251621
created: 20130825162100000
creator: JeremyRuston
modified: 201308251621
modified: 20131203074943344
modifier: JeremyRuston
tags: dev
title: TiddlyWikiArchitecture
type: text/vnd.tiddlywiki
The heart of TiddlyWiki can be seen as an extensible representation transformation engine for text and images. Given the text of a tiddler and its associated ContentType, the engine can produce a rendering of the tiddler in a new ContentType. Furthermore, it can efficiently selectively update the rendering to track any changes in the tiddler or its dependents.
The primary use of the engine is to convert raw `text/vnd.tiddlywiki` WikiText into a `text/html` or `text/plain` representation for display. The transclusion and templating features of WikiText allow the engine to also be used to generate TiddlyWiki HTML files from raw tiddlers.
If you're interested in understanding more about the internal operation of TiddlyWiki, it is recommended that you review the DeveloperDocs and read the code -- start with the boot kernel [[$:/boot/boot.js]].
If you're interested in understanding more about the internal operation of TiddlyWiki, start by reviewing [[TiddlyWiki5 for Developers]] and then read the code -- start with the boot kernel [[$:/boot/boot.js]].