reactiveba meetups 2016 #1 môže byť aplikácia rýchla aj na pomalých internetoch? tomáš...

21
Making apps fast

Upload: vacuumlabs

Post on 12-Apr-2017

248 views

Category:

Software


8 download

TRANSCRIPT

Making apps fast

Making apps fast

(aj vtedy, keď vám internety neprajú)

•  Analytics

•  2 x Hipchat integration

•  Bamboo CI integration

•  Columns settings

•  Workflow settings

•  Project settings

•  Data (weeeeej!)

Bad design

I forgot this, tut mir leid

I really need this. But, really?

Meet appstate

App State

State 0

State 1

State 2

State 3

FN 1

FN 2

FN 3

Click

Type

Data arrived

Data Provider

Loading Spinner

NO YES

Render Screen

Got data?

Summary

u  Client side DB is cool (even if it is one global nested JS object)

u  Never erase the data you already haveu  unless the data got stale

u  Fetch big, self-contained chunks of datau  you can refactor lateru  premature optimization is

u  Use dataProviders and relax

Optimistic updates

… or: If you know exactly what's going to happen after user's input, you don't need to wait for the server.

u  User likes comment → comment is liked

u  User add comment → comment is added

u  User subscribes to thread → user gets subscribed

State 0

State 1

State 2

FN 1Click

Data

Server

State 0

State 1

State 2

FN 1

FN 2

Click

Click

???

Data

State 0

State 1

State 2

FN 1

FN 2

Click

Click

???

Data

Pending OP.:FN 1 FN 2 ...

State 0

State 1

State 2

FN 1

FN 2

Click

Click

Data

FN 1

FN 2State 5

State 3

State 4

Pending OP.:FN 1 FN 2 ...

Summary

u  Great ideas all around us

u  Immutable data sctructures

u  Epochal Immutable AppState (Rich Hickey, David Nolen)

u  React (Facebook)u  Relay (Facebook)u  Declarative data fetching (Facebook, Netflix)

Máš otázku ?

Sem s ňou! ^_^