4 things to keep in mind when creating a cross-platform app

Software developers should avoid manually constructing paths from strings whenever possible and use some form of object-oriented path processing. For example, in Python’s standard library: pathlibThe module converts the path to an object rather than a string. Then, you can apply the appropriate path separator through programming, regardless of the OS.

File system case sensitivity

Windows traditionally has a case-insensitive culture in its file system. The operating system itself is case-sensitive, but Windows’ FAT, FAT32, and NTFS file systems are case-insensitive by default.

Provided that all file names used in your application are unique, regardless of case (e.g. myfileclass MyFileIf it’s not in the same directory, it’s not a problem. Even if this isn’t an issue, using unique names is a good strategy.

Use web rather than platform-native UI whenever possible

Although Electron gets a lot of hate, it solves one problem: creating consistent, truly cross-platform apps. Electron’s way of solving this problem is to use web technologies for front-end rendering of the app, turning the app into a locally hosted web application.

Most criticisms of Electron focus on the size of the final product (which can be several hundred megabytes), the lack of robustness of the web frontend for certain tasks, or the fact that frontends have no choice but to be built using HTML, CSS, and JavaScript. .

The first criticism is entirely valid. Electron builds generally have large capacities. This is because Electron’s design requires it to be bundled with a fully standalone web browser instance. This has led to the rise of alternatives such as Tauri. Tauri uses the Rust language and the resulting package size is much smaller. There is a trend away from monolithic deliverables that include a browser and toward leveraging the operating system’s existing web view component whenever possible.

Source: www.itworld.co.kr