<h1> Welcome to <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='TiddlyWiki5'>TiddlyWiki5</a></h1><divclass=''><p>Welcome to <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='TiddlyWiki5'>TiddlyWiki5</a>, a reboot of <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='TiddlyWiki'>TiddlyWiki</a>, the reusable non-linear personal web notebook <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='History'>first released in 2004</a>. It is a complete interactive wiki in <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='JavaScript'>JavaScript</a> that can be run from a single HTML file in the browser or as a powerful <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='node.js'>node.js application</a>.</p><p><aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='TiddlyWiki'>TiddlyWiki</a> is designed to fit around your brain, giving you a better way of managing information compared to traditional documents and emails. The fundamental idea is that information is more useful and reusable if we cut it up into the smallest semantically meaningful chunks –<aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='Tiddlers'>tiddlers</a>– and give them titles so that they can be structured with links, tags and macros. <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='TiddlyWiki'>TiddlyWiki</a> aims to provide a fluid interface for working with tiddlers, allowing them to be aggregated and composed into longer narratives.</p><p><aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='TiddlyWiki5'>TiddlyWiki5</a> has many <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='Improvements'>improvements</a> over the original. It is currently labelled alpha, meaning it is working but incomplete. It is the best possible time to get involved and support its future development. You can:</p><ul><li> Explore its features online at <aclass='tw-tiddlylink tw-tiddlylink-external'href='http://five.tiddlywiki.com/'>http://five.tiddlywiki.com/</a></li><li> Get involved in the <aclass='tw-tiddlylink tw-tiddlylink-external'href='https://github.com/Jermolene/TiddlyWiki5'>development on GitHub</a></li><li> Join the discussions on <aclass='tw-tiddlylink tw-tiddlylink-external'href='http://groups.google.com/group/TiddlyWikiDev'>the TiddlyWikiDev Google Group</a></li><li> Follow <aclass='tw-tiddlylink tw-tiddlylink-external'href='http://twitter.com/#!/TiddlyWiki'>@TiddlyWiki on Twitter</a> for the latest news</li></ul><divclass='tw-reveal'style='display:block;'><divclass=''><p>Here are a few features of <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='TiddlyWiki'>TiddlyWiki</a> that you can explore:</p><ul><li> Try editing some tiddlers here on five.tiddlywiki.com to try out the new <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='WikiText'>WikiText</a>. Your changes will not be visible to other users</li><li> Download an empty copy of <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='TiddlyWiki5'>TiddlyWiki5</a> from <aclass='tw-tiddlylink tw-tiddlylink-external'href='http://five.tiddlywiki.com/empty.html'>http://five.tiddlywiki.com/empty.html</a></li><li> Invoke a demonstration wizard: <buttonclass='btn btn-inverse'>demo</button></li><li> Use <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='TiddlySpot'>TiddlySpot</a> to host an instance of <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='TiddlyWiki5'>TiddlyWiki5</a></li><li> Save this wiki as a static HTML file: <buttonclass='btn'>Save Static</button></li><li> Browse the list of <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='AllTiddlers'>AllTiddlers</a> or the <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='ShadowTiddlers'>Sh
</p></div><h1> Boot Mechanism</h1><divclass=''><h1>Introduction</h1><p><aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='TiddlyWiki5'>TiddlyWiki5</a> is based on a 600-line boot kernel that runs on node.js or in the browser, with all other functionality dynamically loaded as plugins.</p><p>The kernel boots just enough of the <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='TiddlyWiki'>TiddlyWiki</a> environment to allow it to load tiddlers and execute <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='JavaScript'>JavaScript</a> modules. Plugin modules are written like <code>node.js</code> modules.</p><p>There are many <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='ModuleType'>different types of module</a>: parsers, serializers, deserializers, macros etc. It goes much further than you might expect. For example, individual tiddler fields are modules, too: there's a module that knows how to handle the <code>tags</code> field, and another that knows how to handle the special behaviour of the <code>modified</code> and <code>created</code> fields.</p><p>Some plugin modules have further sub-plugins: the wikitext parser, for instance, accepts rules as individual plugin modules.</p><h1>Plugins and Modules</h1><p>In <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='TiddlyWiki5'>TiddlyWiki5</a>, <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='Plugins'>Plugins</a> are bundles of tiddlers that are distributed and managed as one; <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='Modules'>Modules</a> are <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='JavaScript'>JavaScript</a> tiddlers with a module type identifying when and how they should be executed.</p><p>The tiddler <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='%24%3A%2Fcore%2Fboot.js'>$:/core/boot.js</a> is a barebones <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-resolves'href='TiddlyWiki'>TiddlyWiki</a> kernel that is just sufficient to load the core plugin modules and trigger a startup module to load up the rest of the application.</p><p>The kernel includes:</p><ul><li> Several short shared utility functions</li><li> A handful of methods implementing the plugin module mechanism</li><li> The <code>$tw.Tiddler</code> class (and field definition plugins)</li><li> The <code>$tw.Wiki</code> class (and tiddler deserialization methods)</li><li> Code for the browser to load tiddlers from the HTML DOM</li><li> Code for the server to load tiddlers from the file system</li></ul><p>Each module is an ordinary <code>node.js</code>-style module, using the <code>require()</code> function to access other modules and the <code>exports</code> global to return <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='JavaScript'>JavaScript</a> values. The boot kernel smooths over the differences between <code>node.js</code> and the browser, allowing the same plugin modules to execute in both environments.</p><p>In the browser, <code>core/boot.js</code> is packed into a template HTML file that contains the following elements in order:</p><ul><li> Ordinary and shadow tiddlers, packed as HTML <code><DIV></code> elements</li><li><code>core/bootprefix.js</code>, containing a few lines to set up the plugin environment</li><li><aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='JavaScript'>JavaScript</a> modules, packed as HTML <code><SCRIPT></code> blocks</li><li><code>core/boot.js</code>, containing the boot kernel</li></ul><p>On the server, <code>core/boot.js</code> is executed directly. It uses the <code>node.js</code> local file API to load plugins directly from the file system in the <code>core/modules</code> directory. The code loading is performed synchronously for brevity (and because the system is in any case inherently blocked until plugins are loaded).</p><p>The boot kern
</p></div><p><em>This <code>readme</code> file was automatically generated by <aclass='tw-tiddlylink tw-tiddlylink-internal tw-tiddlylink-missing'href='TiddlyWiki5'>TiddlyWiki5</a></em>