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
330
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
82
Learn Authentication The Hard Way
andrewabest
0
330
Finding The Sweet Spot BNE
andrewabest
1
230
Finding The Sweet Spot
andrewabest
0
450
Automating AWS
andrewabest
2
370
Conventional Wisdom
andrewabest
1
450
DSC a-b-c's
andrewabest
0
140
AWS a-b-c's
andrewabest
3
160
What is Git?
andrewabest
0
220
Other Decks in Programming
See All in Programming
Claude Code on the Web を超える!? Codex Cloud の実践テク5選
sunagaku
0
610
AI時代もSEOを頑張っている話
shirahama_x
0
180
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
520
TVerのWeb内製化 - 開発スピードと品質を両立させるまでの道のり
techtver
PRO
3
1.2k
Feature Flags Suck! - KubeCon Atlanta 2025
phodgson
0
170
Flutterチームから作る組織の越境文化
findy_eventslides
0
600
30分でDoctrineの仕組みと使い方を完全にマスターする / phpconkagawa 2025 Doctrine
ttskch
3
560
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
740
JJUG CCC 2025 Fall: Virtual Thread Deep Dive
ternbusty
3
490
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
32
15k
Eloquentを使ってどこまでコードの治安を保てるのか?を新人が考察してみた
itokoh0405
0
3.2k
dnx で実行できるコマンド、作ってみました
tomohisa
0
110
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.3k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
Thoughts on Productivity
jonyablonski
73
4.9k
Fireside Chat
paigeccino
41
3.7k
What's in a price? How to price your products and services
michaelherold
246
12k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Bash Introduction
62gerente
615
210k
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