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
72
Python e a inteligência coletiva
aoqfonseca
0
79
Micro serviços e dados distribuidos
aoqfonseca
1
130
Data Dichotomy
aoqfonseca
0
21
Code Review - Fazendo de um jeito eficaz
aoqfonseca
0
130
Padrões e Anti Padrões de Estabilidade
aoqfonseca
2
120
Other Decks in Technology
See All in Technology
2025年になってもまだMySQLが好き
yoku0825
8
4.8k
RSCの時代にReactとフレームワークの境界を探る
uhyo
10
3.4k
OCI Oracle Database Services新機能アップデート(2025/06-2025/08)
oracle4engineer
PRO
0
150
【NoMapsTECH 2025】AI Edge Computing Workshop
akit37
0
190
今!ソフトウェアエンジニアがハードウェアに手を出すには
mackee
12
4.8k
はじめてのOSS開発からみえたGo言語の強み
shibukazu
1
180
大「個人開発サービス」時代に僕たちはどう生きるか
sotarok
20
10k
Language Update: Java
skrb
2
300
EncryptedSharedPreferences が deprecated になっちゃった!どうしよう! / Oh no! EncryptedSharedPreferences has been deprecated! What should I do?
yanzm
0
390
2つのフロントエンドと状態管理
mixi_engineers
PRO
3
110
Platform開発が先行する Platform Engineeringの違和感
kintotechdev
4
570
AI開発ツールCreateがAnythingになったよ
tendasato
0
130
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.6k
Fireside Chat
paigeccino
39
3.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
It's Worth the Effort
3n
187
28k
Side Projects
sachag
455
43k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
Why Our Code Smells
bkeepers
PRO
339
57k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Building Applications with DynamoDB
mza
96
6.6k
How GitHub (no longer) Works
holman
315
140k
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.