Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ReactiveConf: Lessons Migrating Complex Software
Search
Jack Franklin
October 26, 2017
Technology
530
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ReactiveConf: Lessons Migrating Complex Software
Jack Franklin
October 26, 2017
More Decks by Jack Franklin
See All by Jack Franklin
Advanced React Meetup: Testing JavaScript
jackfranklin
1
280
Components on the Web: Frontend NE
jackfranklin
1
850
Front Trends: Migrating complex software
jackfranklin
1
860
Migrating from Angular to React: Manc React
jackfranklin
1
220
Half Stack Fest: Webpack
jackfranklin
4
600
FullStackFest: Elm for JS Developers
jackfranklin
1
270
Codelicious: Intro to ES2015
jackfranklin
0
460
PolyConf: Elm for JS Developers
jackfranklin
0
310
JSCamp Romania: Elm for JS Developers
jackfranklin
1
320
Other Decks in Technology
See All in Technology
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
560
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
200
【Google Cloud Next Tokyo'26】Gemini Enterprise と Oracle AI Database で実現する、業務データ活用を実現する AI エージェント実装
shisyu_gaku
0
250
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
290
ボトムアップ文化が強い組織で セキュリティをどう根付かせていくかの現在進行形の話 / Making Security Stick in a Bottom-Up Organization
yamaguchitk333
0
220
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1.2k
【CEDEC2026】ゲームシナリオライターを支援するAIツール開発の実践 ― 設計とプロンプトの工夫 ―
cygames
PRO
1
840
AIコーディングの次。コードレビューと理解負荷を解消して組織の開発生産性を高める
moongift
PRO
2
2.5k
同じWAFが、攻撃の“形”は弾く── 正当な“形”の不正は通す
kuroneko13
0
190
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
240
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
17
7.3k
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
250
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Six Lessons from altMBA
skipperchong
29
4.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Test your architecture with Archunit
thirion
1
2.3k
sira's awesome portfolio website redesign presentation
elsirapls
0
320
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
56k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
910
We Have a Design System, Now What?
morganepeng
55
8.3k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Transcript
None
!
Migrating complex so!ware @Jack_Franklin
None
Thank you Kristina!
Thank you Kristina! From now on I'll be taking steps
to avoid elevators.
None
None
None
None
The Store
Started 2 years ago, built on Angular 1 Tickets being
sold constantly Used by our flagship clients
The store works well. But changing it is very tricky.
Legacy codebase An old version of Angular 1 Feature bloat
Original developers have gone
We lack confidence in our system.
The Four T's — Tech — Tests — Team —
Talking
Tech
None
Big bang vs incremental
None
None
None
None
Bit by bit ! Release early and often, one bit
by a time Learn as we migrate and get better at it Don't break any existing functionality
https://www.martinfowler.com/bliki/ StranglerApplication.html
We shipped migrated code the day a!er starting this migration.
The Theory Components (or directives in Angular)
None
None
None
None
None
None
Migrating a component
Write the React component import React, { Component } from
'react' class ListingsButton extends Component { // code left out to save space :) render() { return ( <a href="" className="">Buy now!</a> ) } }
But how do we embed this within Angular? Angular directives
are used as if they were custom HTML elements: <li> <h2>Rihanna at The O2</h2> <listings-button url="...">Buy now</listings-button> </li>
None
With ngReact <li> <h2>Rihanna at The O2</h2> <react-component name="ListingsButton" props="..."
/> </li>
We can continue this strategy, migrating the other components to
React: <li> <react-component name="ListingsTitle" props="..." /> <react-component name="ListingsButton" props="..." /> </li>
None
And now we can migrate this into one big React
component! import React, { Component } from 'react' import ListingsTitle from './listings-title' import ListingsButton from './listings-button' class ListingsItem extends Component { render() { return ( <li> <ListingsTitle ... /> <ListingsButton ... /> </li> ) } }
And update our template <react-component name="ListingsItem" props="..." />
None
And we now rinse and repeat as we replace Angular
with React.
Tests
We cannot break the store
Unit tests Migrated from Angular to React + added to
as appropriate.
https://www.sitepoint.com/test-react-components-jest/
Unit tests are coupled to the implementation code.
Acceptance tests Automated tests that are entirely decoupled to the
application code.
None
Slow to run - so we select key user flows
to cover.
Team
Keeping people happy and productive We knew this migration was
going to be at least 6 months, more likely closer to a year. 1 1 It was a year
None
None
None
Momentum & Prioritisation
One of the goals of this migration is to make
it easier to fix bugs with confidence.
Pick work based on bugs and churn rate, not code
quality
None
None
None
Mix larger, multi-week work with short, 1-2 day work, to
keep momentum.
None
Break down large work into smaller cards and pull requests
Feature branches
None
None
Release early, release o!en Encourages small pull requests and units
of work
Release early, release o!en Keeps momentum up in the team
and keeps risk to a minimum
Release early, release o!en ! Easier to react 2 to
a bug if release causes it 2 pun very much intended
The scout's rule Always leave things better than when you
found them.
A migrated codebase is not a perfect code base
The next time you touch some code, you'll know more
about it than before. So why make it perfect now?
The lo!ery factor Thanks to https://twitter.com/aaronjrandall for the term
knowledge-base.md
Metrics, metrics, metrics
None
None
None
None
Tooling
Migrations are a good excuse to upgrade your tools.
By providing a mix of migration tasks (big, small, visual,
"under the hood", tooling), we're able to keep work fun and interesting
Talking
The most important people to convince are not in your
tech team.
And they don't care about frameworks
"React's lifecycle methods and small API is easier for developers
to learn"
"React's state model is less magical; its unidirectional data flow
really simplifies code and makes it easier to reason about"
None
"Right now when you ask us for a new feature,
or bug fix, it's hard and takes a long time to fix and have confidence that we've not inadvertently broken anything else"
"We will improve our mobile load time + performance so
users on mobiles should see fewer issues and have a nicer experience"
Fix bugs that cause pain for other departments
None
Keep people in the loop
Deal with !
http://gunshowcomic.com/648
We put a lot of work into making sure things
don't go wrong on production. But unfortunately they will, at some point.
There are two types of developer 3 3 shamelessly stolen
from Twitter! https://twitter.com/beerops/status/866808660030345218
Those who have broken production Those who are about to
break production
Apologies to the 3 people who bought tickets for a
concert on the wrong day in Tokyo because of me ! We did fix it though and sort these people out! :)
1. What? went wrong 2. Why? did we not catch
it 3. How? did we fix it 4. How? will we prevent it happening again
It's a two way street
Takeaways
1. Don't migrate for the sake of it
2. Plan, plan and plan again
3. Cross business communication is so important.
4. Prioritise based on pain points in your current application
5. Mix up tasks based on difficulty + type to
keep it interesting
6. Have metrics to track progress internally and externally
7. Don't expect to migrate perfectly the first time
! Thank you!
None
@Jack_Franklin
[email protected]
Pictures from pixabay.com
None