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
Patterns pra que te quero
Search
Anna Cruz
December 19, 2015
Programming
44
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Patterns pra que te quero
Palestra apresentada no Front in Rio 2015 sobre a aplicação de algumas patterns ao javascript
Anna Cruz
December 19, 2015
More Decks by Anna Cruz
See All by Anna Cruz
Hora da Aventura! Vamos melhorar o seu código?!?
annacruz
0
100
Design Patterns em Ruby
annacruz
0
56
Other Decks in Programming
See All in Programming
Next.js: The final boss of Web Performance
guaca
0
250
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
ChromeでローカルLLM
ryu1013
0
140
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.5k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
JIS keyboard support in Omarchy
lef237
0
110
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
500
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
200
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
すこし踏み込む CancellationToken
htkym
2
1.7k
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Product Roadmaps are Hard
iamctodd
55
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Paper Plane
katiecoart
PRO
5
54k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Technical Leadership for Architectural Decision Making
baasie
3
600
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Transcript
Patterns pra que te quero Como padrões podem te ajudar
a ter um código melhor @yuizinha
Manter código é algo custoso Uma das maiores dificuldades dentro
do desenvolvimento é manter o código
Escrever bom código é díficil Falta de tempo é a
maior desculpa para não escrever bom código
Não existem métodos fáceis para resolver problemas difíceis. René Descartes
Anna "Yui" Cruz
None
None
https://pixlr.com/editor/ Christopher Alexander Gang of Four Erich Gamma Richard Helm
Ralph Johnson John Vlissides
Design Patterns Não é como fazer o código
Design Patterns Auxílio para solução de problemas já conhecidos
None
https://pixlr.com/editor/
Prototype Criação de objetos a partir de um protótipo dele
Prototype Um jeito de implementar herança
Prototype Nativa no Javascript
None
None
Singleton Apenas deve existir uma instância de classe if "EcmaScript5"
{ "classe" == "função construtora" }
Singleton Evita com que existam vários objetos complexos rodeando o
sistema
None
CUIDADO!!!! Não deixe a sigleton com muitas responsabilidades E acabe
quebrando com o Single Responsability Principle
Decorator Adicionar comportamentos a objetos em tempo de execução
Decorator Facilita a criação de plugins em pipeline
None
None
None
Observer Usada em diversos plugins
Observer Ao mudar o estado de um objeto um callback
é executado
None
None
None
Verifique o seu problema, as vezes patterns só complicará a
solução
Obrigada! @yuizinha
[email protected]
github.com/annacruz