Top Banner
Agile Architecture & Design 1
78

Agile Architecture and Design

Feb 14, 2017

Download

Documents

lenguyet
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Agile Architecture and Design

Agile Architecture & Design

1

Page 2: Agile Architecture and Design

“There are known unknowns.

That is to say there are things that we now know we don't know.

But there are also unknown unknowns.

There are things we do not know we don't know.”

2

Page 3: Agile Architecture and Design

There are things we do not know we don't know.”

unknown unknowns

3

Page 4: Agile Architecture and Design

the future is hard to predict!

focus on proven practices

4

Page 5: Agile Architecture and Design

traditional vs agile architecture

5

Page 6: Agile Architecture and Design

traditional role

6

Page 7: Agile Architecture and Design

agile role

7

Page 8: Agile Architecture and Design

consequences of < time up front

good feel for current events

hands-on

ability to switch from micro <=> macro often & easily

fewer boat anchors

8

Page 9: Agile Architecture and Design

DesignAgile Architecture &

Design

9

Page 10: Agile Architecture and Design

Emergent Design

Rising or emerging out of anything that covers or conceals; issuing; coming to light.

[1913 Webster]

Suddenly appearing; arising unexpectedly; calling for prompt action; urgent.

[1913 Webster]

10

Page 11: Agile Architecture and Design

finding abstractions &

patterns

11

Page 12: Agile Architecture and Design

last responsible moment

finding abstractions &

patterns

12

Page 13: Agile Architecture and Design

the longer the delay => more relevant data for decision

last responsible moment

13

Page 14: Agile Architecture and Design

last responsible moment

finding abstractions &

patterns

14

Page 15: Agile Architecture and Design

emergent design

15

Page 16: Agile Architecture and Design

finding & harvesting

idiomatic patterns

16

Page 17: Agile Architecture and Design

finding & harvesting

idiomatic patterns

17

Page 18: Agile Architecture and Design

finding & harvesting

idiomatic patterns

see the composed method pattern Smalltalk Best Practice Patterns Kent Beck

18

Page 19: Agile Architecture and Design

harvesting idiomatic patterns

19

Page 20: Agile Architecture and Design

cyclomatic complexitymeasures the complexity of a method/function

V(G)= e - n + 2 V(G) = cyclomatic complexity of G e= # edges n= # of nodes

20

Page 21: Agile Architecture and Design

cyclomatic complexity

21

Page 22: Agile Architecture and Design

coupling

code artifact

afferent efferentx i t

22

Page 23: Agile Architecture and Design

http://struts.apache.org/

23

Page 24: Agile Architecture and Design

UIBean evaluateParams()

24

Page 25: Agile Architecture and Design

evaluate.*Params?

./org/apache/struts2/components/AbstractRemoteCallUIBean.java

./org/apache/struts2/components/Anchor.java

./org/apache/struts2/components/Autocompleter.java

./org/apache/struts2/components/Checkbox.java

./org/apache/struts2/components/ComboBox.java

./org/apache/struts2/components/DateTimePicker.java

./org/apache/struts2/components/Div.java

./org/apache/struts2/components/DoubleListUIBean.java

./org/apache/struts2/components/DoubleSelect.java

./org/apache/struts2/components/File.java

./org/apache/struts2/components/Form.java

./org/apache/struts2/components/FormButton.java

./org/apache/struts2/components/Head.java

./org/apache/struts2/components/InputTransferSelect.java

./org/apache/struts2/components/Label.java

./org/apache/struts2/components/ListUIBean.java

./org/apache/struts2/components/OptionTransferSelect.java

./org/apache/struts2/components/Password.java

./org/apache/struts2/components/Reset.java

./org/apache/struts2/components/Select.java

./org/apache/struts2/components/Submit.java

./org/apache/struts2/components/TabbedPanel.java

./org/apache/struts2/components/table/WebTable.java

./org/apache/struts2/components/TextArea.java

./org/apache/struts2/components/TextField.java

./org/apache/struts2/components/Token.java

./org/apache/struts2/components/Tree.java

./org/apache/struts2/components/UIBean.java

./org/apache/struts2/components/UpDownSelect.java

find . -name "*.java" | xargs grep -l "void evaluate.*Params"

25

Page 26: Agile Architecture and Design

build frameworksharvest

frameworks

26

Page 27: Agile Architecture and Design

agile architecture

27

Page 28: Agile Architecture and Design

yesterday’s best practice is tomorrow’s

anti-pattern

28

Page 29: Agile Architecture and Design

complectto interweave or entwine

from Latin complectī

http://www.infoq.com/presentations/Simple-Made-Easy

29

Page 30: Agile Architecture and Design

30

Page 31: Agile Architecture and Design

CRUD

images by Martin Fowler: martinfowler.com/bliki/CQRS.html

31

Page 32: Agile Architecture and Design

CQRS

http://codebetter.com/gregyoung/2010/02/16/cqrs-task-based-uis-event-sourcing-agh/

Command-Query Responsibility Segregation

32

Page 33: Agile Architecture and Design

33

Page 34: Agile Architecture and Design

Continuous Delivery

34

Page 35: Agile Architecture and Design

continuous… integrationeveryone commits to trunk at

least once a day

deployment

delivery

deploy as the last stage of continuous integration

software is always in a deployable state

35

Page 36: Agile Architecture and Design

agile 101 + continuous delivery

always production ready

business needs > operational

concerns

36

Page 37: Agile Architecture and Design

continuous integration

Fast, automated feedback on the correctness of your application

every time there is a change to code

37

Page 38: Agile Architecture and Design

continuous deliveryFast, automated feedback on the

production readiness of your application every time there is a

change — to code, infrastructure, or configuration

38

Page 39: Agile Architecture and Design

deployment pipelines

39

Page 40: Agile Architecture and Design

commit stage

run against every check-in mimics continuous integration builds down-stream artifacts if it fails, fix it immediately

40

Page 41: Agile Architecture and Design

milestone (acceptance phase)

end-to-end tests in a production-like environment triggered by upstream success all downstream tests will create their environments

41

Page 42: Agile Architecture and Design

42

Page 43: Agile Architecture and Design

component pipeline

43

Page 44: Agile Architecture and Design

pipelining libraries

44

Page 45: Agile Architecture and Design

45

Page 46: Agile Architecture and Design

functional reactive programming

46

Page 47: Agile Architecture and Design

Java 8 & Streamsiterate

filter

transform

47

Page 48: Agile Architecture and Design

Java 8 & Streams

48

Page 49: Agile Architecture and Design

49

Page 50: Agile Architecture and Design

micro-services

50

Page 51: Agile Architecture and Design

monoliths vs. micro-services

51

Page 52: Agile Architecture and Design

organized around

business capabilities

logic everywhere

logic everywhere

logic everywhere

52

Page 53: Agile Architecture and Design

organized around

business capabilities

53

Page 54: Agile Architecture and Design

products, not projects

“you build it, you run it!”

54

Page 55: Agile Architecture and Design

decentralized data management

55

Page 56: Agile Architecture and Design

decentralized governance

56

Page 57: Agile Architecture and Design

infrastructure automation

57

Page 58: Agile Architecture and Design

design for failure

clients must respond gracefully to provider failure

aggressive monitoring:

— business relevant

— architectural

— semantic

58

Page 59: Agile Architecture and Design

small, single responsibility

“small enough to fit in your head” !

don’t maintain — rewrite!

59

Page 60: Agile Architecture and Design

containerless, Unix services

embedded web container ( Jetty / SimpleWeb)

packaged as an executable

installed the same way as httpd & similar

60

Page 61: Agile Architecture and Design

James Lewis tells the story of building a resource oriented, event driven system out of applications about

1000 lines long.

http://www.infoq.com/presentations/Micro-Services

61

Page 62: Agile Architecture and Design

holistic engineering

don’t over-optimize around a particular tool or

practice and harm your overall engineering

efficiency

62

Page 63: Agile Architecture and Design

everything interconnects

cannot separate process from architecture

tools offer a primrose path

awesome while you’re on the path

awful when you need to step off

63

Page 64: Agile Architecture and Design

http://kent.spillner.org/blog/ work/2009/11/14/java-build-tools.html

“Maven builds are an infinite cycle of despair that will slowly drag you

into the deepest, darkest pits of hell (where Maven itself was

forged).”

64

Page 65: Agile Architecture and Design

composable contextualPowerShellRake Gant

languages frameworks

• more “out of the box” • better contextual intelligence • less flexibility • less ability to evolve

• less implicit behavior • better building blocks • greater eventual power • less initial power • more flexibility

65

Page 66: Agile Architecture and Design

Dietzler’s Law

what the user wants

“Users always want 100% of what they want.”

66

Page 67: Agile Architecture and Design

how do you choose?!?

67

Page 68: Agile Architecture and Design

opinionated

start with the easiest

dogmaticrigid

generic

68

Page 69: Agile Architecture and Design

never wonderful

again

69

Page 70: Agile Architecture and Design

cut & run!

70

Page 71: Agile Architecture and Design

malleability

malleable, n. - able to be hammered or pressed permanently out of shape without breaking or cracking.

capable of being altered or controlled by outside forces

emphasize malleability

always tends towards less µ

71

Page 72: Agile Architecture and Design

annealingrefactoring and restructuring exercises require increasing effort for the same result

plan escalating effort towards remedial architecture & design

tradeoff for reduced up-front effort

anneal, n. - heat (metal or glass) and allow to cool slowly, in order to remove internal stresses and toughen it

greenfield projects => emphasize malleability

brownfield projects => maximize annealing efforts

72

Page 73: Agile Architecture and Design

prefer pro/reactive to predictive

73

Page 74: Agile Architecture and Design

remove friction

74

Page 75: Agile Architecture and Design

simplify, un-tangle

75

Page 76: Agile Architecture and Design

evolve

76

Page 77: Agile Architecture and Design

deliver !

77

Page 78: Agile Architecture and Design

Thank you Enjoy the conference! Agile Architecture &

Design

78