Top Banner
Building desktop applications with web technologies the easy way @stefanjudis
41

Building desktop applications with web technologies - ELECTRON the easy way

Apr 16, 2017

Download

Technology

stefanjudis
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Building desktop applications with web technologies - ELECTRON the easy way

Building desktop applications with web technologies

the easy way

@stefanjudis

Page 2: Building desktop applications with web technologies - ELECTRON the easy way

@stefanjudis

FRONTEND DEVELOPER MOSTLY E-COMMERCE NOW INTO SINGLE PAGE APPLICATIONS

Page 3: Building desktop applications with web technologies - ELECTRON the easy way

http://perf-tooling.today

Page 4: Building desktop applications with web technologies - ELECTRON the easy way

https://github.com/stefanjudis

Page 5: Building desktop applications with web technologies - ELECTRON the easy way

http://www.meetup.com/de/Berlin-Web-Performance-Group/

Page 6: Building desktop applications with web technologies - ELECTRON the easy way

STARTED FULLSTACK ( 5 YEARS AGO )

Page 7: Building desktop applications with web technologies - ELECTRON the easy way

“You have to specialize. Do one thing and do it as well as possible rather than doing everything just good.”

Page 8: Building desktop applications with web technologies - ELECTRON the easy way

for

Frontend Technologies

( around 2012 )

Page 9: Building desktop applications with web technologies - ELECTRON the easy way

But unfortunately I was a bit late. ( I had a ton to catch up with )

Page 10: Building desktop applications with web technologies - ELECTRON the easy way

HTML invented early 90ies. CSS invented 1994. JavaScript invented 1995.

Page 11: Building desktop applications with web technologies - ELECTRON the easy way

First WebApps appeared

Page 12: Building desktop applications with web technologies - ELECTRON the easy way

MV-WHATEVER

Page 13: Building desktop applications with web technologies - ELECTRON the easy way

HTML5 moving forward

Page 14: Building desktop applications with web technologies - ELECTRON the easy way

Location Device movement Making Music Web Cam Access Battery Status

Page 15: Building desktop applications with web technologies - ELECTRON the easy way

What about offline?

Page 16: Building desktop applications with web technologies - ELECTRON the easy way

Service Workers FTW

http://techcrunch.com/2015/09/14/facechrome/

Page 17: Building desktop applications with web technologies - ELECTRON the easy way

How to use these fancy web apps?

Page 18: Building desktop applications with web technologies - ELECTRON the easy way
Page 19: Building desktop applications with web technologies - ELECTRON the easy way
Page 20: Building desktop applications with web technologies - ELECTRON the easy way

https://github.com/adobe/brackets-shellhttp://nwjs.io/

Page 21: Building desktop applications with web technologies - ELECTRON the easy way

So far, one big player was missing...

Page 22: Building desktop applications with web technologies - ELECTRON the easy way

Let’s build our dream editor!

With Web Technology!

Page 23: Building desktop applications with web technologies - ELECTRON the easy way

http://blog.atom.io/2014/02/26/introducing-atom.html

Page 24: Building desktop applications with web technologies - ELECTRON the easy way

Writing to Disk Using native Functionality Separate concerns clearly

Page 25: Building desktop applications with web technologies - ELECTRON the easy way

- Atom Shell -

So - how does it work?

Page 26: Building desktop applications with web technologies - ELECTRON the easy way
Page 27: Building desktop applications with web technologies - ELECTRON the easy way

Atom Shell is a Node.js programmable Chromium browser.

Page 28: Building desktop applications with web technologies - ELECTRON the easy way

Chromium Browser

Browser

https://speakerdeck.com/zcbenz/practice-on-embedding-node-dot-js-into-atom-editor

Controlled by C++

Window … Tray Menu Dialog

IPC

Renderer

HTML

JavaScript

CSS

Renderer

HTML

JavaScript

CSS

Renderer

HTML

JavaScript

CSS

Window Window

Page 29: Building desktop applications with web technologies - ELECTRON the easy way

Atom Shell

Browser

https://speakerdeck.com/zcbenz/practice-on-embedding-node-dot-js-into-atom-editor

Controlled by Node.js

Window … Tray Menu Dialog

IPC

Renderer

HTML

JavaScript

CSS

Renderer

HTML

JavaScript

CSS

Renderer

HTML

JavaScript

CSS

Window Window

Page 30: Building desktop applications with web technologies - ELECTRON the easy way

http://electron.atom.io/

Page 31: Building desktop applications with web technologies - ELECTRON the easy way

https://atom.io/

Page 32: Building desktop applications with web technologies - ELECTRON the easy way

https://code.visualstudio.com/

Page 33: Building desktop applications with web technologies - ELECTRON the easy way

https://slack.com/

Page 34: Building desktop applications with web technologies - ELECTRON the easy way

- our use case at LLS -

Let´s check some code?

( a fairly simple one )

- in case I make a stupid error please tell me -

Page 35: Building desktop applications with web technologies - ELECTRON the easy way

Let´s write something real?

Page 36: Building desktop applications with web technologies - ELECTRON the easy way

Let`s make it distribution ready!

Page 37: Building desktop applications with web technologies - ELECTRON the easy way

Windows Result

Page 38: Building desktop applications with web technologies - ELECTRON the easy way

https://github.com/stefanjudis/electron-webview-example

https://github.com/stefanjudis/electron-todo-example

https://github.com/stefanjudis/electron-block-screensaver-example

Example Projects

Packages used for distributionhttps://github.com/maxogden/electron-packager

https://github.com/loopline-systems/electron-builder

Page 39: Building desktop applications with web technologies - ELECTRON the easy way

Working cross-platform Active Development Strong Community

Last words

Page 40: Building desktop applications with web technologies - ELECTRON the easy way

https://github.com/sindresorhus/awesome-electron

Page 41: Building desktop applications with web technologies - ELECTRON the easy way

Thanks. Questions?