[dart-announce] Dart for the Entire Web

508 views
Skip to first unread message

Kevin Moore

unread,
Mar 25, 2015, 1:46:04 PM3/25/15
to anno...@dartlang.org

We work with many teams, inside and outside of Google, that use Dart every day to build business-critical apps. Their feedback is consistent: they love working with the Dart language, libraries, and tools, and they compile Dart to JavaScript when they deploy to the web.  However, they also tell us they need better integration with JavaScript, and they need an easier way to debug and optimize their apps across all modern browsers. We listened, and today we are announcing a more focused strategy for Dart for the web.

In order to do what's best for our users and the web, and not just Google Chrome, we will focus our web efforts on compiling Dart to JavaScript. We have decided not to integrate the Dart VM into Chrome. Our new web strategy puts us on a path to deliver the features our users need to be more productive building web apps with Dart. It also simplifies the testing and deployment scenarios for our developers, because they can focus on a single way to build, test, and deploy their Dart apps for the web.

Google Ads, one of Dart's biggest customers, is committed to Dart and supports this new strategy. Scott Silver, VP of Engineering for Ads, says, “We are committed to building our next-generation web apps with Dart, and a renewed focus on generating optimal JavaScript helps us deliver great apps to everyone with a modern browser. Dart has significantly improved our engineers' productivity and our ability to quickly launch and iterate. We currently have one million lines of Dart code and the number is growing fast.” Many other teams inside of Google, such as Google Fiber, Google Express, and Google's internal sales team, use Dart for business-critical apps.

Dart developers outside of Google are also very supportive of our new focus. When DGLogik, developers of Internet of Things applications, needed to convert their complex visualization software from Flash to HTML5, they chose Dart because “the Dart team's focus on the entire web ensures we continue to deliver great experiences for all our users.” Dennis Khvostionov, CTO of DGLogik, continues: “Without Dart's productivity benefits and tooling, we'd need a team twice our size.”

Many of our developers use Dart for both client and server apps, reducing costs by sharing code. We remain committed to optimizing and improving the Dart VM for developer tools, servers, and mobile apps.

We started the Dart project because we believe that every developer deserves simplicity, productivity, and performance. Our new web strategy makes it easier for developers to build with, and for, the modern web with Dart. With Google Ads' long-term commitment to Dart, and our new focused strategy for the web, we are excited by our path forward.

--
For more news and information, visit https://plus.google.com/+dartlang
 
To join the conversation, visit https://groups.google.com/a/dartlang.org/

Rat Jo

unread,
Mar 25, 2015, 2:03:44 PM3/25/15
to mi...@dartlang.org, anno...@dartlang.org
This is one of the best news! I though it was already like that! It's amazing that the Dart team now make it official. I'm loving it!

Question: Will nodejs get some love too? :)

Joao Pedrosa

unread,
Mar 25, 2015, 2:59:34 PM3/25/15
to mi...@dartlang.org
Hi,

Thanks for the news.

Here's hoping that Dart can marry JavaScript everywhere for a great inter-operation story.

It would be good for example for the Dart VM to evaluate JavaScript code. Call it the mixed bag VM. :-)

Maybe they could borrow code from the Oilpan project to make that kind of thing work for multiple languages, starting with the obvious ones.

Many languages used to allow embedding assembly languages in their normal code for example. So Dart could embed JavaScript code like that.

I could also dream of having the Dart tools understand both JavaScript and Dart code so that it made minimizing and packaging as easy as it is for just Dart code.

Although the actual Dart VM may not show up on Chrome in the soon future, I hope that projects like SoundMode will provide for a trade-off that makes compiling Dart into JavaScript about as performant, with the help of TurboFan optimizations.

Above all else I just hope that Google can find a good trade-off between high-level languages and great deployment opportunities. Deploy, deploy, deploy!

Cheers,
Joao





--
For other discussions, see https://groups.google.com/a/dartlang.org/
 
For HOWTO questions, visit http://stackoverflow.com/tags/dart
 
To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.

'Bob Nystrom' via Dart Announcements

unread,
Mar 25, 2015, 4:44:17 PM3/25/15
to General Dart Discussion, announce

On Wed, Mar 25, 2015 at 11:03 AM, Rat Jo <jora...@gmail.com> wrote:
Question: Will nodejs get some love too? :)

I would personally love to have node.js bindings for Dart and be able to mix Dart and JS for server-side apps on node. We have a lot of work to do (but now a lot more opportunities) to improve our JS-interop story first, but I think this makes it much more feasible.

Cheers!

- bob

Warren

unread,
Mar 25, 2015, 9:28:00 PM3/25/15
to mi...@dartlang.org, anno...@dartlang.org



 I would love to see integration with the JVM.  There is a vast ecosystem of Java libraries that could be leveraged. And Dart would make a nice alternative to JVM scripting languages such as Groovy or Javascript. 

Lex Berezhny

unread,
Mar 25, 2015, 9:31:26 PM3/25/15
to misc
On Wed, Mar 25, 2015 at 9:27 PM, Warren <warren....@gmail.com> wrote:
 I would love to see integration with the JVM.  There is a vast ecosystem of Java libraries that could be leveraged. And Dart would make a nice alternative to JVM scripting languages such as Groovy or Javascript. 

I don't know about that, Groovy is pretty nice :-)

But Dart on JVM would definitely be useful in any case.

The announcement mentioned "mobile", so the wizards at Google are probably cooking something tasty for us. If it's anything substantial it'll probably have to include some kind of Java integration for Android.

 - lex

Kiran Rao

unread,
Mar 26, 2015, 1:41:13 AM3/26/15
to mi...@dartlang.org
The "mobile" portion of the announcement most likely refers to Fletch: https://github.com/dart-lang/fletch/wiki
In particular, check out the "Dart Services on Android" and "Dart Services on iOS" links. 

The way I look at it, this is Dart's attempt at cross-platform business logic coding - leaving the UI to be developed using the respective native frameworks. Other solutions have solved this problem in different ways (j2objc, cordova, robovm etc)

Daniel Davidson

unread,
Mar 26, 2015, 7:47:32 AM3/26/15
to mi...@dartlang.org
Bob, what advantages would better js/dart integration provide? Honest question, I know not node and am enjoying dart. Is is just to use existing js code not yet written in dart?

On server side what advantages would node provide over or in conjunction with dart?

W. Brian Gourlie

unread,
Mar 26, 2015, 10:06:12 AM3/26/15
to mi...@dartlang.org, anno...@dartlang.org
This is really unfortunate, but not surprising.  RIP snapshots in the browser :(

Joao Pedrosa

unread,
Mar 26, 2015, 10:10:23 AM3/26/15
to mi...@dartlang.org
Hi Daniel,

I think part of the story they want to address with future versions of Dart is to allow code to be written in Dart and then to share that code as a JavaScript library that others could use from a JavaScript setting. So when they say they want better JavaScript support in dart, they may be partly referring to that end-goal. If they could have done that, then perhaps things like Angular could have been written in Dart itself and then shared as a JavaScript library for others to consume it.

Node.JS has a vast community support. In some ways it's just about sharing a common JavaScript interface, since people consider JavaScript to be the standard. Being JavaScript they don't consider it proprietary work that could go under some day and take with it all of their code and applications.

One thing that JavaScript still has that Dart does not is runtime evaluation of code with things like "eval." Dart has features that make it more static in comparison, so where Dart shines may be different from where JavaScript shines. Depending on the needs, people in JavaScript would have loved to have some of the static features of Dart for some deployment purposes. But for development purposes, being able to change code at runtime gives them some neat features as well.

People may make fun of things like "monkey patching" that is possible in JavaScript and not so possible in Dart. But "monkey patching" can sometimes help them to change code that belongs to someone else without necessarily forking the code base first. I have seen that work in a tool called "ESLint Babel" where the developer said that he monkey patched the ESLint code base so that it could understand more BabelJS features.

So the problem really is that we have two sides of the same coin. Or what I like to call Yin&Yang. Although JavaScript and Dart have had about the same inspirations, they are still different enough that they just cannot replace the other without making the environment less rich.

I love it that running deployed Dart code is quick. I tried to use BabelJS for evaluating code as I was coding it and it was taking 600ms to run the code. And that is not even the worst case scenario in JavaScript yet. I guess that is more comparable to us running dart2js code all the time for evaluating it. BabelJS also converts code into ECMAScript 5 compatible code.

In JavaScript and Node.JS they may have a problem with bloated code bases. So even if Dart could "publish" a library that they could use from JavaScript, code bloat would still be an issue for them. It's a difficult issue and they may have alternatives like using TypeScript and Closure Tools to get tree-shaking and get around some of the code bloat.

We need to think that in JavaScript and Node.JS they don't really need Dart.

Cheers,
Joao











On Thu, Mar 26, 2015 at 8:47 AM, Daniel Davidson <phyto...@gmail.com> wrote:
Bob, what advantages would better js/dart integration provide? Honest question, I know not node and am enjoying dart. Is is just to use existing js code not yet written in dart?

On server side what advantages would node provide over or in conjunction with dart?

Daniel Morilha

unread,
Mar 26, 2015, 12:12:31 PM3/26/15
to mi...@dartlang.org

I hope that unlocks opportunity to improve on VM's performance now it is not browser centric. Otherwise it will be hard to justify it and IMHO will make dart as attractive as other compiler to javascript alternatives. Thanks

Alex Tatumizer

unread,
Mar 26, 2015, 12:20:19 PM3/26/15
to mi...@dartlang.org
It very well might be that ES6 restricted in some way (e.g. in the manner of SoundScript) can make javascript, from the  performance perspective, comparable with dart. Then the case for dart in browser becomes really weak. If this is so, putting it in Chrome would not have a lot of technical merit while scandalizing (so called) "community" for no purpose. Dart is beautiful, sure, but for many, it's not an argument at all.

The irony is that all these fierce debates around what should and what should not be in the browser, may become irrelevant rather soon, just because the very concept of browser itself has to compete with native apps, which might be a losing game. E.g. see
http://www.forbes.com/sites/ewanspence/2014/04/02/the-mobile-browser-is-dead-long-live-the-app/

Bob Nystrom

unread,
Mar 26, 2015, 12:42:08 PM3/26/15
to General Dart Discussion
On Thu, Mar 26, 2015 at 4:47 AM, Daniel Davidson <phyto...@gmail.com> wrote:
Bob, what advantages would better js/dart integration provide? Honest question, I know not node and am enjoying dart. Is is just to use existing js code not yet written in dart?

Yes. There are 135 thousand packages on npm. (For comparison, pub is about 1.2% of that.) Also, node exposes more OS-level primitives than dart:io and the Dart VM does. We could try to reinvent every single one of those wheels—and in many cases it's worth doing because I prefer Dart APIs and working with pure Dart code—but it would be great to not have to.

Cheers!

- bob

Don Olmstead

unread,
Mar 26, 2015, 1:19:30 PM3/26/15
to mi...@dartlang.org
Does this mean that the priority for being able to bind native code to the dart vm will become a priority for pub? Currently theres no node gyp equivalent.

Also if this is something that will become important will it be gyp or gn? Seems like Google is deprecating gyp slowly but surely in Chromium.

--

Alex Tatumizer

unread,
Mar 26, 2015, 1:21:16 PM3/26/15
to mi...@dartlang.org
> We could try to reinvent every single one of those wheels—and in many cases it's worth doing because I prefer Dart APIs and working with pure Dart code—but it would be great to not have to.

But what is the role of dart VM then? Just to help compiling dart to javascript? LOL(?)

Rat Jo

unread,
Mar 26, 2015, 1:42:01 PM3/26/15
to mi...@dartlang.org
The purpose will be to run Dart code faster without the need to compile it to js, but at the same time give access to all npm library which as Bob said contain a lot more. If you browse those library, you will see also, more complete and with greater quality library. Dart is still young and having access to very mature library is the way to go. Just take my project I have. I use socket.io. There is no equivalent in Dart. Sure Dart support Websocket and all other protocol, but it doesn't have the socket.io library which have support for multiple transport protocol, binary transfer, ping, auto-reconnect, group, and the list of feature keep on going.

Justin Fagnani

unread,
Mar 26, 2015, 2:00:37 PM3/26/15
to General Dart Discussion
Personally I think there are three great motivations for Dart-on-node:

1) Publishing node modules written in Dart.
2) Interop with existing app code: hybrid apps, migration from JS to Dart, etc.
3) Deployment to environments that have node installed.



--

Kévin Platel

unread,
Mar 26, 2015, 2:08:03 PM3/26/15
to mi...@dartlang.org
And what about a js2dart story to access to  this mature library ? it's just a thought.
 
But to do something like using the socket.io library, the dart team would have to create a dart:io <-> node tools. and when they talk about more compatibility with node, i think that the story will be Dart -> Js. and not the over way, so for people that use Dart on the server and not node.js, we will get no benefit ?

Even if i see the benefit in the long term to get the javascript community and the dart community closer, i can't stop my self thinking that by this annonce, Dart has become a alternative to GWT rather than a real alternative to Javascript, even if i know that is better this way

--

Alex Tatumizer

unread,
Mar 26, 2015, 3:01:37 PM3/26/15
to mi...@dartlang.org
> The purpose will be to run Dart code faster without the need to compile it to js, but at the same time give access to all npm library which as Bob said contain a lot more
Bob really said so, but it has nothing to do with dart VM unless I'm missing something. Quoting Bob:
"I would personally love to have node.js bindings for Dart and be able to mix Dart and JS for server-side apps on node" (emphasis mine -AK).

I might be mistaken, but it looks like Bob wants to run it on Node. Node has no use for dart VM. So where is dart VM in this picture?
We are not talking about js->dart interop. It's interop between program compiled from dart to javascript with native javascript modules, right?

(If I misinterpreted something, I apologize in advance).


Bob Nystrom

unread,
Mar 26, 2015, 3:25:08 PM3/26/15
to General Dart Discussion

On Thu, Mar 26, 2015 at 10:19 AM, Don Olmstead <don.j.o...@gmail.com> wrote:
Does this mean that the priority for being able to bind native code to the dart vm will become a priority for pub?

No, this doesn't affect any priorities or anything. I'm just stating my personal opinion that I think running Dart code on node would be awesome.

- bob

Cogman

unread,
Mar 26, 2015, 3:37:28 PM3/26/15
to mi...@dartlang.org
I'm hoping that this means that (soon) we will be able to use dart in a way that plays nice with the rest of the web build tools.  It would be awesome if we could couple the dart build process into grunt, gulp, webpack, whoever comes tomorrow, like you can today with typescript/coffeescript/etc.

I'm also hoping that work continues on the dart VM, even if it doesn't make it into the browser.  Dart the language is good enough, IMO, that it might someday be a Java/C# contender.

Jim Trainor

unread,
Mar 27, 2015, 6:58:26 AM3/27/15
to mi...@dartlang.org
Is there any way to determine how widely the 135 thousand packages on npm are used?

Same question for Dart's pub repository?

Bob Nystrom

unread,
Mar 27, 2015, 11:50:48 AM3/27/15
to General Dart Discussion
On Fri, Mar 27, 2015 at 3:58 AM, Jim Trainor <jim.train...@gmail.com> wrote:
Is there any way to determine how widely the 135 thousand packages on npm are used?

npm tracks download counts, but I'm not sure how precise and/or useful the data is. Making sense of this stuff is a deep art.
 

Same question for Dart's pub repository?

We'd definitely like to do more here, but we haven't been able to find the time for it yet. Now that the server is being rewritten in Dart, that may open up some more opportunities.

Cheers!

- bob

Alex Tatumizer

unread,
Mar 27, 2015, 12:02:20 PM3/27/15
to mi...@dartlang.org
Opportunity for small exercise: write a script in dart that goes to pub, and for every package found there follows github link and counts the number of stars(or/and watchers). Curious to know how many LOC is needed for this

Jim Simon

unread,
Mar 28, 2015, 1:06:20 PM3/28/15
to mi...@dartlang.org
I actually began work on a "pub stats" website, but never finished it. I did have a basic list of dependents for a given package working. The code is hardly production ready (there's no tests at the moment as it started out as more of a research project), but you can find it here:https://github.com/jimsimon/pub_stats

If you're not using OSX, you'll need to change which mongo distribution it downloads in https://github.com/jimsimon/pub_stats/blob/master/bin/server.dart

I started this out of a desire to get some analytics as to how many libraries were using a library I was interested in (as well as my own).

It should work, but I make no promises. :)
Reply all
Reply to author
Forward
0 new messages