SlideShare a Scribd company logo
1 of 42
Download to read offline
Como chegamos aqui?
@rdohms
Um guia para Architectural Decision Records
📷 pixabay
“Precisamos desta funcionalidade para Sexta!”
— Produto, sempre.
“Vamos fazer uma gambiarra, semana que vem
arrumamos”
— Desenvolvedor 1, o otimista.
“Quem fez isso? Porque desse jeito? PQP!?”
— Desenvolvedor 1, um ano depois.
“Ah, claro, eu lembro porque!”
— Desenvolvedor 1, depois do git blame.
Alguém já passou por isso antes?
📷 negative space
Rafael Dohms
• Pai da Chloe
• Palestrante
• Aquele cara chato do Object Calisthenics
Architect @ GetFeedback Platform
by SurveyMonkey
@rdohms
Sustainable Architectural Design Decisions (InfoQ)
“Capturar o pensamento de cada decisão é difícil, e
tem um custo alto”
“Projetos sustentáveis dependem de conhecimento
Arquitetural”
Sustainable Architectural Design Decisions (InfoQ)
“Entender de onde você saiu é crucial para entender
quais são suas novas opções.”
“Decisões são formadas baseadas em seu contexto,
entender o contexto permite entender as decisões
passadas e tomar melhores no futuro.”
Fizemos isso desta forma por <<motivo>>, caso
<<condição>> aconteça podemos removes este código.
Caso contrário, considere essa <<consequência>> de fazer
isto dessa forma.
📷 olia danilevich
ADRArchitectural Decision Record
Registro de Decisão Arquitetural
Context (Contexto)
Decision (Decisão)
Consequences (Consequências)
ADR0001 - Registrar Decisões
Date: 2020-12-01
Status
Approved
Contexto
• Descreva fatos
• Enumere as influencias atuando neste momento
• O que esta acontecendo?
• Quais os motivos e motivadores para tomar essa decisão?
• Que tipo de pressão ou conflito esta influenciando ela?
• Politica, social ou tecnológica
When creating the new platform, time pressure forced us to take some
shortcuts when it came to the design of our RESTful APIs (APIs from here on).
This ADR tries to rectify that, realign us and create a guideline for all future
APIs.
We subscribe to the Richardson Maturity Model for APIs. We are currently
comfortably floating somewhere near level 2 and are wondering if the effort
involved to get to level 3 is worth it.
To better support and decouple the Backend development from the Frontend
development, we want to introduce the Backend for Frontend (BFF)
architectural pattern in the form of a GraphQL component. That component will
serve all Frontend requests and talk to the backend microservices. Our
preferred implementation for that component is Apollo (Javascript). Apollo
currently reaps no benefits from having a maturity level 3 API since all relations
need to be defined by hand and are not deduced from HATEOAS.
Contexto politico e histórico
Contexto Técnico
Contexto
ADR0025 - RESTful API standards
Decisão
• Use a voz imperativa: “Nós vamos…”
• Explique como atenderam às influencias descritas anteriormente
• Seja claro sobre o que compõem a decisão
Decisão
{
"someProperty": "with a value",
"channels": [
"web-passive",
"web-active"
]
}
We will adopt a new JSON naming structure.
• properties should follow camelCase
• constant values should use kebab-case
Descrição clara e na voz ativa
Exemplos fácies de ler
ADR0013 - Use standard case for all json payloads
Consequências
• Como ficará o contexto após a decisão ser aplicada
• Efeitos colaterais da decisão tomada:
• Positivos
• Negativos
• Neutros
• O que não será mais possível?
• Que outras decisões serão influenciadas
Projects implementing this convention should not need to migrate downwards
anymore. Thus it is unnecessary, from a production environment perspective,
to have a down migration.
Any down migration may be kept in repositories for development purposes,
allowing tests to migrate back and forth speeding up the test suite in general.
However, the down migrations should never be part of deploy or
rollback process and should never be executed in production environments.
Consequências, positivas.
Exceções, e como cuidar delas
Consequências
ADR0005 - Always ensure non-breaking migrations
Outros formatos
• Micheal Nygard Standard
Simples, direto e completo
https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions
• MADR
Longo com mais detalhes: motivadores, alternativas, pro/cons
https://adr.github.io/madr/
• Y-Statements
In the context of <use case/user story u>, facing <concern c> we decided for <option o> to achieve
<quality q>, accepting <downside d>.
https://www.infoq.com/articles/sustainable-architectural-design-decisions/
Your DecisionDesigning Implementing
Escrever antes ou depois do fato?
“ADRs são ótimas plataformas de discussão”
“ADRs são ótimas para catalogar débito técnico”
Context
Decision
Consequences
ADR0001 - Record Decisions
Date: 2020-12-01
Status
Approved
Quando vamos pagar o debito?
Quais as restrições
impostas pelo Produto
Que funcionalidades estão
bloqueadas agora?
Quando e para oque escrever ADRs?
Mudanças
impactantes
Quando e para oque escrever ADRs?
Mudanças
impactantes
Más
decisões
Quando e para oque escrever ADRs?
Mudanças
impactantes
Más
decisões
Débito
técnico
Quando e para oque escrever ADRs?
Mudanças
impactantes
Más
decisões
Débito
técnico
Implementações
fora do comum
Quando e para oque escrever ADRs?
Velha Decisão
Superseded by
Nova Decisão
Podemos mudar uma ADR?
Replaced by
Proposed Accepted
Deprecated
Superseded: by 0002
Amended: by 0002
*: by 0002
/docs/adr
Onde colocar ADRs?
acme/user-managment acme/billing acme/content-creator acme/…
acme/user-managment acme/billing acme/content-creator acme/…
ADR-0003: Do not implement authentication layer for MVP
acme/user-managment acme/billing acme/content-creator acme/…
acme/backend-chapter acme/frontend-chapter
ADR-0003: Do not implement authentication layer for MVP
acme/user-managment acme/billing acme/content-creator acme/…
acme/backend-chapter acme/frontend-chapter
ADR-0003: Do not implement authentication layer for MVP
ADR-0005: Adopt the Doctrine Coding Standard
acme/user-managment
acme/architecture-chapter
acme/billing acme/content-creator acme/…
acme/backend-chapter acme/frontend-chapter
ADR-0003: Do not implement authentication layer for MVP
ADR-0005: Adopt the Doctrine Coding Standard
acme/user-managment
acme/architecture-chapter
acme/billing acme/content-creator acme/…
acme/backend-chapter acme/frontend-chapter
ADR-0003: Do not implement authentication layer for MVP
ADR-0005: Adopt the Doctrine Coding Standard
ADR-0007: All API dates should be formatted in RFC3339
adr-tools
https://github.com/npryce/adr-tools
Demo
@rdohms
https://doh.ms
Obrigado!
We are hiring!
https://grnh.se/d9197e541
https://grnh.se/9ccf65331us
Ottawa / Amsterdam
https://www.surveymonkey.com/r/adr-phpconf

More Related Content

Similar to Como registrar decisões arquiteturais

10 Razões para usar a Tecnologia OpenRoads
10 Razões para usar a Tecnologia OpenRoads10 Razões para usar a Tecnologia OpenRoads
10 Razões para usar a Tecnologia OpenRoadsCarlos Galeano
 
Aula05 - Metodologias Ágeis
Aula05 - Metodologias ÁgeisAula05 - Metodologias Ágeis
Aula05 - Metodologias ÁgeisDaniela Brauner
 
Visao geraldorup 20slides
Visao geraldorup 20slidesVisao geraldorup 20slides
Visao geraldorup 20slideshoraciosila
 
Dextra Sistemas: A linguagem PHP no modelo de Fábrica de Software
Dextra Sistemas: A linguagem PHP no modelo de Fábrica de SoftwareDextra Sistemas: A linguagem PHP no modelo de Fábrica de Software
Dextra Sistemas: A linguagem PHP no modelo de Fábrica de SoftwareDextra
 
O Papel do Product Owner
O Papel do Product OwnerO Papel do Product Owner
O Papel do Product OwnerMarcia Maia
 
1- Apresentacao Metodologia RCP
1- Apresentacao Metodologia RCP1- Apresentacao Metodologia RCP
1- Apresentacao Metodologia RCPFrank Coelho
 
1 apresentacao metodologia rcp
1  apresentacao metodologia rcp1  apresentacao metodologia rcp
1 apresentacao metodologia rcpFrank Coelho
 
A agência Nuve e o processo de projetos
A agência Nuve e o processo de projetosA agência Nuve e o processo de projetos
A agência Nuve e o processo de projetosAgência Nuve
 
Transformação ágil em uma grande empresa, um post-it por vez!
Transformação ágil em uma grande empresa, um post-it por vez! Transformação ágil em uma grande empresa, um post-it por vez!
Transformação ágil em uma grande empresa, um post-it por vez! Adriano Tavares
 
Escalando infra em ops em um ambiente de hiper crescimento
Escalando infra em ops em um ambiente de hiper crescimentoEscalando infra em ops em um ambiente de hiper crescimento
Escalando infra em ops em um ambiente de hiper crescimentoRenan Capaverde
 
QConRio 2014 - Tutorial Iniciando Com Continuous Delivery
QConRio 2014 - Tutorial Iniciando Com Continuous DeliveryQConRio 2014 - Tutorial Iniciando Com Continuous Delivery
QConRio 2014 - Tutorial Iniciando Com Continuous DeliveryRodrigo Russo
 
Crystalfinal 100906101303-phpapp02
Crystalfinal 100906101303-phpapp02Crystalfinal 100906101303-phpapp02
Crystalfinal 100906101303-phpapp02Aldemir Almeida
 
Devops - A cultura ágil voltada à infra-estrutura
Devops - A cultura ágil voltada à infra-estruturaDevops - A cultura ágil voltada à infra-estrutura
Devops - A cultura ágil voltada à infra-estruturaFernando Celarino
 

Similar to Como registrar decisões arquiteturais (20)

10 Razões para usar a Tecnologia OpenRoads
10 Razões para usar a Tecnologia OpenRoads10 Razões para usar a Tecnologia OpenRoads
10 Razões para usar a Tecnologia OpenRoads
 
Aula05 - Metodologias Ágeis
Aula05 - Metodologias ÁgeisAula05 - Metodologias Ágeis
Aula05 - Metodologias Ágeis
 
Webinar DevOps - Encontros Ágeis
Webinar DevOps - Encontros ÁgeisWebinar DevOps - Encontros Ágeis
Webinar DevOps - Encontros Ágeis
 
Visao geraldorup 20slides
Visao geraldorup 20slidesVisao geraldorup 20slides
Visao geraldorup 20slides
 
Métodos Ágeis
Métodos ÁgeisMétodos Ágeis
Métodos Ágeis
 
Palestra scrum
Palestra scrumPalestra scrum
Palestra scrum
 
Dextra Sistemas: A linguagem PHP no modelo de Fábrica de Software
Dextra Sistemas: A linguagem PHP no modelo de Fábrica de SoftwareDextra Sistemas: A linguagem PHP no modelo de Fábrica de Software
Dextra Sistemas: A linguagem PHP no modelo de Fábrica de Software
 
O Papel do Product Owner
O Papel do Product OwnerO Papel do Product Owner
O Papel do Product Owner
 
1- Apresentacao Metodologia RCP
1- Apresentacao Metodologia RCP1- Apresentacao Metodologia RCP
1- Apresentacao Metodologia RCP
 
1 apresentacao metodologia rcp
1  apresentacao metodologia rcp1  apresentacao metodologia rcp
1 apresentacao metodologia rcp
 
A agência Nuve e o processo de projetos
A agência Nuve e o processo de projetosA agência Nuve e o processo de projetos
A agência Nuve e o processo de projetos
 
Transformação ágil em uma grande empresa, um post-it por vez!
Transformação ágil em uma grande empresa, um post-it por vez! Transformação ágil em uma grande empresa, um post-it por vez!
Transformação ágil em uma grande empresa, um post-it por vez!
 
O que é SCRUM
O que é SCRUMO que é SCRUM
O que é SCRUM
 
Desenvolvimento Web
Desenvolvimento WebDesenvolvimento Web
Desenvolvimento Web
 
Introdução ao RUP
Introdução ao RUPIntrodução ao RUP
Introdução ao RUP
 
Escalando infra em ops em um ambiente de hiper crescimento
Escalando infra em ops em um ambiente de hiper crescimentoEscalando infra em ops em um ambiente de hiper crescimento
Escalando infra em ops em um ambiente de hiper crescimento
 
QConRio 2014 - Tutorial Iniciando Com Continuous Delivery
QConRio 2014 - Tutorial Iniciando Com Continuous DeliveryQConRio 2014 - Tutorial Iniciando Com Continuous Delivery
QConRio 2014 - Tutorial Iniciando Com Continuous Delivery
 
Crystalfinal 100906101303-phpapp02
Crystalfinal 100906101303-phpapp02Crystalfinal 100906101303-phpapp02
Crystalfinal 100906101303-phpapp02
 
Métodos ágeis
Métodos ágeisMétodos ágeis
Métodos ágeis
 
Devops - A cultura ágil voltada à infra-estrutura
Devops - A cultura ágil voltada à infra-estruturaDevops - A cultura ágil voltada à infra-estrutura
Devops - A cultura ágil voltada à infra-estrutura
 

More from Rafael Dohms

The Individual Contributor Path - DPC2024
The Individual Contributor Path - DPC2024The Individual Contributor Path - DPC2024
The Individual Contributor Path - DPC2024Rafael Dohms
 
Application Metrics - IPC2023
Application Metrics - IPC2023Application Metrics - IPC2023
Application Metrics - IPC2023Rafael Dohms
 
How'd we get here? A guide to Architectural Decision Records
How'd we get here? A guide to Architectural Decision RecordsHow'd we get here? A guide to Architectural Decision Records
How'd we get here? A guide to Architectural Decision RecordsRafael Dohms
 
Application Metrics (with Prometheus examples)
Application Metrics (with Prometheus examples)Application Metrics (with Prometheus examples)
Application Metrics (with Prometheus examples)Rafael Dohms
 
Application metrics - Confoo 2019
Application metrics - Confoo 2019Application metrics - Confoo 2019
Application metrics - Confoo 2019Rafael Dohms
 
Writing code you won’t hate tomorrow - PHPCE18
Writing code you won’t hate tomorrow - PHPCE18Writing code you won’t hate tomorrow - PHPCE18
Writing code you won’t hate tomorrow - PHPCE18Rafael Dohms
 
Application Metrics (with Prometheus examples) #PHPDD18
Application Metrics (with Prometheus examples) #PHPDD18Application Metrics (with Prometheus examples) #PHPDD18
Application Metrics (with Prometheus examples) #PHPDD18Rafael Dohms
 
Application metrics with Prometheus - DPC18
Application metrics with Prometheus - DPC18Application metrics with Prometheus - DPC18
Application metrics with Prometheus - DPC18Rafael Dohms
 
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonfRafael Dohms
 
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...Rafael Dohms
 
Composer The Right Way - 010PHP
Composer The Right Way - 010PHPComposer The Right Way - 010PHP
Composer The Right Way - 010PHPRafael Dohms
 
Writing Code That Lasts - #Magento2Seminar, Utrecht
Writing Code That Lasts - #Magento2Seminar, UtrechtWriting Code That Lasts - #Magento2Seminar, Utrecht
Writing Code That Lasts - #Magento2Seminar, UtrechtRafael Dohms
 
Composer the Right Way - PHPSRB16
Composer the Right Way - PHPSRB16Composer the Right Way - PHPSRB16
Composer the Right Way - PHPSRB16Rafael Dohms
 
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16Rafael Dohms
 
Composer the Right Way - MM16NL
Composer the Right Way - MM16NLComposer the Right Way - MM16NL
Composer the Right Way - MM16NLRafael Dohms
 
Composer The Right Way - PHPUGMRN
Composer The Right Way - PHPUGMRNComposer The Right Way - PHPUGMRN
Composer The Right Way - PHPUGMRNRafael Dohms
 
Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Rafael Dohms
 
“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.Rafael Dohms
 
A Journey into your Lizard Brain - PHP Conference Brasil 2015
A Journey into your Lizard Brain - PHP Conference Brasil 2015A Journey into your Lizard Brain - PHP Conference Brasil 2015
A Journey into your Lizard Brain - PHP Conference Brasil 2015Rafael Dohms
 
“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.Rafael Dohms
 

More from Rafael Dohms (20)

The Individual Contributor Path - DPC2024
The Individual Contributor Path - DPC2024The Individual Contributor Path - DPC2024
The Individual Contributor Path - DPC2024
 
Application Metrics - IPC2023
Application Metrics - IPC2023Application Metrics - IPC2023
Application Metrics - IPC2023
 
How'd we get here? A guide to Architectural Decision Records
How'd we get here? A guide to Architectural Decision RecordsHow'd we get here? A guide to Architectural Decision Records
How'd we get here? A guide to Architectural Decision Records
 
Application Metrics (with Prometheus examples)
Application Metrics (with Prometheus examples)Application Metrics (with Prometheus examples)
Application Metrics (with Prometheus examples)
 
Application metrics - Confoo 2019
Application metrics - Confoo 2019Application metrics - Confoo 2019
Application metrics - Confoo 2019
 
Writing code you won’t hate tomorrow - PHPCE18
Writing code you won’t hate tomorrow - PHPCE18Writing code you won’t hate tomorrow - PHPCE18
Writing code you won’t hate tomorrow - PHPCE18
 
Application Metrics (with Prometheus examples) #PHPDD18
Application Metrics (with Prometheus examples) #PHPDD18Application Metrics (with Prometheus examples) #PHPDD18
Application Metrics (with Prometheus examples) #PHPDD18
 
Application metrics with Prometheus - DPC18
Application metrics with Prometheus - DPC18Application metrics with Prometheus - DPC18
Application metrics with Prometheus - DPC18
 
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf
 
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...
 
Composer The Right Way - 010PHP
Composer The Right Way - 010PHPComposer The Right Way - 010PHP
Composer The Right Way - 010PHP
 
Writing Code That Lasts - #Magento2Seminar, Utrecht
Writing Code That Lasts - #Magento2Seminar, UtrechtWriting Code That Lasts - #Magento2Seminar, Utrecht
Writing Code That Lasts - #Magento2Seminar, Utrecht
 
Composer the Right Way - PHPSRB16
Composer the Right Way - PHPSRB16Composer the Right Way - PHPSRB16
Composer the Right Way - PHPSRB16
 
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
 
Composer the Right Way - MM16NL
Composer the Right Way - MM16NLComposer the Right Way - MM16NL
Composer the Right Way - MM16NL
 
Composer The Right Way - PHPUGMRN
Composer The Right Way - PHPUGMRNComposer The Right Way - PHPUGMRN
Composer The Right Way - PHPUGMRN
 
Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16
 
“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.
 
A Journey into your Lizard Brain - PHP Conference Brasil 2015
A Journey into your Lizard Brain - PHP Conference Brasil 2015A Journey into your Lizard Brain - PHP Conference Brasil 2015
A Journey into your Lizard Brain - PHP Conference Brasil 2015
 
“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.
 

Como registrar decisões arquiteturais