Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
30
pycon.fr 2018 - Django REST framework workshop
xordoquy
0
360
mauvaises bonnes idées pour REST
xordoquy
1
420
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
160
Other Decks in Technology
See All in Technology
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
1
240
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
170
WasmをRustにする
sansantech
PRO
0
250
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
870
オントロジーって 結局なにもの? AI エージェントに「意味」を渡す知識設計の話
greenmidori
0
220
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
170
Browser Spec: Testing Hotwire with Ruby
takahashim
1
120
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
120
How to Design Configuration for Rails Applications
willnet
1
810
Local CI × GitHub Actions
gogutan
2
210
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
270
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
Become a Pro
speakerdeck
PRO
31
6.3k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
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