small is beautiful

78
small is beautiful

Upload: vivek-singh

Post on 16-Apr-2017

184 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Small is beautiful

small is beautiful

Page 2: Small is beautiful

small methodssmall classessmall team

small companysmall away day :-)

Page 3: Small is beautiful

big problemscomplex world

lot of talentbig aspirations

but....

Page 4: Small is beautiful

e.g., can a small company solve big problems?

Page 5: Small is beautiful

lets leave that for the bar

Page 6: Small is beautiful

we care about beautifulsmall is means

Page 7: Small is beautiful

why we like small in software

Page 8: Small is beautiful

simpler to understand

Page 9: Small is beautiful

easier to change

Page 10: Small is beautiful

faster to get our work done

Page 11: Small is beautiful

we like making progress

Page 12: Small is beautiful

small in software development

Page 13: Small is beautiful

small methodssmall classes

small modulessmall applications

small teams

Page 14: Small is beautiful

small methods

Page 15: Small is beautiful

tell don't askextract method refactoring

strategy pattern....

Page 16: Small is beautiful

extract method

when to stop?extract only when it adds beauty

Page 17: Small is beautiful

avoid compression

Page 18: Small is beautiful

when to stop, when is if-else betterwhen strategy is not a domain concept

simplicity > small

strategy pattern

Page 19: Small is beautiful

small classes

Page 20: Small is beautiful

extract class refactoring

Page 21: Small is beautiful

http://www.refactoring.com/catalog/extractClass.html

Page 22: Small is beautiful

can be applied to a primitive, collection or domain primitive

Page 23: Small is beautiful

number --> money --> salary

language primitivedomain primitive

value object

Page 24: Small is beautiful

smaller modules

Page 25: Small is beautiful

module by responsibility types

Page 26: Small is beautiful

repositoriesdomainservicescontractsmappers

a service module

Page 27: Small is beautiful

does this add beauty?

Page 28: Small is beautiful

doesn't scaleover period of time everything still bloats

not much

Page 29: Small is beautiful

Conceptually

Page 30: Small is beautiful

modules by domain

Page 31: Small is beautiful
Page 32: Small is beautiful

reference dataorganization

customer, productaccounts

payments, cash flow, questionnaire

module layers (mifos)

Page 33: Small is beautiful

weak links between modulescohesion within a module

identical rate of change of data

to find modules

Page 34: Small is beautiful

hard to evolve todeliberately design and implement

for me..

Page 35: Small is beautiful

consequences

Page 36: Small is beautiful

module encapsulate complexity

Page 37: Small is beautiful

only interact to module using its interface

provides decoupling

Page 38: Small is beautiful

domain model externally in-visibleno cross module entity relationship

[hibernate]use identity

can still use foreign keys

encapsulated domain

Page 39: Small is beautiful

inter module communication

Page 40: Small is beautiful

to dependee module

ask

Page 41: Small is beautiful

pass message (logical)

e.g. accounts to payments module, tellmakeEntries(amount, customerId)

instead pass messagepaymentMade(amount, customerId)

no assumption of implementation

to sibling module

Page 42: Small is beautiful

use eventsproduct to account module

meetingScheduleChanged(productType)

with dependent module

Page 43: Small is beautiful

cross cutting module

performancecross module operations

Page 44: Small is beautiful

module not just to provide reusabilitybut to stay small

Page 45: Small is beautiful

namespaces, for layers in a domain module

Page 46: Small is beautiful

small applications

Page 47: Small is beautiful

un-shared codeserving some utilityun-shared database

what is an application

Page 48: Small is beautiful

don’t reinventbe lazy first look outside

simplest rule

Page 49: Small is beautiful

deploymentusers

departmentasynchronous processes

contained workflowsloose coupling

how to carve applications

Page 50: Small is beautiful

examples

Page 51: Small is beautiful

public websitecall centerfulfillment

user and workflow driven

trainlines

Page 52: Small is beautiful

outlooksanitization

managementsynchronization

user and workflow driven

bcg

Page 53: Small is beautiful

unnoticed in insurecom

Page 54: Small is beautiful

single ugly monolith (although….)

administrationaccounting

policy and claims…

insurecom

Page 55: Small is beautiful

too small applicationsrackspace

Page 56: Small is beautiful

same users, different applications, dealing with similar data

too fine breakup

rackspace

Page 57: Small is beautiful

challengestest of the parition

Page 58: Small is beautiful

joins across systems

Page 59: Small is beautiful

e.g.show all unused IP address in this data

center

Page 60: Small is beautiful

put databases on same serverselect … from location.datacenters,

network.ipblocks where ….

hack!

Page 61: Small is beautiful

query one and query another with resultchange use case, what does user want

reporting from data warehouseis it happening quite frequently?

Page 62: Small is beautiful

transaction across systems

Page 63: Small is beautiful

distributed transaction

bad performanceavailability impact

Page 64: Small is beautiful

idempotent operationsasynchronous updates

decentralized datais it happening quite frequently?

Page 65: Small is beautiful

centralized data application

configuration data in rackspace

Page 66: Small is beautiful

de-centralize your data

Page 67: Small is beautiful

configuration data in rackspace

location configurationnetwork configuration

…..

Page 68: Small is beautiful

explain principlesexplain application architecture

build common vocabularytake feedback

evolve

customer and analysts

Page 69: Small is beautiful

small teams

Page 70: Small is beautiful

20 members

developer team = 10qa team = 6

build & deployment team = 4

beautiful?

Page 71: Small is beautiful

journey search & journey options

Page 72: Small is beautiful

same locationno contracts

artificial user storiesdatabase based dependencysame continuous integration

beautiful?team by module

babies joined at hip

Page 73: Small is beautiful

website and call center

Page 74: Small is beautiful

different locationINVEST storiesloose coupling

different continuous integrationbusiness contracts

team by application

Page 75: Small is beautiful

INVEST storiesown continuous integration

own releasedifferent location

application contracts

small team test

Page 76: Small is beautiful

beware of conway's law

software provides archaeological evidence of people/team who worked on it

Page 77: Small is beautiful

architecture and team organization are not independent

Page 78: Small is beautiful

questions