views:

376

answers:

6

Hi All,

I am building a web service that will make heavy use of cross-domain GET and POST data, and then update some lightbox or similar windows on the client.

Is there one JavaScript framework that is better at this, or more importantly, a framework which I should avoid?

  • I want to be able to put controls in the boxes. Really sexy boxes would be nice. These will be updated without page reloads.

  • Framework needs to be really good at the cross-domain stuff. I need good error trapping and process confirmation so that I can show the user that his connections are active.

I can use more than one framework if necessary. The bandwidth might be justified if one framework was really good at cross-domain and another was really good at windows/boxes.

Thanks,

EDIT: With regard to which frameworks to avoid, I am thinking in terms of gotchas.

A: 

I would say JSONP from jQuery, but lately I've seen this video from Google for cross domain calls.

Elzo Valugi
+2  A: 

I would suggest using jQuery as it's probably one of the most widespread (if not "the") javascript frameworks. There are numerous jQuery addons for sexy boxes (you just have to google), you can have it to work cross-domain

As for which frameworks to avoid: the ones that don't have an active developer community behind them, just see how often releases and fixes are released.

Gergely Orosz
This question is old, but after a few months now of working with jQuery, I believe this is the correct answer. When working cross-domain (at least for my project) manipulating html formatted by others is a necessity, and jQuery excels at this with its element selectors.
But jQuery has nothing that helps with cross-domain issues except for a basic support for JSONP. Did you check out the easyXDM library?
Sean Kinsey
+1  A: 

My favourite Javascript Framework is YUI 2.

It has a very good documentation, is actively developed since about 3 years by a big company (YAHOO). The widgets provided with the library are well structured and can be easily configured. Moreover I had never the need to rely on any 3rd party plugin (except once I needed an accorion widget), all what I need comes with the YUI or what is also very important: it can be done with what the library offers. That is something I really appreciate. I used it in all my projects since 2008 and I never got disappointed.

The packages which are especially interesting for you:

The Connection Manager: http://developer.yahoo.com/yui/connection/
and the Overlay Component: http://developer.yahoo.com/yui/container/overlay/index.html

Max
This looks interesting. As you said, very good documentation. The project page has lots of examples and this really helps when choosing a product.
I agree, it looks like it will be worth a look.
Russell
A: 

Another alternative is Dojo (documentation found here).

Biggest problems I've had with Dojo:

  1. Big changes across versions
  2. Relatively mediocre documentation

In its defense, I will say that Dojo's xhrPost and xhrGet commands are pretty solid, if that's all you're using the framework to do.

One of its libraries, Dijit, also has some neat looking widgets - only some of which work as advertised (i.e. "out of the box").

Nevertheless, it's far better than writing your own cross-browser JavaScript.

Good luck!

Lee Fogel
A: 

For the cross-domain part I would recommend easyXDM.

Demos of this can be viewed here, I'm guessing this example is fitting for your application

Sean Kinsey
A: 

I recommend jQuery, it's probably the most popular one out there.

Adam