سؤال

Whilst node-webkit is nice, the binaries on mac and linux are over 70MB for a hello world application. Unacceptable.

Is there any cross platform library available that simply uses the system default browser? I don't really care if that's IE, or webkit, or ... ? I presume that way the binary would be much smaller.

Or is there any cross-platform language that can easily integrate a (system) browser view?

Thanks.

هل كانت مفيدة؟

المحلول 3

EXCERPT from your question: "I don't really care if that's IE"

https://code.google.com/p/phpdesktop/

You can try the PHP Desktop MSIE from the link above, whose minified version is only 5.823 MB

نصائح أخرى

There is AppJs, but I don't think it could occupy much less space.

In all cases, a runtime similar to node-webkit is always going to take up some space because it needs to include a webkit rendering engine and a Javascript engine at least, and those are large applications.

node-webkit can be shared across several node-webkit applications, so it's not needed to install 70MB each time, have a look at this documentation for further details:

enter image description here

The size of node-webkit is actually quite reasonable compared to other runtimes such as the JVM which takes up several hundreds megabytes, and 70MB as disk size of nowadays is small (as a comparison it's the size of 10/20 pictures).

Concerning one of your questions, node-webkit cannot reuse the already installed Chrome because it's based on Chromium which is a different browser.

Also there is no way for it to tap into or reuse existing webkit engines in already installed browsers, because versions might be different, security reasons, etc.

Also the webkit in node-webkit is modified to for example allow the user to access the file system, open database connections and all the expected functionality of a non browser based desktop application, so that's another reason why reusing installed browsers is not possible.

I think that TiDeSDK Could fit your needs.

It's is designed to create desktop apps, based in node and webkit. According to its web site the application Wunderlist is developed with TiDesdk and its size is about 30MB based in Mac App Store page: https://itunes.apple.com/us/app/wunderlist-to-do-task-list/id410628904?mt=12

However, if the size is really important for you, maybe you could consider to develop a Chrome or Firefox extension, that would generate the smallest file to distribute.

EDIT: It seems that the people that worked in TideSDK started a new project, TideKit, with a similar key features and including mobile platforms, It's explained here

Sencha Desktop Manager aims to deploy web app on desktop:

https://www.sencha.com/blog/whats-new-in-sencha-desktop-packager-1-2/

However I don't even know if the tool is still supported. FRom what I heard it is part of Sencha Complete, which is expensive. Besides the API seems limited compared to what NW provides -- a tool built on top of Nodejs.

You said the binaries are over 70MB. It depends on what you think is vital: is it the size of your delivery file or the size of your app once installed? Once installed the app may be 70MB.

However your nw app must be zipped if you want to distribute it. I developed a nw app with 200+ Javascript files. Once zipped the package is 30MB (MAC OS X) and 28.5MB (Windows). I have just checked it.

The runtime is heavy, but the rest of the app is light: only Javascript files, images and other kind of files. So not much a huge difference between a hello world app and a not trivial one (although images and other resources can be heavy).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top