7

Django And Ajax

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Django And Ajax
Page 2: Django And Ajax

AJAX

● background conversation with server to make application more interactive– GUI actions are independent from calls to server– Hence: Asynchronous JAvaScript XML

● Enables richer web applications with widgets &c

Page 3: Django And Ajax

AJAX means pain

● Especially for server-side developers● But, as the lead of Google Maps once said:

– “If it doesn't kill you, it makes you stronger”

Page 4: Django And Ajax

Demo application

Page 5: Django And Ajax

Django & AJAX wrap-up

● Main type of integrations– Call a Django service or view in the background

● Used JQuery. Many other frameworks (Prototype, Mootools, &c) offer same functionality – wrapper around underlying XMLHttpRequest

– Use Django serializers, e.g., directly into JSON– Bind widgets to Django-based JSON view as data-

source– Add client-side logic, e.g., chaining select boxes in

forms

Page 6: Django And Ajax

Links

● Source code (q&d quality):– http://code.google.com/p/ppl-search

● Run the demo:– http://ppl-search.appspot.com

● AppEngine Django Helper:– http://code.google.com/p/google-app-engine-django/

● Frameworks & API's used:– JQuery, YUI, JIT, Mootools, Twitter search

● Tools– FireBug

Page 7: Django And Ajax

Send us your questions

● Alex Arshavski– [email protected]– http://twitter.com/alexarsh

● Udi h Bauman– [email protected]– http://dibau.wordpress.com– http://twitter.com/dibau_naum_h