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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
29
pycon.fr 2018 - Django REST framework workshop
xordoquy
0
360
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
160
Other Decks in Technology
See All in Technology
ブラウザアプリの継続的パフォーマンスモニタリング (序) / Continuous Browser Application Performance Monitoring; Act 1
moznion
0
120
日経電子版を支えていく Kasane Design System/fec_fukuoka
nikkei_engineer_recruiting
0
250
AIで開発は速くなったのに、なぜ現場は楽にならないのか 〜あなたの組織のボトルネックを突き止めるワークショップ〜
jacopen
1
280
AI 駆動 Terraform 開発/SRE_BizReach_MIXI_2
visional_engineering_and_design
3
1.9k
Podは生きているのにGoだけが落ちる:GOGCとGOMEMLIMITで追うInvisible OOM Killの謎
tkc66buzz
1
210
20260903 Tokyo Jazug Night #62 | Azure エンジニアよ、 その環境は本当にセキュアか?
olivia_0707
1
640
GoCon2026 - Open Source, Open World
sanposhiho
2
540
Reactの設計論
uhyo
10
2.8k
Code4Lib JAPANカンファレンス2026 開会挨拶 / Code4Lib JAPAN Conference 2026: Opening Remarks
ykiyota
0
230
AIで実装は速くなった。なのにプロダクトは速くならない。職能の壁を越えて価値のフローを設計する
nwiizo
7
7.5k
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
130
薬剤師(ドメインエキスパート)と一緒に育てる薬局向けAIアシスタント
kakehashi
PRO
2
120
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
570
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
30 Presentation Tips
portentint
PRO
1
390
Building the Perfect Custom Keyboard
takai
2
870
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Product Roadmaps are Hard
iamctodd
55
13k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
Why Our Code Smells
bkeepers
PRO
340
58k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
650
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
230
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
870
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