3 ms·
Dajax: An easy to use ajax library for Django
- jpeterson 17y agoMaybe this is a dumb question, but why do we need AJAX libraries? The methods in current JavaScript frameworks like Prototype, jQuery, et. al. make AJAX dead simple to begin with.
- coconutrandom 17y agowell, this is the first I've heard of this project. But looking at the example from the link, it has taken a lot of the wheel that everyone has to make when using [js framework of choice] for ajax and packaged it nicely to let you get on with the important parts of your project.
- mace 17y agoIt is more of an Ajax framework than library. It allows you to write Python code in your Django apps to support Ajax requests. On the client-side, requests are made through a wrapper which can use the Prototype or jQuery JS libraries. I believe it is closer to Pyjamas (http://code.google.com/p/pyjamas/ http://code.google.com/p/pyjamas/) than jQuery.
- jonknee 17y agoThat's ugly to say the least... You're way better sticking with something like jQuery.
- mrtron 17y agoIt is unfair at the least to compare this to jQuery. This library attempts to bridge the gap between jQuery and Django for AJAX calls by being in between. If you mean you are better sticking with raw Django views and jQuery AJAX calls, that could be true. I was planning on writing a few helper functions for this myself as a lot of my AJAX work is getting repetitive and could be refactored, so I will at least read through before passing judgement.
- jonknee 17y agoYes, I mean sticking with Django and jQuery. I think it's really ugly to have DOM stuff in your view functions.
- jbox 17y agoThere be dragons in the Python: http://code.google.com/p/dajaxproject/source/browse/trunk/dajax/views.py#6 http://code.google.com/p/dajaxproject/source/browse/trunk/da... If all that importing is really necessary then you might want to check out Django's new preferred import method, importlib, it might clean that up a bit: http://code.djangoproject.com/ticket/8193 http://code.djangoproject.com/ticket/8193 And here in the J/S - lots of evals - is that really necessary?: http://code.google.com/p/dajaxproject/source/browse/trunk/dajax/templates/dajax/jquery.dajax.core.js#8 http://code.google.com/p/dajaxproject/source/browse/trunk/da...