The Mac App Developer s Dilemma Using Electron or Native Technology?

Mondo Technology Updated on 2024-03-06

Introduction.

The widespread use of cross-platform development frameworks in Mac applications has brought convenience, but it has also sparked a series of controversies. This article will dive into these issues and show the practical impact of these issues by comparing native and electron-based apps, using BBEDIT and WhatsApp as examples.

Introduction to the framework and its development history.

The history of cross-platform development can be traced back to the Nextstep platform in the 90s, and then evolved through platforms such as Microsoft's Xamarin, which gradually evolved into today's frameworks such as Reactnative and Electron. These frameworks mainly use web technologies such as JASCRIPT and CSS to build cross-platform desktop applications, providing developers with the convenience of simplifying the cross-platform development process.

However, with the widespread use of frameworks, it has also brought a series of problems. The use of external frameworks causes the application to lose its native feeling, and the characteristics of browser applications make the user experience problematic, such as response delays, interface inconsistencies, etc. Although the Electron app improves these issues in some ways, it is essentially similar to a browser app.

The impact of external frameworks on the application.

Native apps often look and operate more closely with the design specifications of a particular operating system, while apps that use external frameworks perform less well in this regard. This results in a less native feel to the app, which makes the user feel some discomfort during use. For example, an application built with Electron mimics the appearance of the native operating system to some extent, but in practice, users may still perceive some subtle differences, which creates a certain challenge for the user experience.

The user experience problem is not only manifested in appearance, but also in the implementation of functions. While electron apps improve the experience of browser apps to some extent, such as executing web pages** in a platform-specific runtime environment and enabling tighter integration of operating system features, there are still some issues that differ from native apps. For example, in some applications built on browser technology, issues such as response delays and interface inconsistencies can significantly impact the user experience. Users may not be able to perform functions such as copy-paste or drag-and-drop properly, and may also have doubts about whether the work is saved, where the file will be saved, and so on.

Volume comparison: bbedit vs. whatsapp

By comparing the two apps, BBEDIT and WhatsApp, we can see that there is a significant difference in the size of the app between the different frameworks. As a native app, bbedit is feature-rich and reasonably dimensional. It supports syntax highlighting in about 50 programming languages, provides complete regex search and replacement functions, and has rich features such as SFTP FTP browser, HTML templates, folding, thumbnails, etc. WhatsApp, on the other hand, is much larger than a Electron-based app, raising concerns about the bloated app.

Volume is not only a matter of space, but also involves the occupation of system resources. Apps take up a certain amount of storage space regardless of whether they are running or not, and when they run, they also consume RAM and CPU processing resources. These factors can cause your Mac to run overheating, affecting overall system performance, wasting energy, and shortening your battery life. Especially for some very large applications, their operational efficiency may be further reduced, becoming a major burden on the system.

The impact of application bloat on system performance.

Bloated apps aren't just a matter of taking up storage space, but more seriously, they have a direct impact on system performance. Excessive applications may lead to excessive usage of system resources, which can cause the system to run slowly or even lag. This phenomenon is even more pronounced for some lower-performance devices. Therefore, the size of the application is not only related to the user's storage space, but also to the stability and smoothness of the overall system.

Applications stored on the hard drive, whether they are running or not, take up a certain amount of storage space. And once running, they also consume RAM and CPU processing resources. This unnecessary consumption of resources can cause your Mac to run overheating, affecting overall system performance, wasting energy, and shortening battery life. This phenomenon is an unpleasant experience for users who are looking for high performance and long battery life.

For Mac users, especially those with older devices, oversized apps can make the device run slow, resulting in an unsmooth user experience. Although Macs have large storage space and powerful hardware performance, rational use of resources is always an issue worth paying attention to. Therefore, developers need to carefully consider the size of their applications to ensure that users can use their applications in the best possible experience.

Test the startup speed and memory footprint of bbedit and whatsapp.

By testing the startup speed and memory footprint of BBEDIT and WhatsApp, we can more intuitively feel the difference in efficiency between native and electron-based applications. Startup speed is an important aspect of the user experience, as users often expect applications to respond quickly to their needs. BBedit's quick startup shows the advantages of native apps, while WhatsApp's long startup highlights some of the issues with electron-based apps.

Memory footprint is another key performance metric. BBEDIT's relatively small memory footprint indicates that native apps are more efficient in terms of resource utilization. However, WhatsApp's ostensible memory footprint is only 110MB, which seems to be less than bbedit. However, in reality, WhatsApp runs 5 separate "worker processes" that take up about 14GB of RAM. This shows that electron-based applications have some problems with memory footprint, which is far beyond reasonable range. For users, this can lead to degraded device performance, system instability, and even other applications running at the same time.

Conclusions and appeals.

Based on the results, we conclude that while cross-platform development frameworks provide convenience, they also bring some problems, especially the bloated applications. Therefore, developers are called upon to pay attention to the volume of applications and curb the trend of application volume based on frameworks such as electron to improve user experience and system performance. While constantly pursuing the convenience of cross-platform development, we should also pay attention to the optimization of user experience and applications.

The widespread adoption of cross-platform development frameworks is a product of technological developments, providing developers with more flexible options for applications to run across multiple operating systems. However, this doesn't mean that developers can ignore the app's performance and experience. Users are more likely to use high-performance, small-footprint applications than slow-moving, resource-intensive applications. Therefore, optimizing applications to improve their performance and user experience is still a problem that developers need to focus on and work hard to solve. In the future, we look forward to seeing more cross-platform development frameworks that balance convenience and performance to provide users with a better application experience.

List of high-quality authors

Related Pages