PHP Experience 2016 - ROA – Resource Oriented Architecture

55
RESOURCE ORIENTED ARCHITECTURE

Transcript of PHP Experience 2016 - ROA – Resource Oriented Architecture

Page 1: PHP Experience 2016 - ROA – Resource Oriented Architecture

R E S O U R C E O R I E N T E D A R C H I T E C T U R E

Page 2: PHP Experience 2016 - ROA – Resource Oriented Architecture

R E S O U R C E O R I E N T E D A R C H I T E C T U R E

Page 3: PHP Experience 2016 - ROA – Resource Oriented Architecture

D I V I D I R E C O N Q U I S TA RDOMÍN IO

Page 4: PHP Experience 2016 - ROA – Resource Oriented Architecture

Q U E M S O U E U ?

•Programador

•Glio

•@nelson_senna

Page 5: PHP Experience 2016 - ROA – Resource Oriented Architecture

D I S C L A I M E R

Page 6: PHP Experience 2016 - ROA – Resource Oriented Architecture

S O B R E A I M A G E M

Esse é o coliseu romano e, é uma referência à estratégia do imperador Júlio César.

Page 7: PHP Experience 2016 - ROA – Resource Oriented Architecture

– J Ú L I O C É S A R

“Divide et vinces”

Page 8: PHP Experience 2016 - ROA – Resource Oriented Architecture

D O M Í N I O É S O B R E C O M U N I C A Ç Ã O

Page 9: PHP Experience 2016 - ROA – Resource Oriented Architecture

– M . E . C O N W AY

“Organizations which design systems are constrained to produce systems which are copies of the communication structures of

these organizations.”

Page 10: PHP Experience 2016 - ROA – Resource Oriented Architecture

P R O B L E M A S D E C O M U N I C A Ç Ã O , D E S A L I N H A M E N T O S D E O B J E T I V O S E

C O N C E I T O S N Ã O S Ã O S A U D ÁV E I S

Page 11: PHP Experience 2016 - ROA – Resource Oriented Architecture

– M I C H A E L F E AT H E R S

“Misalignments between business knowledge and development knowledge persist in the code. We work around them and, more often than not, end up building on top of them rather than fixing them.”

Page 12: PHP Experience 2016 - ROA – Resource Oriented Architecture
Page 13: PHP Experience 2016 - ROA – Resource Oriented Architecture

– B R I A N F O O T E A N D J O S E P H Y O D E R

“Domain experience is an essential ingredient in any framework design

effort… Without knowing the architectural demands of the domain, such an attempt

is premature, if not foolhardy…”

Page 14: PHP Experience 2016 - ROA – Resource Oriented Architecture

O Q U E É D O M Í N I O ?

Page 15: PHP Experience 2016 - ROA – Resource Oriented Architecture
Page 16: PHP Experience 2016 - ROA – Resource Oriented Architecture

U M P R O B L E M A Q U E S E R Á R E S O LV I D O U S A N D O U M S O F T W A R E

Page 17: PHP Experience 2016 - ROA – Resource Oriented Architecture

– VA U G H N V E R N O N

“When you develop software for an organization, you’re working in its

Domain. It should be pretty obvious to you what your Domain is. Your work in

it.”

Page 18: PHP Experience 2016 - ROA – Resource Oriented Architecture

O U S E J A …

Page 19: PHP Experience 2016 - ROA – Resource Oriented Architecture
Page 20: PHP Experience 2016 - ROA – Resource Oriented Architecture

P R I M E I R A D I V I S Ã O :

D O M Í N I O = C O R E D O M A I N + S U B D O M A I N S

Page 21: PHP Experience 2016 - ROA – Resource Oriented Architecture

C O R E D O M A I N

Page 22: PHP Experience 2016 - ROA – Resource Oriented Architecture
Page 23: PHP Experience 2016 - ROA – Resource Oriented Architecture

1. Por que escrever esse software vale a pena?

2. Por que não comprar uma solução pronta?

3. Por que não contratar alguém para construir esse software pra você?

Page 24: PHP Experience 2016 - ROA – Resource Oriented Architecture

É O C O N C E I T O F U N D A M E N TA L P O R T R Á S D O N E G Ó C I O

Page 25: PHP Experience 2016 - ROA – Resource Oriented Architecture

– VA U G H N V E R N O N

“It’s a nontrivial problem to solve, and succeeding would help the company

establish a new competitive advantage.”

Page 26: PHP Experience 2016 - ROA – Resource Oriented Architecture
Page 27: PHP Experience 2016 - ROA – Resource Oriented Architecture

– E R I C E VA N S

“...the Core domain should deliver about 20% of the total value of the entire

system, be about 5% of the code base, and take about 80% of the effort.”

Page 28: PHP Experience 2016 - ROA – Resource Oriented Architecture

S U B D O M A I N S

Page 29: PHP Experience 2016 - ROA – Resource Oriented Architecture
Page 30: PHP Experience 2016 - ROA – Resource Oriented Architecture

PA R T E S D O S I S T E M A , Q U E A P E S A R D E S E R E M E S S E N C I A I S PA R A O N E G Ó C I O , N Ã O FA Z E M

PA R T E D O C O R E D O M A I N

Page 31: PHP Experience 2016 - ROA – Resource Oriented Architecture

S E G U N D A D I V I S Ã O :

S U B D O M A I N S = G E N E R I C + S U P P O R T I N G

Page 32: PHP Experience 2016 - ROA – Resource Oriented Architecture

G E N E R I C S U B D O M A I N S

Page 33: PHP Experience 2016 - ROA – Resource Oriented Architecture
Page 34: PHP Experience 2016 - ROA – Resource Oriented Architecture

P R O B L E M A S Q U E P O S S U E M U M A L I T E R AT U R A E X T E N S A , B E M E S TA B E L E C I D O S E E S TÁV E I S . N Ã O

N E C E S S A R I A M E N T E L I G A D O S A O N E G Ó C I O .

Page 35: PHP Experience 2016 - ROA – Resource Oriented Architecture

M Ó D U L O D E R E C O M E N D A Ç Ã O D E P R O D U T O S

Page 36: PHP Experience 2016 - ROA – Resource Oriented Architecture

S U P P O R T I N G S U B D O M A I N S

Page 37: PHP Experience 2016 - ROA – Resource Oriented Architecture
Page 38: PHP Experience 2016 - ROA – Resource Oriented Architecture

D I F E R E N T E D O S S U B D O M Í N I O S G E N É R I C O S , O S S U B D O M Í N I O S D E S U P O R T E G A R A N T E M Q U E F U N C I O N A L I D A D E S E S S E N C I A I S

P R O N E G Ó C I O E S T E J A M D I S P O N Í V E I S .

Page 39: PHP Experience 2016 - ROA – Resource Oriented Architecture

M Ó D U L O D E PA G A M E N T O N U M E - C O M M E R C E

Page 40: PHP Experience 2016 - ROA – Resource Oriented Architecture

R E G I S T R A N D O N O S S A C O N Q U I S TA

Page 41: PHP Experience 2016 - ROA – Resource Oriented Architecture

Domínio

Entrega

Catálogo

Pagamento

Recomendação

Page 42: PHP Experience 2016 - ROA – Resource Oriented Architecture

Domínio

Entrega

Catálogo

Pagamento

Recomendação

Supporting

Generic

Supporting

Core

Page 43: PHP Experience 2016 - ROA – Resource Oriented Architecture

R E F L E X Õ E S D A C O N Q U I S TA

Page 44: PHP Experience 2016 - ROA – Resource Oriented Architecture

U S E O D O M Í N I O C O M O P O N T E PA R A S E C O M U N I C A R

Page 45: PHP Experience 2016 - ROA – Resource Oriented Architecture

C O N H E C E R S E U D O M Í N I O E V I TA E R R O S A R Q U I T E T U R A I S G R AV E S N A C O N C E P Ç Ã O D O

S O F T W A R E

Page 46: PHP Experience 2016 - ROA – Resource Oriented Architecture

U M S O F T W A R E M E L H O R O R G A N I Z A D O E C O M “ B A R R E I R A S ” E R E S P O N S A B I L I D A D E S B E M

D E F I N I D A S

Page 47: PHP Experience 2016 - ROA – Resource Oriented Architecture

P O S S I B I L I TA O A L I N H A M E N T O D E O B J E T I V O S E N T R E A S Á R E A S D A E M P R E S A

Page 48: PHP Experience 2016 - ROA – Resource Oriented Architecture

U M S O F T W A R E B A S E A D O N U M D O M Í N I O R E S P O N D E R Á P I D O A M U D A N Ç A S

Page 49: PHP Experience 2016 - ROA – Resource Oriented Architecture

– E R I C E VA N S

“...if programmers are not interested in the domain, they learn only what the application

should do, not the principles behind it. Useful software can be built that way, but the

project will never arrive at a point where powerful new features unfold as corollaries

to older features.”

Page 50: PHP Experience 2016 - ROA – Resource Oriented Architecture

AV E , D O M Í N I O !

Page 51: PHP Experience 2016 - ROA – Resource Oriented Architecture

D Ú V I D A S ?

Page 52: PHP Experience 2016 - ROA – Resource Oriented Architecture

A G R A D E C I M E N T O S

• Augusto Pascutti (@augustohp)

• Eriksen Costa (@eriksencosta)

• Ivo Nascimento (@iannsp)

• Luís Cobucci (@lcobucci)

Page 53: PHP Experience 2016 - ROA – Resource Oriented Architecture

O B R I G A D O !

Page 54: PHP Experience 2016 - ROA – Resource Oriented Architecture

F O T O S

• https://flic.kr/p/r5VdWE - Green field

• https://flic.kr/p/pfiFkX - Bridging the gap

• https://flic.kr/p/5V6RA2 - Collaboration

• https://flic.kr/p/vqdF4d - Cornerstone

• https://flic.kr/p/ppsKuz - Library

• https://flic.kr/p/kbSRnu - Big ball of mud

Page 55: PHP Experience 2016 - ROA – Resource Oriented Architecture

R E F E R Ê N C I A S•http://www.laputan.org/mud/

•http://www.jefclaes.be/2014/02/strategic-ddd-in-nutshell.html

•https://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html

•http://c2.com/cgi/wiki?ConwaysLaw

•http://www.r7krecon.com/#!provocation/gfqa5

•http://www.r7krecon.com/#!implications/t2tbw

•http://gorodinski.com/blog/2013/04/29/sub-domains-and-bounded-contexts-in-domain-driven-design-ddd/

•http://blog.jonathanoliver.com/ddd-strategic-design-core-supporting-and-generic-subdomains

•Domain-Driven Design: Tackling Complexity in the Heart of Software - Eric Evans

• Implementing Domain-Driven Design - Vaughn Vernon