![Page 1: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/1.jpg)
Brewfactory full-stack homebrew 2/2Péter Márton
@slashdotpeter
![Page 2: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/2.jpg)
About the talk
Brewfactory is heavily over-engineeredIt is my hobby
![Page 3: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/3.jpg)
Hardware parts
- digital temp. sensor- DS18B20 (1-Wire)
- heating elements- PWM (pulse-width modulation)
- Relay (solid state)
- controller
![Page 4: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/4.jpg)
PID controller
https://github.com/hekike/liquid-pid
![Page 5: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/5.jpg)
Internet of things: IoT
- internet connected- from $10- easy to program
![Page 6: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/6.jpg)
IoT device: RaspberryPi
- linux- credit-card sized- usb ports- NO built-in Wi-Fi- ethernet- any languages
![Page 7: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/7.jpg)
IoT device: SparkCore
- small- arduino compatible- built-in Wi-Fi- C++- spark’s cloud
![Page 8: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/8.jpg)
Architecture
![Page 9: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/9.jpg)
Architecture
![Page 10: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/10.jpg)
JavaScript everywhere2007 2014
HW Microcontroller IoT devices from $10
Control HW C, C++ Node.js: Johnny-Five, Tessel
Web server .net, Java, PHP Node.js
Database SQL MongoDB: JS API
WebUI JavaScript: jQuery JavaScript: SPA (React, Angular etc.)
![Page 11: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/11.jpg)
BrewCore
- Node.js --harmony
- Koa- WebSockets- Spark’s cloud- https://github.com/BrewCore
![Page 12: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/12.jpg)
BrewUI
- Moved from AngularJS- React app with Flux- CommonJS (Webpack)- npm module- https://github.com/BrewUI
![Page 13: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/13.jpg)
React
- JS library- can be the view in MVC- renders on both client and server side- virtual DOM
![Page 14: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/14.jpg)
Flux architecture- unidirectional data flow- designed by Facebook- less complex dependencies as in MVC
![Page 15: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/15.jpg)
First Principle of Rich Web Apps
“server-rendered apps vs single-page apps: If we want to optimize for the best possible user experience and performance, giving up one or
the other is never a good idea.”- Guillermo Rauch
![Page 16: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/16.jpg)
Isomorphic JavaScript
JavaScript code that can be shared between environments.
![Page 17: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/17.jpg)
Isomorphic server side
![Page 18: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/18.jpg)
Isomorphic client side
![Page 19: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/19.jpg)
Isomorphic way
DEMO
![Page 20: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/20.jpg)
Isomorphic things
Pros- server render: works without JavaScript- client render: power of SPA- code share
![Page 21: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/21.jpg)
Isomorphic things
Cons- different and new problems
- async concurrency on serverside- prepare to contribute
![Page 22: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/22.jpg)
BrewMobile
- Swift- WebSockets- push notif. is coming
![Page 23: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/23.jpg)
Join us!
github.com/brewfactory
![Page 24: Péter Márton Brewfactory full-stack homebrew 2/2files.meetup.com/11288812/Brewfactory - Prezi tech talk - SCRIPT.pdf · -can be the view in MVC-renders on both client and server](https://reader033.vdocument.in/reader033/viewer/2022050107/5f45318734e45704ba33dc03/html5/thumbnails/24.jpg)
Q&A
The end