• Self-‐contained,
concern-‐specific
building
blocks
• Allows
a
“divide
and
conquer”
approach
where
no
particular
part
needs
be
especially
complex
Componentization
Slide 12
Slide 12 text
No content
Slide 13
Slide 13 text
No content
Slide 14
Slide 14 text
No content
Slide 15
Slide 15 text
Slide 16
Slide 16 text
Slide 17
Slide 17 text
Slide 18
Slide 18 text
No content
Slide 19
Slide 19 text
No content
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
No content
Slide 22
Slide 22 text
• Requires
compilation
/
transpilation
step
• It’s
plain
javascript
-‐ It
doesn't
alter
the
language
semantics.
Slide 23
Slide 23 text
No content
Slide 24
Slide 24 text
• It’s
plain
javascript
-‐ It
doesn't
alter
the
language
semantics.
• XML
is
great
for
representing
UIs
in
element
trees
with
attributes.
• It’s
more
concise
and
easier
to
visualise
the
structure
of
your
application.
Slide 25
Slide 25 text
No content
Slide 26
Slide 26 text
• Templates
encourage
a
poor
separation
of
concerns
• Display
logic
and
markup
are
inevitably
tied
together.
They’re
highly
cohesive.
• Keeping
components
small
and
single-‐purposed
lead
to
separation
of
concerns
Slide 27
Slide 27 text
No content
Slide 28
Slide 28 text
No content
Slide 29
Slide 29 text
No content
Slide 30
Slide 30 text
No content
Slide 31
Slide 31 text
No content
Slide 32
Slide 32 text
No content
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
No content
Slide 35
Slide 35 text
No content
Slide 36
Slide 36 text
~2004
Hybrid
~2010
Single Page Application
1994+
Server
Driven
Slide 37
Slide 37 text
~2004
Hybrid
~2010
Single Page Application
1994+
Server
Driven
Slide 38
Slide 38 text
~2004
Hybrid
~2010
Single Page Application
1994+
Server
Driven
Slide 39
Slide 39 text
~2004
Hybrid
~2010
Single Page Application
1994+
Server
Driven
Slide 40
Slide 40 text
~2004
Hybrid
~2010
Single Page Application
1994+
Server
Driven
Slide 41
Slide 41 text
No content
Slide 42
Slide 42 text
No content
Slide 43
Slide 43 text
No content
Slide 44
Slide 44 text
• Every
time
state
is
updated,
it
is
guaranteed
to
be
up-‐to-‐date.
• No
magical
data
binding.
• No
model
dirty
checking
• No
more
explicit
DOM
operations
–
everything
is
declarative.
Just
Render
the
State.
Every
Time.
Slide 45
Slide 45 text
No content
Slide 46
Slide 46 text
No content
Slide 47
Slide 47 text
No content
Slide 48
Slide 48 text
No content
Slide 49
Slide 49 text
In-‐Memory
lightweight representation of the DOM
In-‐Memory
lightweight representation of the DOM
On
Every
Update:
• React
builds
a
new
virtual
dom
subtree
• Diffs
the
new
tree
with
the
old
one
• Computes
the
minimal
set
of
DOM
operations
• Batch
executes
all
updates