event-sourcing your react-redux applications at holyjs 2016
TRANSCRIPT
![Page 1: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/1.jpg)
Event-Sourcing your React-Redux applications
Maurice de Beijer - @mauricedb
![Page 2: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/2.jpg)
2
Who am I?• Maurice de Beijer• The Problem Solver• Microsoft Azure MVP• Freelance developer/instructor• Twitter: @mauricedb and @React_Tutorial• Web: http://www.TheProblemSolver.nl• E-mail: [email protected]
![Page 3: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/3.jpg)
3
![Page 4: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/4.jpg)
4
![Page 5: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/5.jpg)
5
![Page 6: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/6.jpg)
6
![Page 7: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/7.jpg)
7
![Page 8: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/8.jpg)
8
![Page 9: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/9.jpg)
9
![Page 10: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/10.jpg)
10
![Page 11: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/11.jpg)
11
![Page 12: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/12.jpg)
(Semi) Structured storage
Database CRUD Server HTTP BrowserReact
12
![Page 13: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/13.jpg)
13
![Page 14: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/14.jpg)
A React component to display data
14
![Page 15: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/15.jpg)
15
Command Query Responsibility Segregation
![Page 16: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/16.jpg)
16
![Page 17: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/17.jpg)
Command Query Responsibility Segregation
Database
Query Service HTTPBrowser
React
Command ServiceHTTP
Read
Update
17
![Page 18: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/18.jpg)
The JavaScript command
18
![Page 19: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/19.jpg)
A Redux Action Creator
19
![Page 20: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/20.jpg)
20
![Page 21: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/21.jpg)
21
![Page 22: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/22.jpg)
22
![Page 23: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/23.jpg)
23
![Page 24: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/24.jpg)
24
![Page 25: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/25.jpg)
Event Sourcing
ProjectionsDatabase
Query Service HTTP
BrowserReact
Command Service
HTTP
Read
UpdateEventsDatabase
Projector Service
25
![Page 26: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/26.jpg)
Event PushingProjectionsDatabase
Query Service HTTP
BrowserReact
Command Service
HTTP
Read
UpdateEventsDatabase
Projector Service
Push Service
Web So
cket
26
![Page 27: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/27.jpg)
React with Redux
View
Server
Store
ActionAPITriggers
HTTPUse
Notifies
Updates
Socket
27
![Page 28: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/28.jpg)
28
![Page 29: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/29.jpg)
29
![Page 30: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/30.jpg)
30
![Page 31: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/31.jpg)
31
![Page 32: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/32.jpg)
The permit collection reducer
32
![Page 33: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/33.jpg)
The single permit reducer
33
![Page 34: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/34.jpg)
The React application startup
34
![Page 35: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/35.jpg)
Connecting the state to the component
35
![Page 36: Event-Sourcing your React-Redux applications at HolyJS 2016](https://reader036.vdocuments.net/reader036/viewer/2022062905/586f8f711a28ab54768b759b/html5/thumbnails/36.jpg)
36Maurice de Beijer - @mauricedb