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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jorge Bastida
May 09, 2011
Technology
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Dajaxproject.com
Dajaxproject.com, 5m Lighting talk. Djangocon Europe, Amsterdam (Jun. 2011)
Jorge Bastida
May 09, 2011
More Decks by Jorge Bastida
See All by Jorge Bastida
Streetlife Analytics
jorgebastida
1
280
Some non-obvious tips… Scaling Up
jorgebastida
1
290
La historia de todo lo que pudo salir mal... pero salió bien
jorgebastida
8
990
Open Source Modern Web Development
jorgebastida
26
2.6k
Glue
jorgebastida
7
780
Python + Django
jorgebastida
19
2.6k
Things that make me happy
jorgebastida
13
1.3k
Other Decks in Technology
See All in Technology
2026TECHFRESH畢業分享會 - AI 時代的人生存檔點
line_developers_tw
PRO
0
590
個人最適 から 全体最適 へ AI情報共有会・AIギルド・AI-DLC で進める カンリーの組織展開
rfdnxbro
0
2.1k
ルールやカスタム機能、どう活かす?ハンズオンで体感するIBM Bobの出力コントロール
muehara
1
110
Rancherの紹介&Update情報(RancherJP Online Meetup #09)
yoshiyuki_kono
0
140
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
160
[モダンアプリ勉強会]今更聞けないGit/GitHub入門
tsukuboshi
0
330
失敗を資産に変えるClaude Code
shinyasaita
0
180
なぜ Platform Engineering の土台に Kubernetes を選ぶのか
r4ynode
1
520
価格.comをAI駆動で全面刷新する ー 30年分の技術的負債を返し、次の30年の土台をつくる ー / AI Engineering Summit Tokyo 2026
tkyowa
53
59k
Dario Amodi『Policy on the AI Exponential』を理解する
nagatsu
0
210
AWSシリコン最前線 〜AI時代のチップ選択を読み解く〜
htokoyo
2
350
作って終わりにしない タイミーのセマンティックレイヤー育成の現在地
chanyou0311
3
2k
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Designing Experiences People Love
moore
143
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
170
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
230
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Navigating Weather and Climate Data
rabernat
0
220
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
200
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