A bit about Neutralino.js

What is neutralino.js?


This technology is a rather interesting analogue of the currently established Electron and NodeWebkit . How is it different from the above technological solutions? If you believe the statements provided in the official documentation, the architecture of the application construction itself is excellent, which allows you to create cross-platform applications on web technologies with a fairly small size of the final build.

image

How is the installation going?


Based on the official documentation, we can distinguish two options for installing and using the described technology in the development of our own cross-platform web-based applications.

  1. Download the finished portable SDK .
  2. Using a special CLI-interface under the name neu-cli.

In this article, we will consider exactly the second installation option, because in my own subjective view, the given solution is the most holistic both in architectural and in practical terms.

#  npm
$ ~ npm install -g @neutralinojs/neu

#  yarn
$ ~ yarn global add @neutralinojs/neu

Note for users of * nix systems
, webkit2gtk. Neutralino.js.

#  Linux Arch   
$ ~ sudo pacman -S webkit2gtk

#  Debian   
$ ~ sudo apt-get install libwebkit2gtk


Key architectural features


This technology is implemented on the basis of client-server architecture, and is also characterized by the use of a rather non-trivial assembly system, which is based on pre-prepared binary files for each operating system.
Also, perhaps, it is worth noting that there are several variations of starting and debugging software, namely:

  1. Cloud - characterized by the ability to connect any software product, taking into account the popularity of the port used for it.
  2. Browser - characterized by the automatic opening of the main browser on the user's computer. A token system is used.
  3. Window is the main method used to distribute your software. As in the previous version, a token system is used, which is embedded in your html document.

Folder and File System


β”œβ”€β”€ app
| β”œβ”€β”€ assets
| | β”œβ”€β”€ app.css
| | β”œβ”€β”€ app.js
| | └── neutralino.js
| β”œβ”€β”€ index.html
| └── settings.json
└── neutralino-win.exe
└── neutralino-linux
└── neutralino-mac
└── storage

  1. app/assets β€” , Neutralino.js , . , app.css app.js.
  2. index.html β€” .
  3. settings.json β€” , .
  4. appname-linux β€” Linux.
  5. appname-win.exe β€” Windows.
  6. appname-mac β€” macOS.
  7. storage β€” JSON , .

. API-


  1. Settings β€” , Β«settings.jsonΒ».
  2. File System β€” . , , .
  3. OS β€” . ,
  4. Computer β€” . .
  5. Storage β€” JSON- Β«storageΒ».
  6. Debug β€” . .
  7. App β€” . exit.


The developers of this technology try to adhere to a minimalistic environment for your final application, and it is from this that some rather interesting errors and problems follow.

Firstly, there is a rather severely limited functionality. What will happen if it is lacking? Exactly. You will have to use a completely different technological solution.
Secondly, there is no interaction between the render and server process in the official documentation. It is in this case that you have only one option for solving your problem - viewing source codes from developers.

Thirdly, the build system used does not correspond to a minimalistic data set, because for software distribution you need to distribute both files for the * nix system and for Windows at one time.

Fourth, the declared minimalism of the final build ends in the assembly of a test React application. The final build goes around 180-190 MiB.

Conclusion


The technology described in this article is an interesting architectural solution for writing desktop applications based on web technologies, but at the same time a very crude product, which at this point in time is simply not able to give decent competition not only to Electron, but also to NodeWebkit .

In my own opinion, this problem lies precisely in the used architectural solutions and inadequate documentation of the technology itself. Maybe you should expand the functionality of the final application? And is such minimalism needed at a given time? After all, the gain of 20-30 MiB for RAM is quite small by the standards of today's hardware.

All Articles