SlideShare a Scribd company logo
1 of 20
Download to read offline
Building “Native” Experiences
with Electron
Ben Gotow (@bengotow)
Building “Native” Experiences
with Electron
Beautiful apps that behave the way users expect
Ben Gotow (@bengotow)
Kitematic
Window Frame
Remove the standard frame by passing BrowserWindow the

{frame: false} option.

Add custom window controls to the document body.

<div name="ToolbarWindowControls" class="toolbar-window-controls">
<button class="close" onClick="require('remote').getCurrentWindow().close()"></button>
<button class="minimize" onClick="require('remote').getCurrentWindow().minimize()"></button>
<button class="maximize" onClick="require('remote').getCurrentWindow().maximize()"></button>
</div>
Draggable Toolbars
-webkit-app-region allows you to specify that all or
part of the DOM is the window drag handle.
Caveats:
• The visibility and z-index of drag
regions does not matter.
• Your app does not receive any click
events inside drag regions.
.toolbar {
-webkit-app-region: drag;
.toolbar-window-controls {
-webkit-app-region: no-drag;
}
}
Kitematic, Mac OS X
Kitematic, Windows
Add a platform class to the document body, and use it to
change the appearance of toolbars and buttons.



Really intense: Read Mac OS X defaults to detect appropriate
gumdrop colors and styles.
Platform-specific Style
document.body.classList.add(“platform" + process.platform)
defaults read -g AppleAquaColorVariant
defaults read -g AppleInterfaceStyle
Focus
Focus
Attach an additional blurred CSS class to <body> when
the window is blurred, adjust styling of:
• Window frame
• Selected items
• Buttons
Caveats:
• Listen to BrowserWindow blur/
focus, not window blur/focus, which
triggers when you focus iFrames.
Focus
Main Process
Renderer Process
@browserWindow.on ’focus’, =>

@browserWindow.webContents.send(‘browser-window-focus’)
@browserWindow.on ’blur’, =>

@browserWindow.webContents.send(‘browser-window-blur’)
ipc.on ’browser-window-focus’, =>

document.body.classList.remove(‘blurred’)

ipc.on ’browser-window-blur’, =>

document.body.classList.add(‘blurred’)
First Mouse
• Use accept-first-mouse: true
• On Windows, you can click window contents from the
background.
• On Mac OS X, you can click toolbar items and window controls
from the background. (Use pointer-events:none to disable
background interaction with everything else.)
Cursor Considerations for Mac OS X
• Stick to standard cursors. Use the hand
cursor sparingly. On the Mac, it is typically
only seen in web views.
• Hover states are only used to reveal
additional hidden options (like an X on a
tab). Buttons, tabs, links, etc. have no hover
states.
Images
• Apply -webkit-user-drag: none to all images and 

-webkit-user-drag: text to everything else.
• Support Retina displays! Choose images based on
window.devicePixelRatio

• Scale images by manually declaring their width and height,
or specifying CSS zoom:0.5 when on a retina display.


Sound
• Use with care! Unlike mobile apps, desktop software rarely makes
noise. There are no audible clicks, pops, bounces.
• Sound should accompany actions when impact may not be obvious.
playSound: (filename) ->

a = new Audio()
a.src = path.join(resourcePath, ‘static’, ‘sounds’, filename)
a.autoplay = true
a.play()
Retina Borders
• Chrome CSS borders must be 1pt - on Retina displays, they
render as two pixels. But you /can/ make half-point box
shadows.
box-shadow: 0 0.5px 0 rgba(0,0,0,0.15), 0 -0.5px
0 rgba(0,0,0,0.15), 0.5px 0 0 rgba(0,0,0,0.15),
-0.5px 0 0 rgba(0,0,0,0.15), 0 1px 1px rgba(0,
0, 0, 0.15);
ben@nylas.com
Meet user expectations, or
communicate new expectations?
Meet user expectations, or
communicate new expectations?
Change Expectations
• Avoids the uncanny valley by using
interface elements that communicate
platform standards do not apply.
• Users don’t expect Spotify to behave
like Windows or Mac OS X

More Related Content

What's hot

Electron. Build cross platform desktop apps with web technologies!
Electron. Build cross platform desktop apps with web technologies!Electron. Build cross platform desktop apps with web technologies!
Electron. Build cross platform desktop apps with web technologies!*instinctools
 
Electron - Build desktop apps using javascript
Electron - Build desktop apps using javascriptElectron - Build desktop apps using javascript
Electron - Build desktop apps using javascriptAustin Ogilvie
 
Building Cross Platform Apps with Electron
Building Cross Platform Apps with ElectronBuilding Cross Platform Apps with Electron
Building Cross Platform Apps with ElectronChris Ward
 
Cross-Platform Desktop Apps with Electron (Condensed Version)
Cross-Platform Desktop Apps with Electron (Condensed Version)Cross-Platform Desktop Apps with Electron (Condensed Version)
Cross-Platform Desktop Apps with Electron (Condensed Version)David Neal
 
Cross-Platform Desktop Apps with Electron (JSConf UY)
Cross-Platform Desktop Apps with Electron (JSConf UY)Cross-Platform Desktop Apps with Electron (JSConf UY)
Cross-Platform Desktop Apps with Electron (JSConf UY)David Neal
 
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)Eddie Lau
 
Electron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesBethmi Gunasekara
 
Debugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTimingDebugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTimingNicholas Jansma
 
Web versus Native: round 1!
Web versus Native: round 1!Web versus Native: round 1!
Web versus Native: round 1!Chris Mills
 
Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"Chris Mills
 
Develop Desktop Apps with Electron
Develop Desktop Apps with ElectronDevelop Desktop Apps with Electron
Develop Desktop Apps with ElectronEueung Mulyana
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the futureChris Mills
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web appsChris Mills
 
.NET no Browser - Webassembly com Blazor!
.NET no Browser - Webassembly com Blazor!.NET no Browser - Webassembly com Blazor!
.NET no Browser - Webassembly com Blazor!Rodrigo Kono
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToRaymond Camden
 
Testing Single Page Webapp
Testing Single Page WebappTesting Single Page Webapp
Testing Single Page WebappAkshay Mathur
 
JavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to ElectronJavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to ElectronBrainhub
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkitPaul Jensen
 
Drupal RPG - A Backend Server Story
Drupal RPG - A Backend Server StoryDrupal RPG - A Backend Server Story
Drupal RPG - A Backend Server StoryEladio Jose Abquina
 

What's hot (20)

Electron. Build cross platform desktop apps with web technologies!
Electron. Build cross platform desktop apps with web technologies!Electron. Build cross platform desktop apps with web technologies!
Electron. Build cross platform desktop apps with web technologies!
 
Electron - Build desktop apps using javascript
Electron - Build desktop apps using javascriptElectron - Build desktop apps using javascript
Electron - Build desktop apps using javascript
 
Building Cross Platform Apps with Electron
Building Cross Platform Apps with ElectronBuilding Cross Platform Apps with Electron
Building Cross Platform Apps with Electron
 
Cross-Platform Desktop Apps with Electron (Condensed Version)
Cross-Platform Desktop Apps with Electron (Condensed Version)Cross-Platform Desktop Apps with Electron (Condensed Version)
Cross-Platform Desktop Apps with Electron (Condensed Version)
 
Cross-Platform Desktop Apps with Electron (JSConf UY)
Cross-Platform Desktop Apps with Electron (JSConf UY)Cross-Platform Desktop Apps with Electron (JSConf UY)
Cross-Platform Desktop Apps with Electron (JSConf UY)
 
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
Native Desktop App with Node.js Webkit (HTML, CSS & Javascript)
 
Electron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologies
 
Debugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTimingDebugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTiming
 
Mobile native-hacks
Mobile native-hacksMobile native-hacks
Mobile native-hacks
 
Web versus Native: round 1!
Web versus Native: round 1!Web versus Native: round 1!
Web versus Native: round 1!
 
Empowering the "mobile web"
Empowering the "mobile web"Empowering the "mobile web"
Empowering the "mobile web"
 
Develop Desktop Apps with Electron
Develop Desktop Apps with ElectronDevelop Desktop Apps with Electron
Develop Desktop Apps with Electron
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
 
APIs for modern web apps
APIs for modern web appsAPIs for modern web apps
APIs for modern web apps
 
.NET no Browser - Webassembly com Blazor!
.NET no Browser - Webassembly com Blazor!.NET no Browser - Webassembly com Blazor!
.NET no Browser - Webassembly com Blazor!
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared To
 
Testing Single Page Webapp
Testing Single Page WebappTesting Single Page Webapp
Testing Single Page Webapp
 
JavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to ElectronJavaScript and Desktop Apps - Introduction to Electron
JavaScript and Desktop Apps - Introduction to Electron
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
Drupal RPG - A Backend Server Story
Drupal RPG - A Backend Server StoryDrupal RPG - A Backend Server Story
Drupal RPG - A Backend Server Story
 

Viewers also liked

리멤버 데스크톱 앱 개발기
리멤버 데스크톱 앱 개발기리멤버 데스크톱 앱 개발기
리멤버 데스크톱 앱 개발기Tom Kim
 
Electron 시작하기
Electron 시작하기Electron 시작하기
Electron 시작하기Hyeokjoo Yoon
 
Electron mainprocess
Electron mainprocessElectron mainprocess
Electron mainprocessDaehwan Lee
 
일렉트론 삽질기
일렉트론 삽질기일렉트론 삽질기
일렉트론 삽질기Jung Young Kim
 
Electron 개발하기
Electron 개발하기Electron 개발하기
Electron 개발하기성일 한
 
김찬웅_그룹웨어에 새 에너지를_NDC15
김찬웅_그룹웨어에 새 에너지를_NDC15김찬웅_그룹웨어에 새 에너지를_NDC15
김찬웅_그룹웨어에 새 에너지를_NDC15Chanwoong Kim
 

Viewers also liked (6)

리멤버 데스크톱 앱 개발기
리멤버 데스크톱 앱 개발기리멤버 데스크톱 앱 개발기
리멤버 데스크톱 앱 개발기
 
Electron 시작하기
Electron 시작하기Electron 시작하기
Electron 시작하기
 
Electron mainprocess
Electron mainprocessElectron mainprocess
Electron mainprocess
 
일렉트론 삽질기
일렉트론 삽질기일렉트론 삽질기
일렉트론 삽질기
 
Electron 개발하기
Electron 개발하기Electron 개발하기
Electron 개발하기
 
김찬웅_그룹웨어에 새 에너지를_NDC15
김찬웅_그룹웨어에 새 에너지를_NDC15김찬웅_그룹웨어에 새 에너지를_NDC15
김찬웅_그룹웨어에 새 에너지를_NDC15
 

Similar to Building Native Experiences with Electron

Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQueryPaul Bakaus
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. ToolboxWojtek Zając
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applicationsKirill Grouchnikov
 
CSS3 Media Queries & Kick Start for Mobile
CSS3 Media Queries & Kick Start for MobileCSS3 Media Queries & Kick Start for Mobile
CSS3 Media Queries & Kick Start for Mobileambientphoto
 
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1rit2011
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
 
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...Patrick Lauke
 
Build 2017 - B8100 - What's new and coming for Windows UI: XAML and composition
Build 2017 - B8100 - What's new and coming for Windows UI: XAML and compositionBuild 2017 - B8100 - What's new and coming for Windows UI: XAML and composition
Build 2017 - B8100 - What's new and coming for Windows UI: XAML and compositionWindows Developer
 
Presentation wpf
Presentation wpfPresentation wpf
Presentation wpfdanishrafiq
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is nearBartlomiej Filipek
 
WPF for developers - optimizing your WPF application
WPF for developers - optimizing your WPF applicationWPF for developers - optimizing your WPF application
WPF for developers - optimizing your WPF applicationTamir Khason
 
Designing for mobile
Designing for mobileDesigning for mobile
Designing for mobileDee Sadler
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.GaziAhsan
 
Go BlackBerry Z30 ready
Go BlackBerry Z30 readyGo BlackBerry Z30 ready
Go BlackBerry Z30 readyBhasker Thapan
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Webmikeleeme
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresAndreas Bovens
 
Unique features of windows 8
Unique features of windows 8Unique features of windows 8
Unique features of windows 8FITC
 
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Patrick Lauke
 

Similar to Building Native Experiences with Electron (20)

Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
 
Responsive websites. Toolbox
Responsive websites. ToolboxResponsive websites. Toolbox
Responsive websites. Toolbox
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applications
 
CSS3 Media Queries & Kick Start for Mobile
CSS3 Media Queries & Kick Start for MobileCSS3 Media Queries & Kick Start for Mobile
CSS3 Media Queries & Kick Start for Mobile
 
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1
смартфоны и планшетники. веб разработка помимо десктопа. Patrick h. lauke. зал 1
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
Смартфоны и планшетники - mobile-friendly веб-разработка помимо десктопа - RI...
 
Session 5#
Session 5#Session 5#
Session 5#
 
Build 2017 - B8100 - What's new and coming for Windows UI: XAML and composition
Build 2017 - B8100 - What's new and coming for Windows UI: XAML and compositionBuild 2017 - B8100 - What's new and coming for Windows UI: XAML and composition
Build 2017 - B8100 - What's new and coming for Windows UI: XAML and composition
 
Presentation wpf
Presentation wpfPresentation wpf
Presentation wpf
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is near
 
WPF for developers - optimizing your WPF application
WPF for developers - optimizing your WPF applicationWPF for developers - optimizing your WPF application
WPF for developers - optimizing your WPF application
 
Designing for mobile
Designing for mobileDesigning for mobile
Designing for mobile
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
 
Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck
 
Go BlackBerry Z30 ready
Go BlackBerry Z30 readyGo BlackBerry Z30 ready
Go BlackBerry Z30 ready
 
Pinkoi Mobile Web
Pinkoi Mobile WebPinkoi Mobile Web
Pinkoi Mobile Web
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS features
 
Unique features of windows 8
Unique features of windows 8Unique features of windows 8
Unique features of windows 8
 
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
Handys und Tablets - Webentwicklung jenseits des Desktops - WebTech Mainz 12....
 

Recently uploaded

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Recently uploaded (20)

How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

Building Native Experiences with Electron

  • 1. Building “Native” Experiences with Electron Ben Gotow (@bengotow)
  • 2. Building “Native” Experiences with Electron Beautiful apps that behave the way users expect Ben Gotow (@bengotow)
  • 3.
  • 5. Window Frame Remove the standard frame by passing BrowserWindow the
 {frame: false} option.
 Add custom window controls to the document body. 
<div name="ToolbarWindowControls" class="toolbar-window-controls"> <button class="close" onClick="require('remote').getCurrentWindow().close()"></button> <button class="minimize" onClick="require('remote').getCurrentWindow().minimize()"></button> <button class="maximize" onClick="require('remote').getCurrentWindow().maximize()"></button> </div>
  • 6. Draggable Toolbars -webkit-app-region allows you to specify that all or part of the DOM is the window drag handle. Caveats: • The visibility and z-index of drag regions does not matter. • Your app does not receive any click events inside drag regions. .toolbar { -webkit-app-region: drag; .toolbar-window-controls { -webkit-app-region: no-drag; } }
  • 7. Kitematic, Mac OS X Kitematic, Windows
  • 8. Add a platform class to the document body, and use it to change the appearance of toolbars and buttons.
 
 Really intense: Read Mac OS X defaults to detect appropriate gumdrop colors and styles. Platform-specific Style document.body.classList.add(“platform" + process.platform) defaults read -g AppleAquaColorVariant defaults read -g AppleInterfaceStyle
  • 10. Focus Attach an additional blurred CSS class to <body> when the window is blurred, adjust styling of: • Window frame • Selected items • Buttons Caveats: • Listen to BrowserWindow blur/ focus, not window blur/focus, which triggers when you focus iFrames.
  • 11. Focus Main Process Renderer Process @browserWindow.on ’focus’, =>
 @browserWindow.webContents.send(‘browser-window-focus’) @browserWindow.on ’blur’, =>
 @browserWindow.webContents.send(‘browser-window-blur’) ipc.on ’browser-window-focus’, =>
 document.body.classList.remove(‘blurred’)
 ipc.on ’browser-window-blur’, =>
 document.body.classList.add(‘blurred’)
  • 12. First Mouse • Use accept-first-mouse: true • On Windows, you can click window contents from the background. • On Mac OS X, you can click toolbar items and window controls from the background. (Use pointer-events:none to disable background interaction with everything else.)
  • 13. Cursor Considerations for Mac OS X • Stick to standard cursors. Use the hand cursor sparingly. On the Mac, it is typically only seen in web views. • Hover states are only used to reveal additional hidden options (like an X on a tab). Buttons, tabs, links, etc. have no hover states.
  • 14. Images • Apply -webkit-user-drag: none to all images and 
 -webkit-user-drag: text to everything else. • Support Retina displays! Choose images based on window.devicePixelRatio
 • Scale images by manually declaring their width and height, or specifying CSS zoom:0.5 when on a retina display. 

  • 15. Sound • Use with care! Unlike mobile apps, desktop software rarely makes noise. There are no audible clicks, pops, bounces. • Sound should accompany actions when impact may not be obvious. playSound: (filename) ->
 a = new Audio() a.src = path.join(resourcePath, ‘static’, ‘sounds’, filename) a.autoplay = true a.play()
  • 16. Retina Borders • Chrome CSS borders must be 1pt - on Retina displays, they render as two pixels. But you /can/ make half-point box shadows. box-shadow: 0 0.5px 0 rgba(0,0,0,0.15), 0 -0.5px 0 rgba(0,0,0,0.15), 0.5px 0 0 rgba(0,0,0,0.15), -0.5px 0 0 rgba(0,0,0,0.15), 0 1px 1px rgba(0, 0, 0, 0.15);
  • 18. Meet user expectations, or communicate new expectations?
  • 19. Meet user expectations, or communicate new expectations?
  • 20. Change Expectations • Avoids the uncanny valley by using interface elements that communicate platform standards do not apply. • Users don’t expect Spotify to behave like Windows or Mac OS X