
Show HN: Sciter and Node.js versus Electron - c-smile
https://terrainformatica.com/2018/12/23/sciternode-versus-electron/
======
c-smile
Sciter's author here...

I am thinking of making Sciter as UI module for NodeJs.

1\. Strip down version of Sciter - only HTML/CSS/Graphics modules. It will use
JavaScript of NodeJs (either V8 or Chackra).

2\. That version will be Open Source in the same way as NodeJs itself.

The goals are:

1\. To provide more optimal alternative to Electron - faster and far less
resource consuming.

2\. Modular and reusable implementation. Example: Sciter contains my own
Graphics C++ library that wraps various backends: Direct2D/Write,
CoreGraphics, Skia, Cairo, GDI+. Such Graphics module library alone can be
useful in other projects. Same is for HTML/CSS modules.

Not sure if all that is interesting for someone. If it is - please let me
know.

~~~
dreix
I need to run a vue app that can load an external file into its own frame and
print that to PDF. Can sciter do that? Right now I'm using a webview in
electron which lets me print just that webview to PDF.

~~~
c-smile
Sciter supports print and print preview out of the box:
[https://terrainformatica.com/2015/05/25/sciter3-print-
previe...](https://terrainformatica.com/2015/05/25/sciter3-print-preview-is-
getting-back/)

As of PDF generation: Skia backend is capable of PDF generation but that
functionality is not exposed to script yet.

Another option: Windows supports PDF print drivers so you can just print on it
to get PDF.

------
aetherspawn
Comparing the entire Visual Studio Code with a little sample IDE application
is kind of barely a test at all?

~~~
c-smile
That's true. Better is to compare [https://html-notepad.com](https://html-
notepad.com) application. It's size is even smaller as it does not include V8.

I mean that Visual Code has way more scripts to support different languages
but these are text, highly compressible, files. In any case they are not
loaded all at once but RAM consumption is still 6 times more than it could be
for that type of application.

~~~
aetherspawn
VSCode has a richer UI, more functionality and of course supports extensions,
source control etc by default. It just does a whole lot more. I think you’d be
better off comparing with an actual port of the example compiled for each
engine.

~~~
c-smile
Check Typora Markdown editor: [https://typora.io/](https://typora.io/) \- it
is a markdown editor made with Electron.

It has as sort of WYSIWYG editor as markdown source editing so it is
conceptually close to html-notepad.

All basic ratios are the same - it consumes RAM 4-5 times more than it should.
Same with distribution size and size on disk.

Yet I think that it will be fair to compare Sublime Text and Visual Code as
they have close functionality. Sublime (has its own DOM and uses script for
plugins) consumes 10 times less RAM than Visual Code.

Each Electron application is a full scale browser with its own JS VM instance
and Node.js that is full scale web server with another instance of JS VM. It
is just that for communication they use IPC rather than HTTP.

As many E applications you are running as many browsers and servers you have
in memory. That is by Electron's design - nothing new here.

------
Fudgel
@c-smile - Looks interesting, does sciter offer a systray/menubar api too?
Cause thats one thing I would really want in a desktop app SDK.

~~~
c-smile
Check this sample : [https://github.com/c-smile/sciter-
sdk/tree/master/samples/id...](https://github.com/c-smile/sciter-
sdk/tree/master/samples/ideas/tray-notifications) in SDKs sciter.exe. That is
tray notification.

As of menu: sdk/samples/menu

------
ryanthedev
Just what I have been looking for. +1. Can’t wait to take it for a test drive.

