AJAX

1 view
Skip to first unread message

angel

unread,
Oct 30, 2006, 3:19:04 AM10/30/06
to Django users
Hi all,

I know there are various topics on this subject, but my concrete
question is: How mature is the ajax support in Django at the moment ?
If i download django now , what kind of ajax support can it offer, in
terms of helpers , etc , and how stable is this? (as compared to ROR
for example). We are currently evaluating the two frameworks to be used
in a relatively high-traffic and not so simple (as opposed to some apps
from 37signals) , and since all of the performance / extensibility /
rich UIs considerations are very important, still haven't arrived at a
conclusion. Thanks

Regards,
Angel

Waylan Limberg

unread,
Oct 30, 2006, 2:11:47 PM10/30/06
to django...@googlegroups.com

Short answer: Pick the JS toolkit of your choice (Dojo, MochiKit,
Prototype, YUI among others) thanks to Django's built in serialization
(XML or JSON).

For a complete answer see:
http://www.b-list.org/weblog/2006/07/02/django-and-ajax

And for some examples see the wiki and these articles:
http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-part-1
http://www.b-list.org/weblog/2006/08/05/django-tips-simple-ajax-example-part-2


--
----
Waylan Limberg
way...@gmail.com

James Bennett

unread,
Oct 30, 2006, 2:17:14 PM10/30/06
to django...@googlegroups.com
On 10/30/06, angel <atto...@gmail.com> wrote:
> I know there are various topics on this subject, but my concrete
> question is: How mature is the ajax support in Django at the moment ?
> If i download django now , what kind of ajax support can it offer, in
> terms of helpers , etc , and how stable is this?

Django makes it easy to serialize objects for responses to
XMLHttpRequest, because that's an important server-side thing. Even if
you don't use the serializers, Django makes it ridiculously easy to
construct responses in different formats depending on whether you're
responding to an "AJAX request" or a "normal" request.


Personal opinion follows:

Django has never included and, hopefully, will never include "AJAX
helpers" of any sort.

It is my firm belief that there are lots and lots of really good
standalone JavaScript toolkits out there which will serve you far
better in the long run than having your server-side framework try to
do magic tricks and write your code for you.

It is also my firm belief that if you choose a framework based on what
magic JavaScript tricks it can do, you should expect to get your clock
cleaned by competitors who can roll their own magic on the fly --
they'll be able to do it faster and better every time.


--
"May the forces of evil become confused on the way to your house."
-- George Carlin

mail....@gmail.com

unread,
Oct 30, 2006, 4:49:00 PM10/30/06
to Django users
Personally, I hope that Django keeps the toolkit-independent philosphy.
No matter which one was picked I'd probably have some issues with it,
and one of the things that drew me to Django in the first place was the
ability to do things how I wanted to meet MY needs. That might be
toolkit A, it might be toolkit B, or it might be rolling my own
function for the particular need.

And it really is super easy to work with "ajax" requests.

>From what I've heard of ROR's built in javascript helpers, they would
drive me mad.

Reply all
Reply to author
Forward
0 new messages