defining FRP
• What is FRP?
• Definition
• Why is FRP interesting?
• Usefulness
Slide 7
Slide 7 text
what is FRP?
Composable, declarative way of
programming with
values changing over time
Slide 8
Slide 8 text
functional
input → combinators → output
Slide 9
Slide 9 text
Functional + Reactive
event + state
→ transform
→ state and/or event
Slide 10
Slide 10 text
Why is FRP interesting?
Composability: easier to reason
Asynchronous by default
Efficiency++
Slide 11
Slide 11 text
how to build frp apps?
HTTP TCP/IP
Slide 12
Slide 12 text
Elm
HTTP
TCP/IP
statically
compiled
Slide 13
Slide 13 text
Elm
HTTP
TCP/IP
statically
compiled
building
web user
interfaces
Slide 14
Slide 14 text
Elm
HTTP
TCP/IP
statically
compiled
building
web user
interfaces
promotes
FRP
Slide 15
Slide 15 text
Elm
HTTP
TCP/IP
statically
compiled
building
web user
interfaces
promotes
FRP
compiles
to fast
Javascript
Slide 16
Slide 16 text
Elm
HTTP
TCP/IP
statically
compiled
building
web user
interfaces
promotes
FRP
compiles
to fast
Javascript
most
helpful
compiler
Slide 17
Slide 17 text
Elm
HTTP
TCP/IP
statically
compiled
building
web user
interfaces
promotes
FRP
compiles
to fast
Javascript
most
helpful
compiler
no
runtime
exceptions
Slide 18
Slide 18 text
Node.js
HTTP
TCP/IP
based on
express.js
Slide 19
Slide 19 text
Node.js
HTTP
TCP/IP
based on
express.js
FRP
friendly
(async,
events)
Slide 20
Slide 20 text
Node.js
HTTP
TCP/IP
based on
express.js
FRP
friendly
(async,
events)
stateless,
listens on
port 3000
Slide 21
Slide 21 text
Node.js
HTTP
TCP/IP
based on
express.js
FRP
friendly
(async,
events)
stateless,
listens on
port 3000
talks
binary to
data grid
Slide 22
Slide 22 text
infinispan
HTTP
TCP/IP
in-
memory
data grid
Slide 23
Slide 23 text
infinispan
HTTP
TCP/IP
in-
memory
data grid
open
source
(ASL2)
Slide 24
Slide 24 text
infinispan
HTTP
TCP/IP
in-
memory
data grid
open
source
(ASL2)
3 server
node
domain
Slide 25
Slide 25 text
infinispan
HTTP
TCP/IP
in-
memory
data grid
open
source
(ASL2)
3 server
node
domain
2 copies
redundant
Slide 26
Slide 26 text
infinispan
HTTP
TCP/IP
in-
memory
data grid
open
source
(ASL2)
3 server
node
domain
2 copies
redundant
Java,
Node.js,
C/C++...
clients
Slide 27
Slide 27 text
infinispan
HTTP
TCP/IP
in-
memory
data grid
open
source
(ASL2)
3 server
node
domain
2 copies
redundant
Java,
Node.js,
C/C++...
clients
remote
event
listeners
Slide 28
Slide 28 text
Elm Architecture
Elm Runtime
Model
Html + Msg (Click)
update
Msg (Click) + Model
Cmd e.g. http call
…
Msg (Http Resp) + Model
Model updated
Model
view
… button click …
Elm limitations
• typeclasses → +boiler plate code
• dictionary type
• Less FRPy version 0.17+
• Interacting with complex
Javascript libraries
• Alternative: Purescript (+complex)
Slide 43
Slide 43 text
Learn How To Build
Functional Reactive Apps
what is
FRP
Slide 44
Slide 44 text
Learn How To Build
Functional Reactive Apps
what is
FRP
why FRP
is useful
Slide 45
Slide 45 text
Learn How To Build
Functional Reactive Apps
what is
FRP
why FRP
is useful
how to
build an
FR app
Slide 46
Slide 46 text
Learn How To Build
Functional Reactive Apps
what is
FRP
why FRP
is useful
how to
build an
FR app
live
coding an
FR app
Slide 47
Slide 47 text
credits
Approve by Aha-Soft
from the Noun Project
Window by Oleg Frolov
from the Noun Project
Server Error by Montu Yadav
from the Noun Project
Databases by Oliviu Stoian
from the Noun Project