Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[MDP Day] Boas práticas de arquitetura

[MDP Day] Boas práticas de arquitetura

Camila Campos

May 04, 2019
Tweet

More Decks by Camila Campos

Other Decks in Programming

Transcript

  1. @camposmilaa CAMILA Faço uns códigos na Creditas Organizo o Rails

    Girls São Paulo Organizo o Women Dev Summit Tô no twitter como @camposmilaa Campos
  2. @camposmilaa Plataforma online Empréstimo com garantia Juros baixos pra você

    <3 creditas.com.br vagas.creditas.com.br @CreditasBR
  3. @camposmilaa Junção de comunidades Incentivar mulheres em tech Palestras &

    Oficinas & Painéis womendevsummit.com fb.com/womendevsummit @WomenDevSummit
  4. @camposmilaa independente de frameworks independente de ui independente de banco

    de dados independente de agentes externos facilmente testável
  5. @camposmilaa criar solicitação DADOS DE ENTRADA - dados do cliente

    - dados da garantia (casa ou carro) - dados da solicitação (valores) FLUXO 1. cliente pede um empréstimo com os dados acima 2. sistema valida os dados 3. sistema cria uma solicitação 4. sistema envia um email ao cliente com dados da solicitação
  6. @camposmilaa princípio da inversão de dependência presenter controller use case

    interactor fluxo de controle use case input port use case output port I I
  7. @camposmilaa foco em entregar a coisa certa devs entendendo o

    business manutenabilidade felicidade das devs
  8. @camposmilaa any fool can write code that a computer can

    understand. good programmers write code that humans can understand. Martin Fowler
  9. @camposmilaa Links legais (além dos livros citados) Clean Architecture -

    Uncle Bob https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html Screaming Architecture - Uncle Bob https://8thlight.com/blog/uncle-bob/2011/09/30/Screaming-Architecture.html Hexagonal Architecture - Alistair Cockburn http://alistair.cockburn.us/Hexagonal+architecture Hexagonal Rails - Matt Wynne http://blog.mattwynne.net/2012/05/31/hexagonal-rails-objects-values-and-hexagons/ Domain Driven Rails - Yan Pritzker https://vimeo.com/106759024 Clean Architecture - Uncle Bob https://www.youtube.com/watch?v=Nltqi7ODZTM Clean Architecture and Design - Uncle Bob https://www.youtube.com/watch?v=Nsjsiz2A9mg Hexagonal Rails - Matt Wynne https://www.youtube.com/watch?v=CGN4RFkhH2M
  10. @camposmilaa user requests resource request model controller interação use case

    entity entity aggregate entity entity domain service
  11. @camposmilaa user requests resource request model controller repository database persistência

    use case entity entity aggregate entity entity domain service
  12. @camposmilaa user requests resource request model controller use case repository

    database persistência dip entity entity aggregate entity entity domain service
  13. @camposmilaa user requests resource request model controller result model repository

    database tradução use case entity entity aggregate entity entity domain service
  14. @camposmilaa user requests resource request model controller result model presenter

    repository database result model use case entity entity aggregate entity entity domain service
  15. @camposmilaa user requests resource request model controller result model presenter

    repository database result model dip use case entity entity aggregate entity entity domain service
  16. @camposmilaa user requests resource user gets resource back request model

    controller entity entity aggregate entity entity result model domain service presenter repository database json use case