TiddlyWiki & Strophe.js = XMPP Wiki

132 views
Skip to first unread message

zip_random

unread,
May 30, 2011, 1:00:41 PM5/30/11
to tiddly...@googlegroups.com
hello everyone,

i just want you to know about a little project i`ve been spending the
last weeks with.

With Strophe.js, a wonderfull library for XMPP over HTTP in Javascript I
hacked a Jabber client and a PubSub Client into TiddlyWiki. I was
dreaming of TiddlyWIki as a Client for a distributed, open social
Networks, using XMPP and PUBSUB. The Plugin Architecture of TiddlyWiki
could make such a project very flexible (you don't need to programm a
Calendar, use Reminderplugins, use RevisionsPlugin and so on), but on
the other hand the whole javascript thing is a big security problem. You
could also use tiddlywiki locally to sync your Social information ...

The code is badly written, because i'm not an experienced programmer and
this was my first JS project. I split the code, inserted some comments
and created a git repository:

https://github.com/ziprandom/boshPlugins

i also put the pre-Alpha thing to tiddlyspot, so you can play around
with it, and tell me, what you think of it.

http://xmppwiki.tiddlyspot.com (i don't guarantee for security)

unfortunately my plans came to a halt, as ejabberd's pubsub server is
missing some key functionalities needed for a social network, namely:
publisher verification (items posted to a pubsub node are posted
anonymously, author tags can easily be faked). and the publish-only
affiliation, allowing someone to post, but not to edit or view (INBOX)
items on a node.

i hope the buddycloud channel-server will soon improve.

yours
ziprandom.

Message has been deleted

Yakov

unread,
Jun 8, 2011, 1:15:22 PM6/8/11
to TiddlyWikiDev
Hi, ziprandom!

So basically you develop an XMPP client with a TW-page, right? Sounds
very intriguing. I see an error notification in loading
boshPluginPubSub when I open the page with Opera and an error in
bosh_affiliationsManager in FireFox. Anyway, I don't have an XMPP
account now, so I probably join testing later.

An important quesion: "how much" standalone your application is? I
mean, if I have a mobile phone with just browser, will this work?

Anyway, welcome to comunity and good luck with the project!
Yakov.

zip_random

unread,
Jun 9, 2011, 5:09:25 AM6/9/11
to tiddly...@googlegroups.com
hi yakov,

On 08.06.2011 19:15, Yakov wrote:
> Hi, ziprandom!
>
> So basically you develop an XMPP client with a TW-page, right?

yes.

> Sounds
> very intriguing. I see an error notification in loading
> boshPluginPubSub when I open the page with Opera

due to some JS issues ( i guess that's easys solveable to someone who
knows more about JS in the different browsers) opera and safari (webkit
i guess) doesn't work right now.

> and an error in
> bosh_affiliationsManager in FireFox.

thats ok, as the affiliationsmanager needs a node, and you need to have
the rights to see & change the affiliations, the whole
affiliationsmanager is just a quick hack ...


> Anyway, I don't have an XMPP
> account now, so I probably join testing later.

i encourage you to do so, you will nee a server, that supports bosh, or
some kind of gateway (PunJab). this project is kind of difficult to
explain, as most of the XMPP guys and girls don't understand what
TiddlyWiki is and so don't see the potential for a standalone wiki that
syncs you IM + Social Stuff and the TW People maybe don't know what XMPP
is or can do, except for chatting (->PubSub).


> An important quesion: "how much" standalone your application is? I
> mean, if I have a mobile phone with just browser, will this work?

theoretically it should. i tested it on an android tablet, but the
browser gives me the JS errors you saw in Opera.The TW file (which
conatins the strophe.js & the boshPlugin code) and firefox in
combination with a bosh-enabled XMPP Server is all you need. I already
use it for chatting and a small blog ...


> Anyway, welcome to comunity and good luck with the project!
> Yakov.
>

thxx :-)

zip.

zip random

unread,
Jun 11, 2011, 12:26:08 PM6/11/11
to tiddly...@googlegroups.com
Re: [twdev] Re: TiddlyWiki & Strophe.js = XMPP Wiki

Yakov

unread,
Jun 13, 2011, 2:14:35 PM6/13/11
to TiddlyWikiDev
> i encourage you to do so, you will nee a server, that supports bosh, or
> some kind of gateway (PunJab). this project is kind of difficult to
> explain, as most of the XMPP guys and girls don't understand what
> TiddlyWiki is and so don't see the potential for a standalone wiki that
> syncs you IM + Social Stuff and the TW People maybe don't know what XMPP
> is or can do, except for chatting (->PubSub).

Ok, could you briefly explain what is PunJab or just where I should
sign up to get an account and start testing? Until the 28th of june I
don't have time to learn these things extensively, but can get some
room for testing if start this quickly, "without further ado".

zip random

unread,
Jun 14, 2011, 8:13:15 AM6/14/11
to tiddly...@googlegroups.com
ok, a quick walkthrough:

1. get yourself a jabber account on a server, that supports bosh (XML Streams over HTTP):
2. register and connect using an normal jabber client (pidgin, adium, psi, kopete) an add some buddys to your contact list (alternative jabber accounts of yours, you will need at least one).
3. go to xmppwiki.tiddlyspot.com an log in: the bosh-server url for jabber.rueckgr.at is:
http://jabber.rueckgr.at/http-bind/ (this should be https, but it's not my server :-) )
provide your username and password and click connect (use firebug plugin for firefox in order to see the connection stream in the firebug console).
4. the tiddlywiki connects to the server, retrieves the contact list, loads the icons and displays them in the main menu. as soon as your connected you can chat with buddies (click on the icon) or access pubsub nodes (i added a shortcut for sh...@jabber.rueckgr.at) when you click on "create dashboard" tiddlywiki attempts to create a node which has the jid: y...@yourserver.org//home (this should be the microblog namespace y...@yourserver.org/urn:xmpp:microblog:0 in the future ...).

play around with the node stuff, much of it is ready but not worked into a nice user interface nor a solid use-model.

in the moment i lack the time to finish it, therefore i wish for a broader community and more experienced JS programmers.

yours
zip.

Yakov

unread,
Jun 14, 2011, 4:19:59 PM6/14/11
to TiddlyWikiDev
Right. I've registered as Ya...@jabber.rueckgr.at , if you provide
your JID, I'll add you as well.

Quick notes for better testing experience:
* when then chat window is opened, cursor is focused in the chat area,
not in the "type" area -- this should be better switched
* somewhy browser (FF) doesn't remember cookies for the server/JID/
pswd values, this is also somewhat annoying
* if I send a message via ctrl+enter, that's ok, but if I click
"send", the "type" area is not cleaned

Right. So I've managed to sent a message from tw-interface to a
messanger and back. That's amazing! Though, there's a mess with these
sending to me from me in two interfaces and contacts of my different
accounts in my different accounts :)

I think the second step in here should be introducing a simple contact
managing system within the tw-interface, so that it can be called a
messanger with the basic abilities.

Two general questions:
1) do you know any servers which do use https?
2) does this engine allow to communicate only with XMPP accounts or
there's a possibility to get messages from, say, ICQ contacts?
(perhaps some servers provide such a possibility?)

Anyway, good start!

zip random

unread,
Jun 15, 2011, 7:11:24 AM6/15/11
to TiddlyWikiDev
On 14 Jun., 22:19, Yakov <yakov.litvin.publi...@gmail.com> wrote:
> Right. I've registered as Ya...@jabber.rueckgr.at , if you provide
> your JID, I'll add you as well.
>
> Quick notes for better testing experience:
> * when then chat window is opened, cursor is focused in the chat area,
> not in the "type" area -- this should be better switched
> * somewhy browser (FF) doesn't remember cookies for the server/JID/
> pswd values, this is also somewhat annoying
> * if I send a message via ctrl+enter, that's ok, but if I click
> "send", the "type" area is not cleaned

i'll improve that as soon as i finde the time
>
> Right. So I've managed to sent a message from tw-interface to a
> messanger and back. That's amazing! Though, there's a mess with these
> sending to me from me in two interfaces and contacts of my different
> accounts in my different accounts :)
>
> I think the second step in here should be introducing a simple contact
> managing system within the tw-interface, so that it can be called a
> messanger with the basic abilities.
some of that functionality already exists, but hidden somwhere, you
have macros to add a contact, subscribe its presence and even
approving requests i guess. but keep in mind, that my main goal was
not to have a jabber messenger (there are plenty out there) but to
make use of the PubSub capabilities of XMPP Servers. Did you test that
(posting to Dashboard)?
>
> Two general questions:
> 1) do you know any servers which do use https?
i sent one to your JID ...
> 2) does this engine allow to communicate only with XMPP accounts or
> there's a possibility to get messages from, say, ICQ contacts?
> (perhaps some servers provide such a possibility?)

there are transports for many other services ICQ, MSN ... but these
have to be implemented server side and i don't focus on that, as i'm
comfortable staying inside XMPP which hast so many functionalities
(you could for example use PubSub Nodes & TW to implement something
like Etherpad - Collaborative editing over XMPP...)

>
> Anyway, good start!
:-)

Yakov

unread,
Jun 16, 2011, 7:19:46 AM6/16/11
to TiddlyWikiDev
> some of that functionality already exists, but hidden somwhere, you
> have macros to add a contact, subscribe its presence and even
> approving requests i guess.

Sounds strage.. do you mean that you have implemented those, but don't
remeber what are names of macros?
Perhaps you'd better add those

/*{{{*/
...
/*}}}*/

wrappings around the code in tiddlers so that it would be easier to
read (you know, indents etc).

> but keep in mind, that my main goal was
> not to have a jabber messenger (there are plenty out there) but to
> make use of the PubSub capabilities of XMPP Servers. Did you test that
> (posting to Dashboard)?

Yeap, I tried this but none of the "show Dashboard" buttons worked
(including those which appear when click on user icons).

> there are transports for many other services ICQ, MSN ... but these
> have to be implemented server side and i don't focus on that, as i'm
> comfortable staying inside XMPP which has so many functionalities
> (you could for example use PubSub Nodes & TW to implement something
> like Etherpad - Collaborative editing over XMPP...)

So, this depends on the server that I choose, just like the http/
https, right? What's the main feature because of which you prefer
jabber.rueckgr.at?

Ha, Etherpad looks very nice! Thanks)

zip random

unread,
Jun 17, 2011, 12:17:36 PM6/17/11
to TiddlyWikiDev
hi Yakov,

i worked in your interface suggestions ...

On 16 Jun., 13:19, Yakov <yakov.litvin.publi...@gmail.com> wrote:
> > some of that functionality already exists, but hidden somwhere, you
> > have macros to add a contact, subscribe its presence and even
> > approving requests i guess.
>
> Sounds strage.. do you mean that you have implemented those, but don't
> remeber what are names of macros?
> Perhaps you'd better add those

no, i implemented those in a very basic way:
<<bosh_presenceSubscribe>> -- alow someone to subscribe your presence
(see your online)
<<bosh_addContact>> -- add someone to your roster, and optionally try
to subscribe his presence.

>
> /*{{{*/
> ...
> /*}}}*/
>
> wrappings around the code in tiddlers so that it would be easier to
> read (you know, indents etc).
>
> > but keep in mind, that my main goal was
> > not to have a jabber messenger (there are plenty out there) but to
> > make use of the PubSub capabilities of XMPP Servers. Did you test that
> > (posting to Dashboard)?
>
> Yeap, I tried this but none of the "show Dashboard" buttons worked
> (including those which appear when click on user icons).

because the nodes don't exist, you have to create them first ("how to
begin" section of the default tiddler)
>
> > there are transports for many other services ICQ, MSN ... but these
> > have to be implemented server side and i don't focus on that, as i'm
> > comfortable staying inside XMPP which has so many functionalities
> > (you could for example use PubSub Nodes & TW to implement something
> > like Etherpad - Collaborative editing over XMPP...)
>
> So, this depends on the server that I choose, just like the http/
> https, right? What's the main feature because of which you prefer
> jabber.rueckgr.at?

it was the one i found out on the net, which had http-bind, and was
quite public ...

>
> Ha, Etherpad looks very nice! Thanks)
XMPP is nice!

zip.
Reply all
Reply to author
Forward
0 new messages