péter márton brewfactory full-stack homebrew 2/2files.meetup.com/11288812/brewfactory - prezi tech...

Post on 14-Jul-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Brewfactory full-stack homebrew 2/2Péter Márton

@slashdotpeter

About the talk

Brewfactory is heavily over-engineeredIt is my hobby

Hardware parts

- digital temp. sensor- DS18B20 (1-Wire)

- heating elements- PWM (pulse-width modulation)

- Relay (solid state)

- controller

PID controller

https://github.com/hekike/liquid-pid

Internet of things: IoT

- internet connected- from $10- easy to program

IoT device: RaspberryPi

- linux- credit-card sized- usb ports- NO built-in Wi-Fi- ethernet- any languages

IoT device: SparkCore

- small- arduino compatible- built-in Wi-Fi- C++- spark’s cloud

Architecture

Architecture

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.)

BrewCore

- Node.js --harmony

- Koa- WebSockets- Spark’s cloud- https://github.com/BrewCore

BrewUI

- Moved from AngularJS- React app with Flux- CommonJS (Webpack)- npm module- https://github.com/BrewUI

React

- JS library- can be the view in MVC- renders on both client and server side- virtual DOM

Flux architecture- unidirectional data flow- designed by Facebook- less complex dependencies as in MVC

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

Isomorphic JavaScript

JavaScript code that can be shared between environments.

Isomorphic server side

Isomorphic client side

Isomorphic way

DEMO

Isomorphic things

Pros- server render: works without JavaScript- client render: power of SPA- code share

Isomorphic things

Cons- different and new problems

- async concurrency on serverside- prepare to contribute

BrewMobile

- Swift- WebSockets- push notif. is coming

Join us!

github.com/brewfactory

Q&A

The end

top related