Photino vs. Electron
This documentation is in still being developed and we think these sections should be added. Feel free to contribute.
Browser Control Used in Native Window
Electron calls this the Renderer process and uses Chromium in a native window. Chromium is downloaded with each app.
Photino tries to use whatever is normally included in the OS:
- Windows - Chromium Edge WebView2
- Linux - WebKitGTK+2
- Mac - WKWebView
Host Application
Electron calls this the Main process and uses Node.js which is downloaded with each app.
Photino.Native can be wrapped for any back end (C++, Rust, etc.).
Photino.NET uses .NET 5 (or later).
Host Application / Browser Control Communication
Electron uses custom inter-process communication (IPC). The ipcMain and ipcRenderer libraries use ‘channels’- strings that identify which listener to use on the other end. ipcRenderer – can call all Node.js APIs e.g. const root = fs.readdirSync(‘/’)
because everything is JavaScript in Electron applications and JavaScript code can be marshalled between processes as strings.
Photino.NET uses memory streams to communicate with the Photino.Native process and ‘schemes’; which are outlet points in the HTML. The standard is to transfer a JSON payload which includes a unique message id, the name of the method to call, any parameters to pass and to receive a JSON payload containing the unique message id of the original call and any response data.
In addition, it's common for Photino.NET projects to host REST services which can be called from the browser control using standard JavaScript in a commonly used communication pattern.
Distribution
Tools
Electron uses electron-forge, or electron-builder, or electron-packager. Photino uses standard .NET distribution methods. Manual Distribution
Code Signing
Mac App Store
Windows App Store
Snapcraft
Automatic Updates
Electron maintains update.electron.js, free open-source webservice for self-updating. Developers can use the update-electron-app module package to initiate updates from the application. Alternately, deploy your own update server (3 to choose from).
Photino
OS Integration
Notifications
Electron Supports a JavaScript notification API for the Renderer process and a Notification module for the main process.
Recent Documents (Windows, Mac)
Electron supports the recent document functionality built into Windows and Mac.
Taskbar Progress (Windows, Mac, Unity)
Electron supports icon with progress indicators on Windows, Mac & Unity.
Mac Doc
Electron supports the Mac Doc.
Windows Taskbar
Electron supports the Windows task bar.
Linux Desktop Launcher
Local and Global Keyboard Shortcuts
Online/Offline Event Detection
Represented File (Mac)
Electron supports Represented Files on Mac OS Browser Windows
OS Native Drag & Drop
Offscreen Rendering
Dark Mode for OS Dialogs, etc.
Web Embeds
Electron supports iFrame, WebView (deprecated), BrowserView (overlaid on top of DOM)
Project Templates
Electron supports BoilerPlate-CLI and there are various tools to help users create new projects. Photino.NET supports project templates in Visual Studio as well as the dotnet CLI
Native Node Modules (native to OS)
Must be built specifically for Electron.
Performance
Security
Accessibility Features
Debugging
Native Menus
Menu | Electron (electronjs.org) MenuItem | Electron (electronjs.org)
Native Dialogs
dialog | Electron (electronjs.org)
Crash Reporting
crashReporter crashReporter | Electron (electronjs.org)
Shell Access
Electron supports Shell shell | Electron (electronjs.org) **Photino.NET supports anything you can do in .NET, including shelling out to the operating system.
Custom Window Title Bar
Both Electron and Photino support hiding the native window's title bar and creating a custom title bar in HTML.