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
Architecture en Webservice avec Django
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ordoquy Xavier - Linovia
October 26, 2013
Technology
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Architecture en Webservice avec Django
Ordoquy Xavier - Linovia
October 26, 2013
More Decks by Ordoquy Xavier - Linovia
See All by Ordoquy Xavier - Linovia
SQLAlchemy - un ami qui vous veut du bien
xordoquy
0
21
pycon.fr 2018 - Django REST framework workshop
xordoquy
0
350
mauvaises bonnes idées pour REST
xordoquy
1
410
Authentication and Permissions with Django REST framework
xordoquy
0
200
Buildbot 0.9
xordoquy
0
110
Performances Django REST framework - DjangoCong 2016
xordoquy
0
130
Présentation de l'architecture REST - meetup Django Paris
xordoquy
0
110
Django REST framework workshop @Djangocon Europe 2015
xordoquy
0
130
Django REST framework - DjangoConG 2015
xordoquy
3
150
Other Decks in Technology
See All in Technology
しくみを学んで使いこなそう GitHub Copilot app
torumakabe
2
290
CIで使うClaude
iwatatomoya
0
290
Making sense of Google’s agentic dev tools
glaforge
1
280
【Claude Code】鹿野さんに聞く 私の推しの並行開発環境 大公開 / claude-code-parallel-2026-07-15
tonkotsuboy_com
12
8.6k
関数型の考えを TypeScript に持ち込んで、テストしやすい純粋関数を増やす / Pure at the Core, Effects at the Edge: Bringing Functional Thinking into TypeScript
kaminashi
2
130
Amplify Gen2でbackend.tsにCDKを定義する/しない事によるCDKの挙動の違いとユースケース
smt7174
1
390
シンガポールで登壇してきます
yama3133
0
240
公式ドキュメントの歩き方etc
coco_se
1
120
Devsumi 2026 Summer 人もAIも使える共通基盤を事業の加速装置にする~デザインシステム運用に学ぶ組織レバレッジ~ 渡辺 凌央
legalontechnologies
PRO
1
230
ruby.wasmとPicoRuby.wasmに対応した仮想DOMライブラリを作ってる話 #kaigieffect_kaigi
sue445
PRO
0
150
見守りエージェントを作ってみた(ローカルLLM + Hermes Agent)
happysamurai294
0
110
AI Coding Agent時代のcdk-nagガードレール 〜組織ルールを強制CIで守り抜く設計の挑戦〜
mhrtech
3
390
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
360
It's Worth the Effort
3n
188
29k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Designing Powerful Visuals for Engaging Learning
tmiket
1
450
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
350
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Making the Leap to Tech Lead
cromwellryan
135
10k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
420
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Transcript
Architecture en Webservices avec Django Xavier Ordoquy Linovia
Freelance! (since 2004) Dev Python Dev Django! (Backend) Mainteneur Raven
(Sentry) Ancien contributeur ! PyGTK Contributions! diverses irc: Linovia @linovia_net
Problèmes d’une architecture classique • Base de code complexe à
maintenir • Evolutions des librairies couteuses en ressources • Isolation • Dimensionnement
Accès à une ressource Web app Indicateurs Export ERP CRM
Sources de données tierces Multi-sites Database
webservice ? • Fournisseur: http://localhost:8000/ • Point d’entrée: /api/v1/users/ •
Contrat d’interface: {‘username’: ‘johndoe’, …}
Architecture Webservice données couche métier présentation AAA
Nouvelle API données couche métier présentation AAA V1 V2
Avantages • Garantie du contrat d’interface • Stabilité dans le
temps • Migration souple • Moins de maintenance • Plus de nouvelles fonctionnalités
OK, et Django ?
Django Rest Framework • Modulaire… • mais pas minimaliste •
Découplé (pas besoin de models) • Idiomes Django (CBV, forms, noms des options…)
Features • Generic views • Serializers • Permissions • Renderers
/ Parsers • Routers • Content negotiation • Filters • Pagination • Throttling • Tests
from rest_framework.decorators import api_view! ! @api_view(['GET'])! def hello_world(request):! return Response({"message":
"Hello, world!"})
class UserSerializer(serializers.ModelSerializer):! class Meta:! model = User! fields = ('email',
'username', ‘last_login')! ! class UserViewSet(viewsets.ModelViewSet):! queryset = User.objects.all()! serializer_class = UserSerializer! permission_classes = (permissions.IsAuthenticatedOrReadOnly)! ! router = DefaultRouter()! router.register(r'user', UserViewSet)
Et les performances avec Django ?
Qui pense que Django EST rapide ?
Qui pense que Django EST rapide lent ?
None
None
Temps em ms 0 10 20 30 40 50 60
70 80 90 100 110 120 130 140 Full stack Serialisation Redis Content nego Middleware HttpResponse Database lookup Redis lookup Serialization Django request/response API view Response rendering
Django-roa • Resource Oriented Architecture • Coté client • Simplifie
la séparation • Integration avec rest framework (bientôt avec les serializers)
Exemple class Tweet(roa.Model):! text = models.TextField()! source = models.CharField(max_length=50)! user
= models.ForeignKey(User)! ! @staticmethod! def get_resource_url_list():! return u'http://twitter.com/statuses/public_timeline.json'
None
Merci • http://django-rest-framework.org • http://code.larlet.fr/django-roa/wiki/Home • http://bit.ly/1d8hOyV • http://bit.ly/1adlAs9