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
Seven Year Itch
Search
Andrew Best
March 17, 2015
Programming
0
320
Seven Year Itch
A brief tale of porting an Angular 1.x app to ReactJS, and a comparison of the two frameworks.
Andrew Best
March 17, 2015
Tweet
Share
More Decks by Andrew Best
See All by Andrew Best
The Surprising Truths Behind Good Mentoring
andrewabest
0
66
Learn Authentication The Hard Way
andrewabest
0
320
Finding The Sweet Spot BNE
andrewabest
1
230
Finding The Sweet Spot
andrewabest
0
430
Automating AWS
andrewabest
2
360
Conventional Wisdom
andrewabest
1
430
DSC a-b-c's
andrewabest
0
130
AWS a-b-c's
andrewabest
3
150
What is Git?
andrewabest
0
210
Other Decks in Programming
See All in Programming
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
180
Flutter로 Gemini와 MCP를 활용한 Agentic App 만들기 - 박제창 2025 I/O Extended Seoul
itsmedreamwalker
0
150
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
令和最新版手のひらコンピュータ
koba789
14
7.9k
実践!App Intents対応
yuukiw00w
1
320
Terraform やるなら公式スタイルガイドを読もう 〜重要項目 10選〜
hiyanger
13
3.2k
AI OCR API on Lambdaを Datadogで可視化してみた
nealle
0
150
tool ディレクティブを導入してみた感想
sgash708
1
150
React 使いじゃなくても知っておきたい教養としての React
oukayuka
18
5.8k
State of CSS 2025
benjaminkott
1
110
Vibe coding コードレビュー
kinopeee
0
460
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
960
Featured
See All Featured
Speed Design
sergeychernyshev
32
1.1k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Designing for Performance
lara
610
69k
What's in a price? How to price your products and services
michaelherold
246
12k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
20k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
Docker and Python
trallard
45
3.5k
Scaling GitHub
holman
462
140k
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.8k
RailsConf 2023
tenderlove
30
1.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.6k
Transcript
The seven year itch
Page A short Angular narrative › Mr White: I’m trying
to set a variable on my scope and it isn’t reflecting in the UI. › Mr Blue: I ususaly just use “if (!$scope.$$phase) $scope.$apply() “. › Mr Red: Don’t do that! You should use “$timeout()”, because “if (!$scope.$$phase) $scope.$apply() “ is an anti-pattern. › Me: THAT IS ALL AWFUL. / Copyright ©2014 by Readify Pty Ltd 2
Page Inspiration › Given angular v1 is effectively obsolete* ›
And given my recent pause for thought › And given there is a lot of noise around React as a front-end framework › When selecting a front-end framework for a new web project › Then [Insert conclusion here] * http://www.techinfine.com/post/231575/Announcements-from-ng-confsome interesting news at ng-confjust last week has injected some hope into Angular V1, although at the moment it is just that –hope. / Copyright ©2014 by Readify Pty Ltd 3
Page Empirical observation › Ease-of-componentization › Amount of magic (less
is better) › Grokkabilityof concepts › Availability of solutions to common problems › Speed of development › Extensibility › Amount of swearing induced during usage / Copyright ©2014 by Readify Pty Ltd 4
Page The angular app / Copyright ©2014 by Readify Pty
Ltd 5
Page Angular architecture › ‘no controller’ style componentization http://teropa.info/blog/2014/10/24/how-ive- improved-my-angular-apps-by-banning-ng-
controller.html › Factories for services › Authentication enforced by router › Basic NancyFX backend / Copyright ©2014 by Readify Pty Ltd 6
Page The react rebuild / Copyright ©2014 by Readify Pty
Ltd 7
Page Hello React › React.js and JSXTransformer.js › “script/jsx” ›
React.creatClass() › React.run() / Copyright ©2014 by Readify Pty Ltd 8
Page React-router › https://github.com/rackt/react-router › Uses components as route handlers
› Inspired by the Ember router / Copyright ©2014 by Readify Pty Ltd 9
Page UI Complete › Component construction and composition is super
easy › PropTypes enforce components expectations on props it requires › Component specifications › Component lifecycle methods / Copyright ©2014 by Readify Pty Ltd 10
Page Authentication › Like the angular apps implementation of this
cross cutting concern, leverage routing to enforce auth. › Use a mixin to inspect and redirect for auth. / Copyright ©2014 by Readify Pty Ltd 11
Page State Management › “State should be avoided” › State
is unavoidable › FLUX › Manage state in a way that gels with React / Copyright ©2014 by Readify Pty Ltd 12
Page W-T-Flux? › Created by Facebook with the intent of
making updating data in an application more explicit and traceable › Fluxxor › https://reactjsnews.com/the-state-of-flux/ / Copyright ©2014 by Readify Pty Ltd 13
Page Flux and async › Handling asynchronous interactions with the
server is easy enough with Fluxxor, but isn’t strictly in-built. › Need to dispatch actions on start, done and fail of interaction, and stores are used to supply state that the view can use to inform the user that things are happening. / Copyright ©2014 by Readify Pty Ltd 14
Page The weigh-in › Ease-of-componentization React › Amount of magic
(less is better) React › Grokkabilityof concepts React › Availability of solutions to common problems Angular › Speed of development Angular › Extensibility Angular › Amount of swearing induced during usage React / Copyright ©2014 by Readify Pty Ltd 15
Page Acknowledgements • Please Wait (https://github.com/Pathgather/plea se-wait) • Sweet Alert
(https://github.com/t4t5/sweetalert) • Bootswatch (https://bootswatch.com/darkly/) / Copyright ©2014 by Readify Pty Ltd 16
Thankyou! github.com/andrewabest @_AndrewB