Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dajaxproject.com
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jorge Bastida
May 09, 2011
Technology
1
150
Dajaxproject.com
Dajaxproject.com, 5m Lighting talk. Djangocon Europe, Amsterdam (Jun. 2011)
Jorge Bastida
May 09, 2011
Tweet
Share
More Decks by Jorge Bastida
See All by Jorge Bastida
Streetlife Analytics
jorgebastida
1
270
Some non-obvious tips… Scaling Up
jorgebastida
1
280
La historia de todo lo que pudo salir mal... pero salió bien
jorgebastida
8
970
Open Source Modern Web Development
jorgebastida
26
2.6k
Glue
jorgebastida
7
760
Python + Django
jorgebastida
19
2.6k
Things that make me happy
jorgebastida
13
1.3k
Other Decks in Technology
See All in Technology
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
160
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.2k
Greatest Disaster Hits in Web Performance
guaca
0
200
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
310
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
210
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
3k
20260204_Midosuji_Tech
takuyay0ne
1
140
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
340
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
180
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
920
Digitization部 紹介資料
sansan33
PRO
1
6.8k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
170
Bash Introduction
62gerente
615
210k
WCS-LA-2024
lcolladotor
0
450
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Building Adaptive Systems
keathley
44
2.9k
Scaling GitHub
holman
464
140k
4 Signs Your Business is Dying
shpigford
187
22k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
Transcript
dajaxproject.com Jorge Bas*da @jorgebas*da jorgebas*da.com
dajaxproject.com?
dajaxproject.com • Set of easy to use AJAX libraries for
django. • django-‐dajaxice • communica*on core. • send data to your browser asynchronously. • django-‐dajax • manipulate the DOM using python.
@github Forks Watchers django-‐dajax 6 110 django-‐dajaxice 10 95 hKps://github.com/jorgebas*da/django-‐dajax/
hKps://github.com/jorgebas*da/django-‐dajaxice/
@github Forks Watchers django-‐dajax 6 110 django-‐dajaxice 10 95 hKps://github.com/jorgebas*da/django-‐dajax/
hKps://github.com/jorgebas*da/django-‐dajaxice/ It’s not enormous, but I’m really happy :)
dajaxice aims • Uniform communica*on between the client and the
server. • JS Framework agnos:c. • No Prototype, jQuery... required. • Presenta*on logic outside the views. • No presenta*on code inside ajax func*ons. • Crossbrowsing ready.
STFU... Show me the code
Example from django.utils import simplejson from dajaxice.decorators import dajaxice_register @dajaxice_register
def my_example(request): return simplejson.dumps({'message':'Hello World'})
Example from django.utils import simplejson from dajaxice.decorators import dajaxice_register @dajaxice_register
def my_example(request): return simplejson.dumps({'message':'Hello World'}) Yes. It’s a function that returns json
Example function on_whatever(){ Dajaxice.example.my_example(my_js_callback); }
Example function on_whatever(){ Dajaxice.example.my_example(my_js_callback); } app name function name callback
Example function my_js_callback(data){ alert(data.message); }
Example function my_js_callback(data){ alert(data.message); } callback your stuff
Installa:on {% load dajaxice_templatetags %} <html> <head> <title>My base template</title>
... {% dajaxice_js_import %} </head> ... </html>
Installa:on {% load dajaxice_templatetags %} <html> <head> <title>My base template</title>
... {% dajaxice_js_import %} </head> ... </html> automagically add the required js * * It could/should be served sta*cally for produc*on.
And django-‐dajax?
dajax = sugar to dajaxice
django-‐dajax ✦ Manipulate the DOM through python. ✦ Nearly 0
js knowledge required. ✦ Supports some JS frameworks like...
django-‐dajax ✦ Manipulate the DOM through python. ✦ Nearly 0
js knowledge required. ✦ Supports some JS frameworks like... coupling boooo
Internally
the code from dajax.core.Dajax import Dajax def assign_test(request): dajax =
Dajax() dajax.assign('#list li','innerHTML','Hello!') dajax.add_css_class('#list li','new') ... return dajax.json()
the code from dajax.core.Dajax import Dajax def assign_test(request): dajax =
Dajax() dajax.assign('#list li','innerHTML','Hello!') dajax.add_css_class('#list li','new') ... return dajax.json() your actions
the code function on_whatever(){ Dajaxice.app.assign_test(Dajax.process); }
the code function on_whatever(){ Dajaxice.app.assign_test(Dajax.process); } Dajax callback
DEMO
Thanks Jorge Bas*da @jorgebas*da jorgebas*da.com