The Front End Architecture Revolution - GOTO...

45
The Front End Architecture Revolution GOTO Chicago 2015

Transcript of The Front End Architecture Revolution - GOTO...

Page 1: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

The Front End Architecture Revolution

GOTO Chicago 2015

Page 2: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 3: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 4: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 5: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 6: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 7: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Simplicity

Page 8: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 9: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

spina de pesce

herring bone

brick!

Page 10: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

many mainstream practice emphasize only the separation of concerns at the detriment of global coordination opportunities

Page 11: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

๏ Simplicity scales

๏ Pervasive simplicity permits more opportunity for global optimization

๏ Question designs, tools, processes that don’t lead to global optimization

๏ Global optimization is not at odds with modularity (Garbage Collection)

Page 12: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Possible Stack๏ React / Relay

๏ ClojureScript (Google Closure)

๏ Transit

๏ Relay / Datomic

Page 13: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Support immutability at every layer

Page 14: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Benefits

๏ Enable simpler reasoning (which permits wider / deeper reasoning)

๏ Agility (remove needless coordination)

๏ Performance

Page 15: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Client Layer

Page 16: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 17: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 18: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 19: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Mutability should be an implementation detail

Forcing mutability is like forcing someone pick a database, this is just bad design

Page 20: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 21: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Rule 5.  Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self evident. Data structures, not algorithms, are central to programming.

- Rob Pike

Page 22: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 23: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 24: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 25: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Which Language?

Page 26: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 27: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

+

Page 28: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

ClojureScript๏ Now industry leading experts on

effective UI/UX over immutable data

๏ React Native permits targeting all major platforms with one language

๏ Without throwing out multi-threaded server side programs

Page 29: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Closure Compiler๏ Whole program optimization

๏ Dead Code Elimination

๏ Optimal code splitting

๏ Cross module code motion

๏ ES2015, CommonJS, AMD consumption

Page 30: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Moving Data

Page 31: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Transit๏ Leverage JSON (pervasive)

๏ Provide richer types out of the box

๏ Extensible

๏ In some cases can decode Transit payload into immutable data structures as fast as equivalent JSON

Page 32: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

[["~#point",[1.5,2.5]],["~#cache",1],["^1",1]]

Page 33: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Server Side

Page 34: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 35: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 36: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 37: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 38: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 39: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Big Ideas

๏ UI components define what they need

๏ Use a recursive description (JSON, EDN, etc)

๏ Batching

Page 40: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable
Page 41: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Datomic๏ Immutable relational database

๏ Powerful auditing capabilities

๏ Efficient queries of arbitrary points in the past

๏ Datalog-style queries are themselves data (easy to compose)

Page 42: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

[:artist/name :artist/startYear]

Page 43: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

[{:release/media [{:medium/tracks [:track/name {:track/artists [:artist/name]}]}]}]

Page 44: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Radical Simplicity

๏ Revisit your assumptions / biases about any element of your stack that creates complexity

๏ Examine unfamiliar but time-tested ideas for complexity reduction

Page 45: The Front End Architecture Revolution - GOTO …gotocon.com/dl/goto-chicago-2015/slides/DavidNolen_The...ClojureScript ๏ Now industry leading experts on effective UI/UX over immutable

Questions?