philosophical architecture in grails

114
Philosophical Architecture (in Grails) Philosophical Architecture (in Grails)

Upload: spring-io

Post on 02-Jul-2015

551 views

Category:

Software


2 download

DESCRIPTION

Speaker: David Dawson Software development is hard. Life is hard. We try to keep up with a changing world, and it's hard. Where though, does the problem lie? In this talk, David, CEO at Simplicity Itself, will describe a different way of approaching the problem of software development, a different way of trying to keep up with a changing world. This is not a soft talk, all opinions are backed up by cold hard code in a running Grails application, showing how a change in the way you think can radically change your software.

TRANSCRIPT

Page 1: Philosophical Architecture in Grails

Philosophical Architecture

(in Grails)

Philosophical Architecture

(in Grails)

Page 2: Philosophical Architecture in Grails

David DawsonDavid Dawson

CEO @ Simplicity ItselfCEO @ Simplicity Itself

[email protected]

@davidthecoder@SimplicityItse1

[email protected]

@davidthecoder@SimplicityItse1

Page 3: Philosophical Architecture in Grails

What is Architecture?

What is Architecture?

Page 4: Philosophical Architecture in Grails

Architecturevs

Design

Architecturevs

Design

Page 5: Philosophical Architecture in Grails

Limitless OptionsFor Design

Limitless OptionsFor Design

Page 6: Philosophical Architecture in Grails

Only a few ArchitecturesOnly a few

Architectures

Page 7: Philosophical Architecture in Grails

Grails' 'default'Architecture

Grails' 'default'Architecture

Page 8: Philosophical Architecture in Grails

Grails' 'default'Architecture

N-Tier

Grails' 'default'Architecture

N-Tier

Page 9: Philosophical Architecture in Grails

Grails' 'default'Architecture

N-TierData Centric

Grails' 'default'Architecture

N-TierData Centric

Page 10: Philosophical Architecture in Grails
Page 11: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Page 12: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Page 13: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Service LayerService Layer

Page 14: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Service LayerService Layer

Data LayerData Layer

Page 15: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Service LayerService Layer

Data LayerData Layer

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

Page 16: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Service LayerService Layer

Data LayerData Layer

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

Page 17: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Service LayerService Layer

Data LayerData Layer

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

1.21.2

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

Page 18: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Service LayerService Layer

Data LayerData Layer

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

1.31.3

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

DataServiceDataService

DataServiceDataService

DataServiceDataService MehServ iceMehServ iceBlahServiceBlahServiceDataServiceDataService GahServiceGahService

DoWorkServiceDoWorkService

Page 19: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Service LayerService Layer

Data LayerData Layer

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

1.31.3

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

DataServiceDataService

DataServiceDataService

DataServiceDataService MehServ iceMehServ iceBlahServiceBlahServiceDataServiceDataService GahServiceGahService

DoWorkServiceDoWorkService

VIEWSVIEWS

Page 20: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Service LayerService Layer

Data LayerData Layer

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

1.31.3

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

DataServiceDataService

DataServiceDataService

DataServiceDataService MehServ iceMehServ iceBlahServiceBlahServiceDataServiceDataService GahServiceGahService

DoWorkServiceDoWorkService

VIEWSVIEWS

Page 21: Philosophical Architecture in Grails

My Green Field ProjectMy Green Field Project

Web/ MVC LayerWeb/ MVC Layer

Service LayerService Layer

Data LayerData Layer

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

1.31.3

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

DataControllerDataController UserControllerUserController AuthControllerAuthController

DataServiceDataService UserServiceUserService

UserUser

OAuthControllerOAuthController

RandomServiceRandomService

UserSupportUserSupportPointPoint

DataServiceDataService

DataServiceDataService

DataServiceDataService MehServ iceMehServ iceBlahServiceBlahServiceDataServiceDataService GahServiceGahService

DoWorkServiceDoWorkService

VIEWSVIEWS

Page 22: Philosophical Architecture in Grails

Issues ..Issues ..

Page 23: Philosophical Architecture in Grails

Issues ..

Coupling between tiers

Issues ..

Coupling between tiers

Page 24: Philosophical Architecture in Grails

Issues ..

Coupling between tiers

Service Spaghetti

Issues ..

Coupling between tiers

Service Spaghetti

Page 25: Philosophical Architecture in Grails

Issues ..

Coupling between tiers

Service Spaghetti

User exposed to data model

Issues ..

Coupling between tiers

Service Spaghetti

User exposed to data model

Page 26: Philosophical Architecture in Grails
Page 27: Philosophical Architecture in Grails

ArchitectureArchitecture

Page 28: Philosophical Architecture in Grails

ArchitectureData CentricArchitectureData Centric

Page 29: Philosophical Architecture in Grails

ArchitectureData Centric

N-Tier

ArchitectureData Centric

N-Tier

Page 30: Philosophical Architecture in Grails

What is Architecture?

What is Architecture?

Page 31: Philosophical Architecture in Grails

ArchitectureIs PhilosophyArchitecture

Is Philosophy

Page 32: Philosophical Architecture in Grails

What is yourPhilosophy?

Page 33: Philosophical Architecture in Grails

Perfection

Page 34: Philosophical Architecture in Grails

and How It Ruined the World

Perfection

Page 35: Philosophical Architecture in Grails

Plato'sTheory of

Ideal Forms

Plato'sTheory of

Ideal Forms

Page 36: Philosophical Architecture in Grails
Page 37: Philosophical Architecture in Grails
Page 38: Philosophical Architecture in Grails

Aristotlean CategoriesAristotlean Categories

Page 39: Philosophical Architecture in Grails

Where did this lead?Where did this lead?

Page 40: Philosophical Architecture in Grails
Page 41: Philosophical Architecture in Grails

TODO, Petra

TODO, Petra

Page 42: Philosophical Architecture in Grails

UtopiaUtopia

Page 43: Philosophical Architecture in Grails

Waterfall!Waterfall!

Page 44: Philosophical Architecture in Grails

Pure Functional

Programming

Pure Functional

Programming

Page 45: Philosophical Architecture in Grails

SOA?SOA?

Page 46: Philosophical Architecture in Grails

That's awfulThat's awful

Page 47: Philosophical Architecture in Grails

"le mieux est l'ennemi du bien"

"le mieux est l'ennemi du bien"

- Voltaire- Voltaire

Page 48: Philosophical Architecture in Grails

- Voltaire- Voltaire

"the perfect is the enemy of the good""the perfect is the

enemy of the good"

Page 49: Philosophical Architecture in Grails

Back In

Time

Back In

Time

Page 50: Philosophical Architecture in Grails
Page 51: Philosophical Architecture in Grails

No man ever steps in the same river twice

No man ever steps in the same river twice

- Heraclitus (a long time ago)

- Heraclitus (a long time ago)

Page 52: Philosophical Architecture in Grails
Page 53: Philosophical Architecture in Grails
Page 54: Philosophical Architecture in Grails

Perfection is a liePerfection is a lie

Page 55: Philosophical Architecture in Grails

Change is the only Truth

Change is the only Truth

Page 56: Philosophical Architecture in Grails

The StoicsThe Stoics

Page 57: Philosophical Architecture in Grails

The StoicsThe Stoics

Page 58: Philosophical Architecture in Grails

Stoicism for DevelopersStoicism for Developers

Page 59: Philosophical Architecture in Grails

sick and yet happysick and yet happy

Stoicism for DevelopersStoicism for Developers

Page 60: Philosophical Architecture in Grails

sick and yet happyin peril and yet happy sick and yet happyin peril and yet happy

Stoicism for DevelopersStoicism for Developers

Page 61: Philosophical Architecture in Grails

sick and yet happyin peril and yet happy dying and yet happy

sick and yet happyin peril and yet happy dying and yet happy

Stoicism for DevelopersStoicism for Developers

Page 62: Philosophical Architecture in Grails

sick and yet happyin peril and yet happy dying and yet happyin exile and happy

sick and yet happyin peril and yet happy dying and yet happyin exile and happy

Stoicism for DevelopersStoicism for Developers

Page 63: Philosophical Architecture in Grails

sick and yet happyin peril and yet happy dying and yet happyin exile and happyin disgrace and happy

sick and yet happyin peril and yet happy dying and yet happyin exile and happyin disgrace and happy

Stoicism for DevelopersStoicism for Developers

Page 64: Philosophical Architecture in Grails

How can this be

applied?

How can this be

applied?

Page 65: Philosophical Architecture in Grails

PragmatismPragmatism

Page 66: Philosophical Architecture in Grails

Reject DogmaReject Dogma

Page 67: Philosophical Architecture in Grails

Gather ProofGather Proof

Page 68: Philosophical Architecture in Grails

Change is Real

Change is Real

Page 69: Philosophical Architecture in Grails

David, show them some code

David, show them some code

Page 70: Philosophical Architecture in Grails

A Business ProcessA Business Process

Page 71: Philosophical Architecture in Grails

A Business ProcessA Business Process

(Workflow)(Workflow)

Page 72: Philosophical Architecture in Grails

A Business ProcessA Business Process

(Workflow)(Workflow)

Create DocumentCreate Document

Page 73: Philosophical Architecture in Grails

A Business ProcessA Business Process

(Workflow)(Workflow)

Create DocumentCreate DocumentCreate DocumentCreate Document Review DocumentReview Document

Page 74: Philosophical Architecture in Grails

A Business ProcessA Business Process

(Workflow)(Workflow)

Create DocumentCreate DocumentCreate DocumentCreate Document Review DocumentReview Document Approve DocumentApprove Document

Page 75: Philosophical Architecture in Grails

A Business ProcessA Business Process

(Workflow)(Workflow)

Create DocumentCreate DocumentCreate DocumentCreate Document Review DocumentReview Document Approve DocumentApprove Document

RejectReject

Page 76: Philosophical Architecture in Grails

A Business ProcessA Business Process

(Workflow)(Workflow)

Create DocumentCreate DocumentCreate DocumentCreate Document Review DocumentReview Document Approve DocumentApprove Document

RejectReject Insert into SystemInsert into System

Page 77: Philosophical Architecture in Grails

The ChallengesThe Challenges

Page 78: Philosophical Architecture in Grails

●The DBA likes to change things●The DBA likes to change things

The ChallengesThe Challenges

Page 79: Philosophical Architecture in Grails

●The DBA likes to change things

●The UI will need updating every week.

●The DBA likes to change things

●The UI will need updating every week.

The ChallengesThe Challenges

Page 80: Philosophical Architecture in Grails

●The DBA likes to change things

●The UI will need updating every week.

●The Document system gets a new major version every 2 months.

●The DBA likes to change things

●The UI will need updating every week.

●The Document system gets a new major version every 2 months.

The ChallengesThe Challenges

Page 81: Philosophical Architecture in Grails

David, show them some code

David, show them some code

Page 82: Philosophical Architecture in Grails

The 'Life Preserver'

Approach

The 'Life Preserver'

Approach

Page 83: Philosophical Architecture in Grails
Page 84: Philosophical Architecture in Grails

Core Domain

Application PoliciesBusiness Rules

Core Domain

Application PoliciesBusiness Rules

Page 85: Philosophical Architecture in Grails

DocumentWorkflowDocumentWorkflow

Page 86: Philosophical Architecture in Grails

DatabaseDatabaseDocumentWorkflowDocumentWorkflow

Page 87: Philosophical Architecture in Grails

DatabaseDatabase

DocumentSystemIntegration

DocumentSystemIntegration

DocumentWorkflowDocumentWorkflow

Page 88: Philosophical Architecture in Grails

RESTREST

DatabaseDatabase

DocumentSystemIntegration

DocumentSystemIntegration

DocumentWorkflowDocumentWorkflow

Page 89: Philosophical Architecture in Grails

RESTRESTUIUI

DatabaseDatabase

DocumentSystemIntegration

DocumentSystemIntegration

DocumentWorkflowDocumentWorkflow

Page 90: Philosophical Architecture in Grails

Events!Events!

Page 91: Philosophical Architecture in Grails

What areEvents?What areEvents?

Page 92: Philosophical Architecture in Grails

Asynchronous?Asynchronous?

Page 93: Philosophical Architecture in Grails

CommunicationCommunication

Page 94: Philosophical Architecture in Grails

Imperativeto

Declarative

Imperativeto

Declarative

Page 95: Philosophical Architecture in Grails

Give me MilkGive me Milk

OKOK

Page 96: Philosophical Architecture in Grails

I used all the milkI used all the milk

I'll get someI'll get some

Page 97: Philosophical Architecture in Grails

Point of Decision moves

Caller ==> Callee

Point of Decision moves

Caller ==> Callee

Page 98: Philosophical Architecture in Grails

David, show them some code

David, show them some code

Page 99: Philosophical Architecture in Grails

we will use:we will use:

Page 100: Philosophical Architecture in Grails

we will use:

Communication Centric

we will use:

Communication Centric

Page 101: Philosophical Architecture in Grails

we will use:

Communication CentricDomain Based

we will use:

Communication CentricDomain Based

Page 102: Philosophical Architecture in Grails

we will use:

Communication CentricDomain Based

Architecture

we will use:

Communication CentricDomain Based

Architecture

Page 103: Philosophical Architecture in Grails

we will use:

No NewFrameworks

we will use:

No NewFrameworks

Page 104: Philosophical Architecture in Grails

David, show them some code

David, show them some code

Page 105: Philosophical Architecture in Grails

https://github.com/daviddawson/philosophical-architecturehttps://github.com/daviddawson/philosophical-architecture

David, show them some code

David, show them some code

Page 106: Philosophical Architecture in Grails

What Next?What Next?

Page 107: Philosophical Architecture in Grails

RESTRESTUIUI

DatabaseDatabase

DocumentSystemIntegration

DocumentSystemIntegration

DocumentWorkflowDocumentWorkflow

Page 108: Philosophical Architecture in Grails

Split DomainsInto Plugins

Split DomainsInto Plugins

Page 109: Philosophical Architecture in Grails

Split DomainsInto

Microservices

Split DomainsInto

Microservices

Page 110: Philosophical Architecture in Grails

Blatant PromoBlatant Promo

Trouble changing your software?

[email protected]

Trouble changing your software?

[email protected]

Page 111: Philosophical Architecture in Grails

Blatant PromoBlatant Promo

https://skillsmatter.com/conferences/6312-muconhttps://skillsmatter.com/conferences/6312-mucon

µCon: The Microservices Conference27th, 28th November, LondonµCon: The Microservices Conference27th, 28th November, London

Page 112: Philosophical Architecture in Grails

Blatant PromoBlatant Promo

Simplicity in Software Workshop, Friday 19th July

Simplicity in Software Workshop, Friday 19th July

Page 113: Philosophical Architecture in Grails

Questions?Questions?

Page 114: Philosophical Architecture in Grails

Thank you!Thank you!

@davidthecoder@davidthecoder