SLIDE 1
REBUILDING THE MONOLITH WITH COMPOSABLE APPS
SLIDE 2 https://www.quora.com/Why-are-front-end-developers-so-high-in-demand-at-startups-if-front-end-development-is-relatively-easier-than-other-fields-of-engineering
SLIDE 3
SLIDE 4
2013
SLIDE 5
SLIDE 6
SLIDE 7
SLIDE 8
SLIDE 9
SLIDE 10
http://conference.phpnw.org.uk/phpnw13/schedule/dan-rathbone/
SLIDE 11
SLIDE 12
SLIDE 13
XHR
SLIDE 14
SLIDE 15
2014
SLIDE 16
SLIDE 17
SLIDE 18
SLIDE 19
SLIDE 20
SLIDE 21
WHY DO WE CARE SO MUCH ABOUT MOBILE?
Because it makes up a huge proportion of our traffic, of which there is lots…
SLIDE 22
SLIDE 23
SLIDE 24
SLIDE 25
SLIDE 26
MOBILE IS GROWING AT A SCARY RATE TOO…
SLIDE 27 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
Weekly Uniques on Mobile
SLIDE 28
SLIDE 29
SLIDE 30
BACK TO THE TECH
What are the challenges we were facing?
SLIDE 31
Create a more engaging customer experience Increase the resilience of our core features Scale our product Scale our teams
SLIDE 32
Nothing rendered by JavaScript No knowledge of routing in client State stored in data attributes in the DOM Spaghetti OO style JavaScript reliant on directly bound event listeners Increasingly real-time and interactive product demands
SLIDE 33
SLIDE 34
SLIDE 35
SLIDE 36
SLIDE 37
“From a people and culture point of view, we’re very focused on maintaining the things that made Sky Bet great as we scale up the internal team – we doubled the number of employees last year.”
http://www.silicon.co.uk/cloud/it-life-andy-burton-cto-sky-bet-197113
SLIDE 38
WHOLLY OWNED, VERTICAL SLICES
SLIDE 39 “Favor object composition over class inheritance… ...You should be able to get all the functionality you need just by assembling existing components through
Gamma et al, 1994
SLIDE 40
SLIDE 41
CHOOSING THE TECH STACK
SLIDE 42
“Don’t Rewrite, React”
Ryan Florence, React Europe 2015
SLIDE 43
SLIDE 44
SLIDE 45
SLIDE 46
SLIDE 47
SLIDE 48
IN PRACTICE IT’S NEVER THAT SIMPLE
SLIDE 49
Independent components may share data requirements Real-time updates need to happen simultaneously to ensure consistent experience Apps may share code dependencies (i.e. Ramda) How do we instantiate these things?
SLIDE 50
IT GETS HARDER AS THE PRODUCT REQUIREMENTS GROW MORE DETAILED
SLIDE 51
SLIDE 52
WORKING WITH COMPONENTS
SLIDE 53
SLIDE 54
SLIDE 55
FUNCTIONAL COMPOSITION
SLIDE 56
“It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures..”
Alan Perlis
SLIDE 57
SLIDE 58
ENCAPSULATE CSS
SLIDE 59
SLIDE 60
EXTRACT LOW LEVEL DESIGN LANGUAGE
SLIDE 61
SLIDE 62
SLIDE 63
THE ELEVENTH HOUR CURVE BALL
SLIDE 64
SLIDE 65
DELIVER A MARKET LEADING REQUESTABET™ PRODUCT FOR THE START OF THE PREMIER LEAGUE SEASON
(That gave us less than six weeks)
SLIDE 66
SLIDE 67 Allow customers to request a bet consisting of outcomes from the same event Select outcomes from a curated list of markets and add them to your request cart Request the bet – if it can be priced immediately you’ll see the result in real-time,
- therwise it will be sent to
the trading team Your requests are stored locally and a push notification is sent to the device to notify when the trading team have stopped pricing requests
SLIDE 68
When a selection is added we calculate suggestions using a web worker When a request is submitted, we can use the pre-built suggestions list to show you highly related options Web worker runs in separate JavaScript thread to minimise performance overhead
SLIDE 69
WORKING WITH REACT AND THE CLIENT-SIDE COMPONENT APPROACH ALLOWED US TO DEVELOP THE FEATURE IN PARALLEL TO THE EXISTING ROADMAP
SLIDE 70
CUSTOMERS LOVE THE FEATURE
(And we delivered it with a week to spare)
SLIDE 71
SLIDE 72
SLIDE 73
OVER 1 MILLION UNIQUE USERS SINCE LAUNCH AND ROUGHLY 1.7 MILLION UNIQUE REQUESTS RECEIVED BY TRADERS
SLIDE 74
THE BITS THAT DIDN’T GO SO WELL
SLIDE 75
BUILT COMPONENTS IN THE UI-LIBRARY TOO SOON
SLIDE 76
SERVER RENDERING
SLIDE 77
SOME FUNCTIONAL TECHNIQUES CAME WITH A STEEP LEARNING CURVE
SLIDE 78
TEAM NAMES MATTER MORE THAN YOU THINK
SLIDE 79
HAVE WELL DOCUMENTED ENGINEERING PRINCIPLES WHICH ARE ACTIVELY DISCUSSED
SLIDE 80
SLIDE 81
TDD, PAIRING AND CODE REVIEW KEEP THE QUALITY BAR HIGH
SLIDE 82
WHAT’S NEXT?
SLIDE 83
SLIDE 84
Create a more engaging customer experience Increase the resilience of our core features Scale our product Scale our teams
SLIDE 85
SLIDE 86
SLIDE 87
THANK YOU
Ian Thomas – Principal Engineer, Sky Betting & Gaming @anatomic