Top Banner
@aahoogendoorn | www.ditisagile.nl Building better software faster 1 @aahoogendoorn | www.ditisagile.nl Building better software faster Sander Hoogendoorn ditisagile.nl
65

Building Better Software Faster

Apr 16, 2017

Download

Software

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: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 1

@aahoogendoorn | www.ditisagile.nl

Buildingbettersoftwarefaster

Sander Hoogendoornditisagile.nl

Page 2: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 2

Sander Hoogendoorn

MeDad, software architect, agile coach, programmer, trainer, speaker, writerBooks, articles, conferences, courses

WorkOwner ditisagile.nlCTO ANVAFormer CTO insurance companyFormer global agile thoughtleader Capgemini

Webwww.sanderhoogendoorn.comaahoogendoornaahoogendoorn [email protected]

Page 3: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 3

Page 4: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 4

As a project managerI would like to demo untested code so I embarrass myself

Page 5: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 5

@aahoogendoorn | www.ditisagile.nl

The Times They Are a-Changin'

Page 6: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 6

Moore’s LawThe number of transistors in a dense integrated circuit doubles approximately every two years.

Page 7: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 7

Page 8: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 8

Page 9: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 9

Page 10: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 10

@aahoogendoorn | www.ditisagile.nl

The Times They Are a-Changin'On our block

Page 11: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 11

Page 12: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 12

Page 13: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 13

Page 14: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 14

Too much, too soon Hard to deliver, harder to test, impossible to maintain

Page 15: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 15

Page 16: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 16

Page 17: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 17

Page 18: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 18

Page 19: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 19

Dependencies will kill you

Page 20: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 20

@aahoogendoorn | www.ditisagile.nl

MicroservicesA definition

Page 21: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 21

MicroservicesIn short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.

These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized managementof these services, which may be written in different programming languages and use different data storage technologies.

Martin Fowler

Page 22: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 22

Page 23: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 23

@aahoogendoorn | www.ditisagile.nl

From the trenchesMicroservices in real life

Page 24: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 24

For the things we have to learn before we can do them, we learn by doing them

Aristotle

Page 25: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 25

Page 26: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 26

Microservices require an evolutionary software architecture

Page 27: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 27

@aahoogendoorn | www.ditisagile.nl

Some guidingprinciplesBusiness processes first

Page 28: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 28

We implement business processesWe move towards a systems landscape consisting of micro-applications and micro-componentsRequirements are modeled (in smart use cases)Micro-applications implement a single elementary business processMicro-applications and micro-components all have their own bounded contextMicro-applications do not have storage, and only talk to other micro-applications and micro-componentsMicro-components have their own storage (in MongoDB), and only talk to other micro-componentsCommunication uses a simple open protocol – JSON on REST We avoid transactions as much as possible

Some guiding principles

Page 29: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 30

Smart use cases

Page 30: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 31

Presentation

Process

Domain

Services

Outside world

PagesGrids, Panels, Controls

Use casesFlow

Factories, RepositoriesEntities, Enums, Value objects

Gateways

ComponentsRelations Dossiers Intermediaries Accounts Rates

Page 31: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 32

Service interface

Process

Domain

Data / Services

Outside world

ResourcesRepresentations

Use casesFlow

Factories, RepositoriesEntities, Enums, Value objects

Gateways

StorageRelations Dossiers Intermediaries MongoDB

Page 32: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 33

@aahoogendoorn | www.ditisagile.nl

Designing microservicesModular design and bounded contexts

Page 33: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 34

Doing big up-front design is dumb, doing no design up-front is even dumber

Dave Thomas

Page 34: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 35

Bounded contexts

Page 35: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 36

Single responsibility principleGroup together things that change togetherSeparate things that change for different reason

Page 36: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 37

Bounded contextWhen you model larger domains, it becomes progressively harder to create this single unified model. Instead of creating a single unified model, you create several, all valid within their bounded context

Page 37: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 38

The single unified domain modelOr more often the humongous data model

Product

Vendor

Stock

Order

Client

Delivery

Payment

Page 38: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 39

Bounded contexts

Product

Vendor

Stock

Order

Client

Delivery

Payment

Product

Page 39: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 40

Page 40: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 44

@aahoogendoorn | www.ditisagile.nl

Testing microservicesFailing fast

Page 41: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 45

Fail fast, fail often, fail forward

Page 42: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 46

Manual tests

Scenario tests

Integration tests

Unit tests

Page 43: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 47

Manual tests

Scenario tests

API tests

Unittests

Page 44: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 48

A development lifecycleWhat to test?

Code Developer Test Test Integration

TestAcceptance

Test LivePrepareand Design

DevelopersUnit tests

DevelopersPeer review

TestersScenario’sAnd API’s

TestersScenario’sand API’s

Product ownerProduct

Page 45: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 49

Even though you might have really brilliant testers…

ExploratoryTesting,anyone?

Page 46: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 52

@aahoogendoorn | www.ditisagile.nl

Deploying microservicesContinuous integrationand build pipelines

Page 47: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 53

How often do you deploy to production?

Page 48: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 54

A typical build pipeline

Code Developer Test Test Integration

TestAcceptance

Test LivePrepare and Design

Page 49: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 55

ProductionAcceptanceIntegrationTestDevelopment

A typical build pipelineTraditional (virtual) infrastructure

Code Developer Test Test Integration

TestAcceptance

Test LivePrepare and Design

Page 50: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 56

ProductionProvisionedProvisionedProvisionedDevelopment

A typical build pipelineProvisioned infrastructure (on the fly)

Code Developer Test Test Integration

TestAcceptance

Test LivePrepare and Design

Page 51: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 58

Microservices Building multiple deployment pipelines

Code Developer Test Test Acceptance

Test Acceptance Live

Code Developer Test Test Acceptance

Test Acceptance Live

Code Developer Test Test Acceptance

Test Acceptance Live

Code Developer Test Test Acceptance

Test Acceptance Live

Page 52: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 59

Infrastructure as code

Page 53: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 60

@aahoogendoorn | www.ditisagile.nl

AgilebeyondScrumTowards continuously delivering software

Page 54: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 61

Lowering our fences

Page 55: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 62

Dogmagile

Page 56: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 63

The red sprint anti-pattern

Page 57: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 64

Minimal viable productsThink small, deploy early and frequently

Page 58: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 65

Do we need this

NOW?

Page 59: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 66

Roadmaps over plansWhile there is value in the items on the right, we value the items on the left more

Page 60: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 67

Page 61: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 68

Continuous delivery An approach in which teams ensure that every change to the system is releasable, and that we can release any version at the push of a button.

Aimed to make releases boring, so we can deliver frequently and get fast feedback on what users care about.Jez Humble

Page 62: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 71

@aahoogendoorn | www.ditisagile.nl

In retrospectiveSome final thoughts

Page 63: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 72

The times are a-changin’How are we going to keep up?

Towardsmicro-applications and microservices

Modelingrequirements

Focus oncore

technologies

Continuousdelivery

Minimal viableproducts

Rationalizeour legacy

Domain driven design

Leveragethe cloud

Page 64: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 73

Page 65: Building Better Software Faster

@aahoogendoorn | www.ditisagile.nlBuilding better software faster 74

@aahoogendoorn | www.ditisagile.nl

References and questions

www.sanderhoogendoorn.com

www.ditisagile.nl

aahoogendoorn

aahoogendoorn

[email protected]