Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
Realtime dashboard (phpbenelux)
Freek Van der Herten
January 27, 2017
Programming
0
41
Realtime dashboard (phpbenelux)
Freek Van der Herten
January 27, 2017
Tweet
Share
More Decks by Freek Van der Herten
See All by Freek Van der Herten
freekmurze
0
190
freekmurze
1
360
freekmurze
1
190
freekmurze
0
340
freekmurze
0
110
freekmurze
1
320
freekmurze
0
310
freekmurze
0
100
freekmurze
0
46
Other Decks in Programming
See All in Programming
tommykw
1
310
showwin
0
120
rshindo
2
290
77web
4
1.4k
akkeylab
0
330
wasabeef
1
560
jun0
3
640
itosho525
0
350
canon1ky
3
340
line_developers_tw
0
350
mizdra
7
4.8k
kyonmm
2
2.1k
Featured
See All Featured
jonrohan
1021
380k
jacobian
255
20k
chrislema
231
16k
brad_frost
156
6.4k
bryan
100
11k
morganepeng
92
13k
bkeepers
408
57k
denniskardys
220
120k
morganepeng
17
1.1k
erikaheidi
13
4.2k
danielanewman
200
19k
colly
186
14k
Transcript
Creating a realtime dashboard using PHP and websockets
About me Freek Van der Herten Partner & developer at
SPATIE @freekmurze https://murze.be
About me phpantwerp.be Dries Vints @driesvints Frederick Vanbrabant @TheEdonian
Since 2003 Websites, applications and webshops Team 4 developers, 1
manager Specialization Laravel development
VACATURE FRONT-END DEVELOPER
OPEN SOURCE SOFTWARE
Open source software ± 90 packages on Packagist ± 1
800 000 downloads total, ±240 000 downloads a month A lot of benefits: learning, forced to write documentation and tests, showing the quality of our work, eating our own dogfood
https://spatie.be/opensource
http://github-awards.com/users?type=world&language=php Open source software
OUR OFFICE
None
None
None
None
None
https://github.com/spatie/dashboard.spatie.be
None
None
None
None
None
None
None
None
None
None
HIGH LEVEL OVERVIEW
The dashboard is a single HTML page Displayed by a
full screen browser Without full page reload Each tile wil be updated by JavaScript Each tile has it’s own update frequency In short
Technology stack Laravel Pusher Vue.js
Laravel 5.4 Render the initial page Fetch data from external
API’s (scheduled) Broadcast events when new data has arrived Laravel
spatie/laravel-twitter-streaming-api spatie/laravel-google-calendar spatie/last-fm-now-playing spatie/packagist-api graham-campbell/github Laravel
Provides full-duplex communication channels over a single TCP connection Transporting
events from server to the browser In realtime Secure Paid service Pusher
WebSockets Transporting events from server to the browser In realtime
Secure Paid service Pusher
Transporting events from server to the browser In realtime Secure
Paid service Pusher Magic
Lot of ♥ from the Laravel community Easy to learn
Each tile is a component Listen for incoming events Update the tile Vue 2 Vue.js
None
DEMO
Grid system The clock tile The Packagist tile The Twitter
tile Topics
There will be some live coding We’ll use
an internet connection
DISPLAYING ON A TV
Raspberry Pi 2
Raspberry Pi 2 Powered by the USB port from the
TV Uses Raspbian Jessie Boots into Chromium 51 in fullscreen mode Setup
TRY IT OUT YOURSELF
Source code https://github.com/spatie/dashboard.spatie.be Blog posts https://murze.be/2016/06/building-dashboard-using-laravel-vue https://murze.be/2016/06/grid-layout-dashboard/ Documentation
ROUND UP
Credits Willem Van Bockstal @willemvbockstal Looks + grid system Sebastian
De Deyne @sebdedeyne Scrutinising + JS wizardry
https://laravel.com https://pusher.com https://vuejs.com https://vuecasts.com Interesting links
https://www.geckoboard.com/ http://www.cyfe.com/ https://razorflow.com/ http://dashing.io/ Built by Shopify, Ruby. No
longer maintained, but works great Alternatives
QUESTIONS?
Thank you! https://speakerdeck.com/freekmurze/creating-a-dashboard-phpbenelux https://spatie.be/opensource https://murze.be https://murze.be/newsletter