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
73
Python e a inteligência coletiva
aoqfonseca
0
80
Micro serviços e dados distribuidos
aoqfonseca
1
140
Data Dichotomy
aoqfonseca
0
22
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
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.2k
Simplifying Cloud Native app testing across environments with Dapr and Microcks
salaboy
0
160
ソースを読むプロセスの例
sat
PRO
12
4.5k
ComposeではないコードをCompose化する case ビズリーチ / DroidKaigi 2025 koyasai
visional_engineering_and_design
0
110
Railsの話をしよう
yahonda
0
140
RDS の負荷が高い場合に AWS で取りうる具体策 N 連発/a-series-of-specific-countermeasures-available-on-aws-when-rds-is-under-high-load
emiki
1
370
20251014_Pythonを実務で徹底的に使いこなした話
ippei0923
0
200
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3k
JAZUG 15周年記念 × JAT「AI Agent開発者必見:"今"のOracle技術で拡張するAzure × OCIの共存アーキテクチャ」
shisyu_gaku
1
160
セキュアな認可付きリモートMCPサーバーをAWSマネージドサービスでつくろう! / Let's build an OAuth protected remote MCP server based on AWS managed services
kaminashi
3
330
Adminaで実現するISMS/SOC2運用の効率化 〜 アカウント管理編 〜
shonansurvivors
4
450
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
20k
Featured
See All Featured
BBQ
matthewcrist
89
9.8k
The Straight Up "How To Draw Better" Workshop
denniskardys
238
140k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Become a Pro
speakerdeck
PRO
29
5.5k
Context Engineering - Making Every Token Count
addyosmani
6
250
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Balancing Empowerment & Direction
lara
4
690
Side Projects
sachag
455
43k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Music & Morning Musume
bryan
46
6.8k
Designing for Performance
lara
610
69k
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.