Hi Andrew

Goodness I'm impressed at your ambition. What you are proposing involve
deep changes to the core of TiddlyWiki5.

On Wed, Nov 14, 2012 at 7:27 AM, andrew.j.harrison84 <
[email protected]> wrote:

> I am still thinking about using an AMD loader on an exploded version of
> Tiddlywiki 5 since I still can’t install anything or use an external
> hosting service at work. Also, I know from experience that if I load all my
> tiddlers into one file it will take a long time to load and I want to share
> it from a shared folder on an intranet.
>
TiddlyWiki5's module loader is not asynchronous so I'm not sure that you'll
be able to use AMD with it very conveniently.

If performance is your goal, I'd be more inclined to explore jamming all
the JS together into a single script file. The "app" side of TiddlyWiki5
for Dropbox does this; the template for the JS file it generates is here:

https://github.com/Jermolene/TiddlyWiki5/blob/master/tw5dropbox/appwiki/wiki/tw5dropbox.template.js.tid

Note that TW5 itself does the packing of the constituent parts into the
file.

> In my search I discovered when.js <https://github.com/cujojs/when> which is
> cujojs's lightweight CommonJS <http://wiki.commonjs.org/wiki/Promises>
> Promises/A <http://wiki.commonjs.org/wiki/Promises/A> and when() 
> implementation,
> derived from the async core of wire.js <https://github.com/cujojs/wire>,
> cujojs's IOC Container. It also provides several other useful
> Promise-related concepts, such as joining multiple promises, mapping and
> reducing collections of promises, timed promises, and has a robust unit
> test suite <https://github.com/cujojs/when#running-the-unit-tests>. It
> passes the Promises/A Test Suite<https://github.com/domenic/promise-tests>,
> is frighteningly 
> fast<https://github.com/cujojs/promise-perf-tests#test-results>,
> and is *under 1.3k* when compiled with Google Closure (w/advanced
> optimizations) and gzipped, and has no dependencies.
>
I'm currently using async.js in TW5, which is comparable to when.js. I'm
open to using something else, but unlikely to switch unless something under
development prompted it.


> Since Tiddlywiki 5 uses CommonJS modules, I figure it shouldn't be that
> hard to wire together the source files using <script
> src="path/to/when/when.js"></script> and even configure a loader with a
> package. I am not a programmer so if anyone is interested in explaining how
> this could work please let me know.
>
Are you really sure that all of this is worth it? TW5 is only a few hundred
K of JavaScript, and any speedup is only going to affect startup time, and
not ongoing performance.


After much searching on the internet I ran across Writing Modular
JavaScript With AMD, CommonJS & ES
Harmony<http://addyosmani.com/writing-modular-js/>.
It appears to be the direction that programming for the Internet is going.
AMD, HTML5, CSS3 and ES Harmony, correct me if I am wrong.

Yes, I think that certainly HTML5, CSS3 and ES Harmony are important, but
AMD perhaps less so because there are so many alternatives.

Best wishes


Jeremy


 --
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywikidev?hl=en.



-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to