Because Tutanota focuses on open source and Linux client development, we hope to release a desktop application suitable for Linux and other platforms. As a small team, we quickly ruled out the possibility of building native applications for Linux, Windows and MacOS, and decided to use Electron to build our applications.
For anyone who wants to deliver visually consistent cross-platform applications quickly, especially if you already have a Web application and want to get rid of the constraints of browser API, electronics is the most suitable choice. Tutanota is such a case.
Tutanota, based on SystemJS and Mithril, aims to provide simple and secure e-mail communication for everyone. Therefore, it must provide standard functions that many users expect from e-mail clients.
Due to the adoption of modern API and standards, some of its functions (such as basic push notification, searching text and contacts, supporting two-factor authentication, etc.) are easily provided in the browser. Other functions (such as automatic backup or no IMAP support from our server) need to restrict access to system resources, which is exactly the function provided by the electronic framework.
Although some people criticize electronics as "just a basic package", it has obvious advantages:
Tutanota does not rely on large investment funds, but on community-driven projects. Based on the payment plan that more and more users upgrade to our free service, we organically develop our team. Listening to the needs of users is not only important to us, but also crucial to our success.
Providing desktop client is the most wanted function of Tutanota users, and we are proud to provide free desktop client beta for all users now. (We also implemented another demanding function-searching encrypted data-but this is another topic. )
We like to provide users with a signed version of Tutanota, which supports functions that cannot be realized in browsers, such as pushing notifications through background processes. Now, we plan to add more desktop-specific features, such as IMAP support (without relying on our server as a proxy), automatic backup and offline availability.
We chose Electron because its combination of Chromium and Node.js is most suitable for our small development team, because it only needs to make minimal changes to our Web application. When we started using the browser API, it was very useful for all functions. As we progress, we will gradually replace these components with more native versions. This method is particularly convenient for downloading and notifying attachments.
We know that some people are worried about electronic security, but we find that the option of fine-tuning electronic access in Web applications is very satisfactory. You can use resources such as Electron's security documents and Luca Carettoni's electronic security checklist to help prevent the untrustworthy content in Web applications from catastrophic accidents.
Tutanota Web client has established a reliable protocol for inter-process communication from the beginning. We use Web threads to keep the user interface (UI) responsive when encrypting and requesting data. This is convenient when we start to implement our mobile applications, which use the same protocol to communicate between local components and Web views.
This is why when we started to build a desktop client, many parts of pushing notifications, opening mailboxes and using file systems already existed, and we only need to implement native client (Node.js).
Another convenience is that our construction process uses Babel translator, which allows us to write the entire code base with modern ES6 JavaScript and mix and match functional modules in different environments. This enables us to quickly adjust the code of electronic-based desktop applications. However, we also encountered some challenges.
Although electronics make it easy for us to integrate with desktop environments of different platforms, you can't underestimate the time invested! Finally, it is these little things that take more time than we expected, but they are also crucial for completing the desktop client project.
Platform-specific code causes most obstacles:
This process is a bit complicated because users expect some (sometimes not directly compatible) behaviors of applications on different platforms. It takes some iterations to make all three versions feel native, and even some moderate supplements are needed to Web applications to provide functions similar to text search in browsers.
Our experience in electronics is basically positive. We finished this project in less than four months. Although there are some quite time-consuming functions, we are surprised that we can easily provide a beta Tutanota desktop client for Linux. If you are interested, you can learn more source code on GitHub.
Via:/article/19/4/Linux-desktop-electronic
Author: Niels Gunther Title: lujun9972 Translator: wxy Proofreading: wxy