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
Clean Architecture - PythonRio
Search
Andre Fonseca
December 10, 2016
Technology
0
170
Clean Architecture - PythonRio
Presentation about clean architecture and python at last meetup of PythonRio.
Andre Fonseca
December 10, 2016
Tweet
Share
More Decks by Andre Fonseca
See All by Andre Fonseca
Quando banco de dados atrapalha
aoqfonseca
0
74
Python e a inteligência coletiva
aoqfonseca
0
83
Micro serviços e dados distribuidos
aoqfonseca
1
140
Data Dichotomy
aoqfonseca
0
25
Code Review - Fazendo de um jeito eficaz
aoqfonseca
0
140
Padrões e Anti Padrões de Estabilidade
aoqfonseca
2
120
Other Decks in Technology
See All in Technology
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
180
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
180
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
190
AWS Network Firewall Proxyを触ってみた
nagisa53
1
210
Context Engineeringの取り組み
nutslove
0
320
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
セキュリティについて学ぶ会 / 2026 01 25 Takamatsu WordPress Meetup
rocketmartue
1
300
20260204_Midosuji_Tech
takuyay0ne
1
140
AI駆動開発を事業のコアに置く
tasukuonizawa
1
130
生成AI時代にこそ求められるSRE / SRE for Gen AI era
ymotongpoo
5
3k
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
110
A Tale of Four Properties
chriscoyier
162
24k
First, design no harm
axbom
PRO
2
1.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Paper Plane (Part 1)
katiecoart
PRO
0
4k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Product Roadmaps are Hard
iamctodd
PRO
55
12k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Transcript
CLEAN ARCHITECTURE NOVIDADES - PRINCÍPIOS - DESIGN - SIMPLICIDADE -
PYTHON
15+ anos Sr System Engineer at Bemobi / Opera github.com/aoqfonseca
@aoqfonseca
ARCHITECTURE
REACT / ANGULAR JS WEBSOCKET JSON NGINX CIRCUS TORNADO /
FLASK / DJANGO MYSQL / MONGO / POSTGRES
None
None
DESIGN PATTERNS
http://www.123rf.com/photo_11204982_conceptual-vector-illustration-adult-businessman-and-question-marks-inside-his-head-choice- problems.html
ARCHITECTURE CLEAN
None
UNCLE BOB
https://en.wikipedia.org/wiki/SOLID_(object-oriented_design) Source: http://team-coder.com/tag/clean-code/
https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean- architecture.html https://8thlight.com/blog/uncle-bob/2011/11/22/Clean- Architecture.html
http://www.electronicbeats.net/the-feed/watch-how-moby-and-david-bowie-describe-the-internet-in-1995/
The WEB is just one of many ways to delivery
Many of ours truths (guide lines) are based on problems
that doesn’t exists anymore.
• Uncoupled • Allow to delay choices and decisions about
using some techies (ex: database, libs, etc) • Easy to evolve (add features, change behaves) • Solution and propose at first view • Domain more important than libs / frameworks
None
# -*- coding: utf-8 -*- import requests def main(word): url
= “http://api.duckduckgo.com/?q={}&format=json&pretty=1” url = url.format(word) response = requests.get(url) # io results = response.json()[‘Results’] # io print results
def build_url(word): url = “http://api.duckduckgo.com/?q={}&format=json” return url.format(word) def find(url): response
= requests.get(url) return response def process_result(response): json = response.json() return json.get(’Results’, []) def main(word): url = build_url(word) response = find(url) print process_result(response)
Listen your TESTS
None
https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html
Use Manager, Repository, etc…. They aren’t forbiden
Model Centralized
Model DATABASE Centralized
None
Python has great data structures and ways to manipulate them.