dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.06k stars 1.56k forks source link

Enhancement: create a standard Dart API library for crossplatform Desktop Applications like Node-Webkit #20736

Closed DartBot closed 9 years ago

DartBot commented 10 years ago

This issue was originally filed by @Emasoft


Many popular desktop applications are written in javascript thanks to node.js. There are many frameworks for node.js that create a divided community, and this is slowing down the javascript invasion of the desktop world. Some examples of those Node.js libraries for desktop applications are:

NODE-WEBKIT https://github.com/rogerwang/node-webkit TIDESDK - http://www.tidesdk.org BRACKETS-SHELL - https://github.com/adobe/brackets-shell DESKSHELL - http://deskshell.org/demo-docs/index.htm APPJS - https://github.com/appjs/appjs

Here is a list of desktop apps written with node.js and node-webkit:

https://github.com/rogerwang/node-webkit/wiki/List-of-apps-and-companies-using-node-webkit

To convince people to leave javascript for Dart, Google should take a serious stance on Desktop applications with Dart. Dart should be provided with a STANDARD API LIBRARY for Desktop Applications. A crossplatform, run-everywhere, HTML5 based, application framework. It should be not so difficult, especially considering that all the above mentioned node.js frameworks for desktop applications are based on the Chromium Embedded Framework (CEF), a Google technology!

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

The library should be called Desktop, and imported in a Dart script the classical way:

import 'dart:html'; import 'dart:desktop';

Such library should be developed by Google and included in the Dart framework as a standard library. Dart desktop applications will be executed natively by the Dart VM, not compiled to javascript. Those apps should not be dependent on the Chrome browser, but they should run in any system (Linux, FreeBSD, Win, OSX, Android) with a DartVM installed. The crossplatform nature of such apps and the freedom to use any standard html5/css/WebGL technology to design the GUI would attract a lot of javascript developers that are now using node.js.

DartBot commented 10 years ago

This comment was originally written by @zoechi


I guess Chrome Apps is how Google is targeting the desktop. Which advantages do you see in pure desktop apps using Chromium embedded vs Chrome Apps?

DartBot commented 10 years ago

This comment was originally written by nistva...@gmail.com


We had a longer discussion about this in the Dartsians community: https://plus.google.com/u/0/+Istv%C3%A1nNagy86/posts/PrF7tzTUQGs There I've exaplained some advantages a native "dart-webkit" implementation would make.

DartBot commented 10 years ago

This comment was originally written by @Emasoft


A desktop app should have the look and feel of a real application. It should not be contained in a browser window. It should not have the memory footprint of a browser. It should include only the necessary components for rendering HTML5. If you try some node-webkit apps you would understand what I mean. Try popcorn time for example: http://popcorntime.io

DartBot commented 10 years ago

This comment was originally written by @zoechi


It's nice of course but I don't see a mass adoption of this approach. I guess most developers would go with a Chrome App just to be able to distribute it using the App Store. In my opinion this is a typical community project. Just my 2c.

anders-sandholm commented 10 years ago

cc @dgrove. Added Area-Library, Triaged labels.

DartBot commented 10 years ago

This comment was originally written by @Emasoft


The App Store is too cumbersome. You cannot bind the possibility to code an HTML UI to the App Store of some browser. If I'm writing a simple Dart shell script for installing some packages on multiple computers on a local lan I just want to display a quick dialog window to choose the install path or select some configuration options, or even just display a progress bar. Ten lines of HTML and I've done. I certainly do not want to put my script on some app store. Also the Desktop Dart library should be included with every DartVM installation, or even compiled to binary as an independent executable, using tree-shacking to eliminate all functions of the Desktop library that I don't use in the script. This is what I expect when I develop an App in any other language, and this is what Dart should do too. If I want to create a text editor app in Dart for example, I want it to be quick to load and as lightweight as possible. I don't want the baggage of an entire browser to slow the app down everytime I load it. Also a Browser is a moving target because it is always updated due to security fixes. As a Dart developer I need to rely on libraries with specific version intervals that I can control. Also there are a lot of people that consider Chrome Apps second class citizens because they see them just like browser plug ins or extensions. This reduces their perceived value. I don't want my App to be felt that way, even if I decide to publish it on the app store. Also the desktop library must be open source, and I should be able to patch it if I need to, and ship my app with a modified version of it. This is the kind of flexibility that you need to make Dart a successful language for desktop applications.

DartBot commented 9 years ago

This comment was originally written by mka...@gmail.com


I sincerely support this effort, ASAP!

sethladd commented 9 years ago

Issue #21336 has been merged into this issue.

kevmoo commented 9 years ago

We'd love for the community to take Dart in this type of direction, but it's not likely something we'll invest in directly.


Added NotPlanned label.

DartBot commented 9 years ago

This comment was originally written by @Emasoft


But you have already invested in it! Chromium Embedded Framework (CEF) is ready. You just need to put an API wrapper on it for Dart! Please!

DartBot commented 9 years ago

This comment was originally written by romanvanesyan...@gmail.com


Hello, note that node-webkit isn't based on CEF anymore https://github.com/rogerwang/node-webkit/issues/2437