Skip to main content

What is the best AJAX library for Django?


Which and why is the best AJAX library for django?

Which one has the biggest database of tutorials, books and most detailed documentation?





Which one is the easiest to work with?

Which one is in early developing stage but may become the one?





Regards,

chriss


Source: Tips4allCCNA FINAL EXAM

Comments

  1. I highly recommend JQuery. There are several tutorials on how to implement it.

    http://lethain.com/entry/2007/dec/11/two-faced-django-part-5-jquery-ajax/

    http://lethain.com/entry/2007/dec/01/using-jquery-django-autocomplete-fields/

    http://vincentxu.net/minimal-ajax-in-django-with-jquery-post

    NOTE: Microsoft also announced a while ago that JQuery would be the official client-side framework for ASP.NET MVC, so its good to know regardless of what server side framework you're using.

    ReplyDelete
  2. Checkout Dajax:


    Dajax Project

    Easy to use AJAX libraries for Django

    Fast, easy and lightweight libraries
    to implement AJAX inside your django
    projects. Ready to use in 5 minutes.

    Dajax is a powerful tool to easily and
    super-fastly develop asynchronous
    presentation logic in web applications
    using python and almost no lines of JS
    source code.

    It supports up to four of the most
    popular JS frameworks: Prototype,
    jQuery, Dojo and mootols.

    ReplyDelete
  3. Also keep in mind that the newest Django books (Python Web Development with Django, Learning Website Dev with Django) use jQuery in their tutorials.

    ReplyDelete
  4. I've successfully used jquery, YUI and Dojo on different django projects. There's nothing about any of those that made it better to use with django specifically. I agree with jpartogy that mochikit may fit django more than any other just because of the "pythonic" (twisted-like) API. It really depends on what you are looking for in an ajax framework.

    Personally I like what jQuery can do with given amounts of code but the greatest challenge in writing jQuery code is making it readable.

    YUI is much more verbose than other frameworks because it sets a convention for using namespaces, but there are shortcuts to write less code and it avoids trying to make javascript look like something else.

    Dojo tries to make javascript look like Java and from my experience is pretty slow. It has some nice widgets and a javascript implementation of the django templating language (which is pretty useful even outside of django projects).

    I personally avoid prototype and mootools because they can break other javascript code (or vice versa).

    If you are new to javascript and ajax I'd recommend jQuery because it's the easiest to start with. But I don't expect any js framework to be integrated with django mostly because there's really no need for that.

    ReplyDelete
  5. +1 to Soviut and Daniel for good answers. Jquery is a nice framework. Besides Pinax a couple other "big" Django applications use it: Satchmo and Review Board (which switched from another framework... mootools IIRC).

    Also popular is rolling your own Javascript without using any framework, for example the Django admin.

    The only other suggestion I might make is that, if you are a very experienced Pythonhead, then you might like mochikit which comes under some criticism for being too 'pythonic'.
    It seems to be the framework of choice for Turbogears but I personally haven't seen any Django projects using it.

    ReplyDelete
  6. Okay this might be subjective because the definition of 'best' can mean different to each individual. But since you are working with Django, that means you will get your hands down with Python syntax. One notable Javascript library that doesn't get exposed too much is Mochikit. The good thing about it is it has syntax that is familiar to Python programmer (because the creator is a Python programmer). It has quite nicely written down documentation as well. TurboGears out-of-the-box supports Mochikit.

    ReplyDelete
  7. The phrase "Best AJAX Library" is highly subjective and depends on personal preferences, existing know how, requirements of the work etc. etc.

    While I prefer jQuery for (almost) everything, I know some people whio swear by Dojo or ExtJS. There might be case where you want to use jQuery but requirements might be dictate that you use ExtJS.

    All said. Use jQuery. jQuery rocks ;)

    ReplyDelete
  8. Django doesn't really tie in with the client side. Use whatever you're comfortable with. Django plays well with everything in that area, because you just write it in the templates.

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex