桌面应用
SheetJS 是一个用于从电子表格读取和写入数据的 JavaScript 库。
¥SheetJS is a JavaScript library for reading and writing data from spreadsheets.
JavaScript 和 HTML 等 Web 技术可以为传统软件提供支持。
¥Web technologies including JavaScript and HTML can power traditional software.
此演示涵盖了许多桌面应用框架。在每个演示中,我们将构建一个使用 SheetJS 库读取和写入电子表格文件的应用。
¥This demo covers a number of desktop app frameworks. In each demo, we will build an app that uses SheetJS libraries to read and write spreadsheet files.
策略
¥Strategies
有两种不同的集成策略。"WebView" 策略嵌入了一个迷你 Web 浏览器并添加了支持的原生组件。"引擎" 策略使用适合桌面应用的嵌入式 JavaScript 引擎。
¥There are two different integration strategies. The "WebView" strategy embeds a mini web browser and adds supporting native components. The "Engine" strategy uses an embedded JavaScript engine that fits into the desktop app.
WebView
WebViews 是专门设计用于嵌入应用的特殊 Web 浏览器组件。由于浏览器组件可在所有主要平台上使用,因此桌面应用可以使用 WebView 作为主用户界面。这种方法允许小团队构建跨操作系统和架构运行的软件。
¥WebViews are special web browser components designed to be embedded within apps. As the browser components are available across all major platforms, desktop apps can use the WebView as the main user interface. This approach allows small teams to build software that works across operating systems and architectures.
该应用采用 HTML 和 CSS 设计。可以使用 Web 框架,但通常不是必需的。
¥The app is designed in HTML and CSS. Web Frameworks can be used but are typically not required.
引擎
¥Engine
包括 V8 在内的 JavaScript 引擎可以直接添加到传统桌面软件中。在 "JavaScript 引擎" 演示 中更详细地探讨了这种方法。
¥JavaScript engines including V8 can be directly added to traditional desktop software. This approach is explored in greater detail in the "JavaScript Engines" demo.
桌面应用
¥Desktop Apps
桌面应用框架打包了 JavaScript 引擎和窗口框架来支持图形应用。SheetJS 与许多应用框架兼容。
¥Desktop app frameworks bundle a JavaScript engine and a windowing framework to enable graphical apps. SheetJS is compatible with many app frameworks.
常见桌面工具的演示包含在单独的页面中:
¥Demos for common desktop tools are included in separate pages:
- Electron - Embedded NodeJS + Chromium
- NW.js - Embedded Chromium + NodeJS
- Wails - Webview + Go Backend
- Tauri - Webview + Rust Backend
- NeutralinoJS - Webview + Lightweight Extensions
- React Native - Native Components with React
Electron 是最成熟且使用最广泛的框架。凭借对 NodeJS 模块的深入支持和一致的用户界面,它是新项目和 Web 开发者的推荐选择。
¥Electron is the most established and widely-used framework. With deep support for NodeJS modules and consistent user interfaces, it is the recommended choice for new projects and for web developers.
对于具有其他编程语言经验的团队来说,Wails 等框架是令人信服的替代方案。
¥Frameworks like Wails are compelling alternatives for teams with experience in other programming languages.
React Native 等框架生成使用原生 UI 元素的应用。
¥Frameworks like React Native generate applications that use native UI elements.
平台支持
¥Platform Support
以下框架已在以下平台上进行了测试:
¥The following frameworks have been tested on the following platforms:
命令行工具
¥Command-Line Tools