views:

508

answers:

5

Hi there,

Is there such a thing as publish and subscribe for use with jquery to send msgs from 1 javascript page to another.. Using the same idea behind ajax publish and subscribe?

I would like to use the pattern for communication between pages, i have been using a javascript framework lately but recently converted back to jquery and would love to continue using this.

Any ideas where i should start? and which implementation to use if more than 1 exists..

Thanks

A: 

jQuery is just a library providing set of utility functions. It is not a programming language. It is not Ajax.

Ajax is a design pattern. It is not a programming language. It is not a library.

Ajax publish-subscribe is just a more specific design pattern that uses the Ajax pattern.

There is no reason it can't be implemented using jQuery.

David Dorward
A: 

I think you're looking for an implementation of the bayeux protocol written in jquery.

A comet plugin that uses the bayeux protocol can be found here

Steerpike
+1  A: 

jQuery is a simple JS toolkit that makes working with the DOM easier.

What you need is something like strophe. It uses XMPP via BOSH. There is a video, where the creator describes it.

Another option is the Bayeux protocol. There are implementations in Dojo and jQuery.

Emil Ivanov
A: 

Hi :

You are trying to use the observer pattern to synch the UI? I think this should help you

Have a look at the code behind
basically when you click on the check boxes on top the behaviour of the link changes the code is very small I love it

Cheers

Miau
A: 

Check out http://laharsub.codeplex.com. This is an open source project that provides publish/subscribe capability using HTTP APIs and comes with a jQuery extension that provides usable OM for Ajax applications.

Tomasz Janczuk