TinyTiddly and twcore.js re-entrance

13 views
Skip to first unread message

AlanBCohen

unread,
Jun 21, 2009, 2:53:51 PM6/21/09
to TiddlyWiki
I apparently missed the release of TinyTiddly, sorry. I am intrigued
by the idea, especially since I use multiple TW files, separated by
function, linked to a common root to prevent the slowdowns some have
reported (e.g., keep my address book in a separate file from my
journal).
Can a common twcore.js file be shared among several TW files, al in
the same directory? This kind of factoring would reduce the need to
separately upgrade each file due to version changes.

FND

unread,
Jun 21, 2009, 2:59:02 PM6/21/09
to Tiddl...@googlegroups.com
> I apparently missed the release of TinyTiddly, sorry.

TinyTiddly has been around for quite a while - there was no recent
announcement to be missed. (In fact, it currently is lagging behind with
v2.4.3 - we'll be looking into that.)

> Can a common twcore.js file be shared among several TW files

This is already possible without any refactoring; TinyTiddly-based
TiddlyWiki documents just look for the twcore.js file in their working
directory - whether that's one document or several doesn't matter.


-- F.

AlanBCohen

unread,
Jun 21, 2009, 7:42:24 PM6/21/09
to TiddlyWiki
Thanks

Morris Gray

unread,
Jun 21, 2009, 9:53:39 PM6/21/09
to TiddlyWiki
On Jun 22, 4:59 am, FND <F...@gmx.net> wrote:
> > I apparently missed the release of TinyTiddly, sorry.
>
> TinyTiddly has been around for quite a while - there was no recent
> announcement to be missed. (In fact, it currently is lagging behind with
> v2.4.3 - we'll be looking into that.)

I was wondering since TinyTiddly is used where minimalization is
desired if it would be feasible to access both TinyTiddly 2.4.3, and
where it was needed, jQuery also from an external source.

Morris

FND

unread,
Jun 22, 2009, 2:13:12 AM6/22/09
to Tiddl...@googlegroups.com
> I was wondering since TinyTiddly is used where minimalization is
> desired if it would be feasible to access both TinyTiddly 2.4.3, and
> where it was needed, jQuery also from an external source.

Sure; it's always been possible to integrate libraries like jQuery (e.g.
via MarkupPreHead), so there's nothing stopping you taking the same
approach with TinyTiddly.


-- F.

Morris Gray

unread,
Jun 22, 2009, 7:03:14 AM6/22/09
to TiddlyWiki
On Jun 22, 4:13 pm, FND <F...@gmx.net> wrote:

> Sure; it's always been possible to integrate libraries like jQuery (e.g.
> via MarkupPreHead), so there's nothing stopping you taking the same
> approach with TinyTiddly.

Thanks FND, then I wonder since TW 2.5.0 is only 2.4.3 with jQuery if
there isn't an argument to keep TinyTiddly as 2.4.3 without the burden
of jQuery for those who don't need it. Of course later changes to
2.5.x may change this if the 2.4.3 portion is upgraded.significantly.

Morris

FND

unread,
Jun 24, 2009, 1:42:24 PM6/24/09
to Tiddl...@googlegroups.com
>> it's always been possible to integrate libraries like jQuery (e.g.
>> via MarkupPreHead), so there's nothing stopping you taking the same
>> approach with TinyTiddly.
>
> Thanks FND, then I wonder since TW 2.5.0 is only 2.4.3 with jQuery if
> there isn't an argument to keep TinyTiddly as 2.4.3 without the burden
> of jQuery for those who don't need it.

Good point!
However, the timing of this discussion was so that we now have the next
release, which is definitely worth upgrading to.

Unfortunately though, Saq doesn't have the time anymore to maintain
TinyTiddly. So unless someone steps up to take over, TinyTiddly probably
won't be upgraded for a while.


-- F.

wolfgang

unread,
Jun 25, 2009, 4:58:22 PM6/25/09
to TiddlyWiki
> Unfortunately though, Saq doesn't have the time anymore to maintain
> TinyTiddly. So unless someone steps up to take over, TinyTiddly probably
> won't be upgraded for a while.
>

Though I don't understand javascript, by using compression utilities
(*) I created an updated 'one file' Tinytiddly:

http://tinytiddly.tiddlyspot.com/

However, compression could have mangled some of the code and I have no
idea how to test it thoroughly, only imported MenuFlex into it and
after a first glance everything seems to work (despite some unsettling
error messages about 'malformed uri sequence' during importing).
Therefore, don't use this with important data without having made
backups first - and please report if it causes serious errors.

Also, before there was only one jsArea to externalize. Now there are
4:

jsArea
jsdeprecatedArea
jslibArea
jqueryArea

Does anybody know if combining them in one external twcore.js file -
or separating them as 4 distinct external .js files - would be more
advantageous?

regards..


(*) http://jsutility.pjoneil.net/
http://dean.edwards.name/packer/
http://compressorrater.thruhere.net/

wolfgang

unread,
Jul 4, 2009, 11:57:14 AM7/4/09
to TiddlyWiki
> jsArea
> jsdeprecatedArea
> jslibArea
> jqueryArea
>
> Does anybody know if combining them in one external twcore.js file -
> or separating them as 4 distinct external .js files - would be more
> advantageous?
>

Making the jquery part separate - so it could be left out, if one
doesn't uses TreeviewPlugin or isn't developing jquery plugins - seems
the way to go.

wolfgang

unread,
Jul 4, 2009, 3:21:04 PM7/4/09
to TiddlyWiki
> Making the jquery part separate - so it could be left out, if one
> doesn't uses TreeviewPlugin or isn't developing jquery plugins - seems
> the way to go.

I've been mistaken, with version 2.5.2 all these jsAreas have to be
included:

twcore.js
jsdeprecated.js
jslib.js
jquery.js

http://tinytiddly.tiddlyspot.com/

regards..

Tobias Beer

unread,
Jul 5, 2009, 1:23:46 PM7/5/09
to TiddlyWiki
Just that I understand the externalization right... was that simply a
matter of copy and paste into a new js(txt) file and creating a
script element in the main tiddlywiki html document referencing to it?
If that is so, is it possible to load js files into a tiddlywiki
without a page reload... simliar to how instant bookmarklets work?
Also, can plugins installed in tinytiddly be "externalized" as
well ...and if so, how? Hope I didn't overly drift off-topic.

Tobias.

FND

unread,
Jul 6, 2009, 4:36:48 AM7/6/09
to Tiddl...@googlegroups.com
Sorry for the late response - still working on that backlog...

> Though I don't understand javascript, by using compression utilities
> (*) I created an updated 'one file' Tinytiddly

Nicely done, Wolfgang! I appreciate the effort you're putting into this.
My concern is that such a manual approach is tedious and error-prone,
which is why, ideally, this process should be automated.
For example, jQuery provides both uncompressed and minified versions,
and I'm sure they use a script to create the latter.
Having said that, Cook supports compression, it's just not been used in
this context yet.

> compression could have mangled some of the code and I have no
> idea how to test it thoroughly

Indeed - while compression utilities should be fairly mature these days,
and errors would are likely to show up during start-up, there's no
guarantee that there isn't no subtle artifact leading to unexpected
behavior.
Thus both automated* and manual testing are recommended to ensure
everything works as expected.

> Does anybody know if combining them in one external twcore.js file -
> or separating them as 4 distinct external .js files - would be more
> advantageous?

It depends on why you're externalizing it in the first place.
If your only use case is providing these files for standard TiddlyWiki
documents, it's probably better to have them all in one monolithic file
(as that reduces the number of requests required to pull in the code).
However, you could adapt it to your particular use case - e.g. pulling
jQuery from the Google CDN to take advantage of caching.

> is it possible to load js files into a tiddlywiki without a
> page reload

Yes - see here:
http://groups.google.com/group/TiddlyWiki/msg/8de769e4d1ae2198

> Also, can plugins installed in tinytiddly be "externalized" as
> well ...and if so, how?

Not necessarily *all* plugins (see the message referenced above), but
many could be included that way. All it takes is for someone to provide
a .js file with the code, then they can be included using a SCRIPT tag.


-- F.


* cf. http://svn.tiddlywiki.org/Trunk/core/test/

Saq Imtiaz

unread,
Jul 6, 2009, 12:23:07 PM7/6/09
to TiddlyWiki

>
> Unfortunately though, Saq doesn't have the time anymore to maintain
> TinyTiddly. So unless someone steps up to take over, TinyTiddly probably
> won't be upgraded for a while.
>

Just to clarify: last summer it was agreed with Martin and Jeremy that
the core developers would be taking over maintenance and production of
TinyTiddly. Towards this end I spent a fair bit of time adding the
necessary features to Cook so that it could create TinyTiddly files as
part of the standard TiddlyWiki production process. (Cook is always
updated for the latest TW releases as necessary since it is the
official build tool and everyone one reliant, using it for TinyTiddly
means little to no maintenance cost for the core developers.)

Having done so I haven't noticed that they've started using it and
sadly I don't have time to keep it up to date myself.
Saq
Reply all
Reply to author
Forward
0 new messages