On Monday, January 28, 2013 12:34:37 PM Dave Cridland wrote:
> So my concept (which nobody else is interested in, so thanks) was not to
> provide "full" XMPP support exposed to every web page - I think that'd be a
> disaster, and isn't actually needed anyway.
>
> Instead I was after a way to get at the pubsub service and other
> fundamental constructs and expose those; so you wouldn't be able to write a
> MUC client in Javascript, but you could do PubSub - albeit without having
> to read XEP-0060 at all. I didn't think that even IM was interesting
> enough, but I could be persuaded otherwise.
>
> So far, this aligns well with what you're saying - you wouldn't be using
> your REST API to send raw stanza data, but to provide a gatewayed mechanism
> into XMPP protocol constructs.
Ah, the endless struggle about whether the browser should be a true XMPP
endpoint or not. I'm generally in the camp that it should not be, and feel
that the best way to use XMPP on the web is to wrap it entirely behind a
specialized REST API (aka not actually using XMPP on the web :)). Buddycloud
is a good example of this approach. I know there are people not satisfied with
this answer, though, so I'm trying to explore a little bit...
An API for just pubsub is interesting. Certainly people using socket.io,
juggernaut, etc, are only after pubsub. With the right JS library, and an easy
way to submit a JSON payload on the server side to the pubsub service, I think
we'd have a compelling offer to this audience.
> it's allowing them to deal with the protocol *without* having to mangle
> data for transmission - and I think that's the key feature of JSON people
> actually want.
>
> So this gives you something like:
>
> <object xmlns='urn:xmpp:mld'>
> <array name='foo'>
> <string>First string in array foo</string>
> </array>
> <boolean name='done'>true</boolean>
> </object>
>
> Which corresponds precisely to:
>
> {"foo":["First string in array foo"],"done":True}
Yup, this would work just as well.
Justin