12 ms·
Angular Announces AngularDart
- nateabele 13y agoSigh... I knew this was going to happen. :-/ This is part of Google's strategy to push Dart in the browser. Soon they're going to start developing Angular primarily in Dart, and 'back-porting' features to JavaScript. Sadly, this is the nature of so-called "Open Source" at Google.
- Oculus 13y agoI imagine they'll give up once they realize all the steam behind AngularJS won't easily transfer over to Dart.
- steeve 13y agoThis. Let's pray this doesn't happen.
- quest88 13y agoLuckily if someone feels Angular starts to become neglected someone can fork it and actively contribute. Also, since dart compiles to JS, it could be no back-porting will be necessary.
- recuter 13y agoFirst of all, this was already announced months ago, so it already happened. Secondly, Google is a big company and some teams within it wanted to use Dart, whereas otheres want to use vanila javascript and Angular, so now you have both. Thirdly, Angular is in the process of being broken apart to modular components for 2.0, it also now cross-pollinates with another Google-y called Web Components. In future, the equivelent of directives (Your own <x-thingy> tags) will be a native web standard, Mozilla is also working on it. This all amounts to a sort of polyfill to the future and most of the core of Angular will be thrown away if things work out. You won't need it. These are all good things. I don't understand your need for FUD.
- nateabele 13y agoYou're able to regurgitate bullet points off a slide deck. Good job. Edit: [source & details redacted] This 'FUD' comes directly from the Angular core team.
- pygy_ 13y agoYou just outed your source. Edit: still too many details.
- lclarkmichalek 13y agoThat his points come from a specific source doesn't actually make him incorrect.
- rdtsc 13y agoYou are able to spread hate and FUD as well. Good job.
- Touche 13y ago> Secondly, Google is a big company and some teams within it wanted to use Dart, whereas otheres want to use vanila javascript and Angular, so now you have both. Specifically who?
- kyrra 13y agoA number of the members of the Chrome team. If you watch the announcement from when Blink hit, they did some developer talks. When asked about the integration of Dart into Chrome, it was fairly obvious that some of the guys didn't want Dart in there [0]. But at the same time, a high-level direction is being set to try and get Dart added. Google employs a LOT of developers. A lot of those developers feel the same way members of HN does, that we don't need a language to replace javascript. Google is using their weight in the web world to try and get a new/alternative language added. As long as Dart isn't completely shoved down our throats, I'm willing to give it a try. I think there is enough opposition within Google to make sure that Dart will at least have to live in peaceful co-existence with Javascript. Google is pretty realistic that it'll be many more years before they can even have a chance of getting other browsers to add the DartVM. Heck, Chrome doesn't have it yet (outside of the Dartium build which has some fun memory leaks). [0] https://www.youtube.com/watch?v=TlJob8K_OwE&t=17m26s https://www.youtube.com/watch?v=TlJob8K_OwE&t=17m26s
- btian 13y agoWell Dart can be compiled to JavaScript. What's not open source about Dart or Angular?
- Bahamut 13y agoIt may be open source, but it makes it more difficult to work with existing js libraries, and shoehorns you into a particular environment that is not standard frontend (html, css, js). Sure, Dart may compile down to js, but that adds another layer to a build process, and increases complexity unnecessarily. As a fairly knowledgeable user of Angular & sometime contributor, this is a disturbing rumor.
- spankalee 13y agoThe dart:js library makes it quite easy to work with existing JS libraries. Most of the teams using Dart at Google are also using some Js in their apps. Dart encourages a very standard frontend: HTML, CSS and JavaScript, so I don't get that point. Dart compiles to JS like Haxe, TypeScript, ClojureScript, CoffeeScript, etc. I'm not sure what "rumor" you're referring to. AngularDart is a thing and it reached beta today. That's not a rumor. AngularJS 1.2 is due out soon, and AngularJS 2.0 will be heavily influenced by the work done on AngularDart to modularize and use more web standards. That's also not a rumor.
- Bahamut 13y agoRead the first comment in this whole chain that you've replied to. That is the rumor that is the subject to much scrutiny.
- spankalee 13y agoI work at Google and on Dart, and I have worked with the Angular team on their Dart port. This is not part of any strategy to push Dart. This port exists because teams at Google want to use both Angular and Dart, and the Angular team decided to make it happen.
- golergka 13y ago> the nature of so-called "Open Source" at Google I don't understand why did you put "Open Source" in quotes there. Did Google take Angular of the internet? Did they not put AngularJS out to the world, open sourced? Did they forbid you from forking Angular, working on it, and create a refuge for all "abandoned" developers?
- rdtsc 13y ago> Sigh... I knew this was going to happen. :-/ Yay... I was hoping this would happen :-) > This is part of Google's strategy to push Dart in the browser. I know, great, right. > Sadly, this is the nature of so-called "Open Source" at Google. I criticize Google often but yeah this is great. Good for Google. It is more than what Oracle or Microsoft or others do. My opinion is this -- JS is a shitty language. It was a shitty language, no matter how many "good parts" books will be published or how many frameworks one builds on top of it -- it is still an ugly language that makes me want to tear my hair out every time I use it. You love it, great. I hate it. I was hoping from day one someone, some company, would find a good replacement. I can tolerate compiling to it and treating it like assembler. It is even better if it gets bypassed altogether. There were other posts here about JS's warts, so I am not the only one who welcome any other sane, normal, language to replace it. Anyway, great work Google, keep releasing new versions of Dart, Dart UI, Dart IDE and so on.
- pcwalton 13y ago> It is even better if it gets bypassed altogether. That won't happen. With the amount of JavaScript on the Web, JS is immortal. All you can do is to add another language alongside it. > There were other posts here about JS's warts, so I am not the only one who welcome any other sane, normal, language to replace it. But it won't be replaced.
- rdtsc 13y agoYou are right it would run alongside it. One thing that would help is a couple of killer websites or applications that would do something much better than the rest. If it used Dart and ran on the latest Chrome, that would help its adoption. It would help Google too because it would increase Chrome install instances running.
- ahoge 13y ago> Sadly, this is the nature of so-called "Open Source" at Google. What's up with those scare quotes? Angular is open source (MIT), not "open source".
- keda 13y agoWhen is AngularJs 1.2 stable release coming out anyway?
- eknkc 13y agoOh got no please no... I use Angular freakin "JS" extensively. At some point, I believe I will come to a position not to touch anything that has even a remote connection to Google. Just a couple of years ago I worshipped Google, now I feel they are always taking my toys away.
- spuz 13y agoFor those of us who don't have the benefit of your experience, could you explain why you think Google is doing something wrong here?
- andyl 13y agoI'm using AngularJS. But this Dart news is a dark cloud. I will never use Dart, or anything that locks me into Google's walled garden. I view Dart as a major negative. Hello Ember.
- spuz 13y ago"I will never use Dart" That's quite a sure statement. Why don't you think Dart will ever be natively adopted by Firefox at some point in the future?
- Helianthus 13y agoBecause that's a pretty laughable idea. There's no reason for browsers to choose Dart over CoffeeScript or TypeScript, and Dart is so far behind CoffeeScript it's not even funny. Google wants to do it, sure, but that doesn't mean they'll succeed, even if they try something as stubborn as running Dart alongside Javascript in Chrome. There simply isn't a path to ubiquity for Dart, and if there were it's not the only language on it.
- davidstalnaker 13y agoIn what way is Dart "so far behind" CoffeeScript?
- Helianthus 13y agodeveloper mindshare. Check tag count for questions on SO; 4500 for CoffeeScript, 1500 for Dart. Not to mention the violent revulsion many people (myself included) are expressing in this topic.
- eco 13y agoThat's not a very good metric. CoffeeScript is twice the age of Dart.
- 13y ago
- guiomie 13y agoAs if the javascript version was so good that it doesn't require anymore work.
- btford 13y agoFalse dichotomy. Work on the the JavaScript version has actually increased. Google grew the team, not split it. https://github.com/angular/angular.js/pulse https://github.com/angular/angular.js/pulse
- jimrhoskins 13y agoI'm so confused by the comments here. Did I miss a line where they say AngularJS is being discontinued for AngularDart?
- dchest 13y agoIt's normal; wait until you see something about Google Reader.
- rdtsc 13y agoThis is the sound of thousands of hipsters realizing they won't be using the latest and greatest toy anymore. There is a shinier newer toy coming around the corner. That is the only explanation I can come up with. Scouring the comments filled with hate and vitriol I couldn't find much substance as to exactly why the are upset. There is no indication Google is going to sue them for patent infringement for using AngularJS, they are not closing the project. It is open source, if they love and think it is great, they are free to fork it and contribute to it.
- Max_Horstmann 13y agoI like both Angular and Dart, so that's good news. One thing I noticed though: transpiling a .dart file with just the import statement for AngularDart (import 'package:angular/angular.dart') generates a non-minified 5MB .js file with almost 150 kloc. Every code change will create a new version of it, invalidating previously cached versions. :/
- floitsch 13y agoAre you sure you are using the latest version? Angular was an early user of mirrors (reflection) which (more or less) disabled the tree-shaking of dart2js. This was recently improved. Tracking the size of AngularDart: https://github.com/jbdeboer/angular-dart-js-size https://github.com/jbdeboer/angular-dart-js-size
- Max_Horstmann 13y agoMaybe I'm missing something, but yes, I think so. Dart version 0.8.10.3_r29803. pubspec.yaml: name: test1 dependencies: browser: any angular: git: https://github.com/angular/angular.dart.git https://github.com/angular/angular.dart.git test1.dart: import 'package:angular/angular.dart'; main() => ngBootstrap(); dart2js launch => builds test1.dart.js, about 5MB, 142,749 loc.
- jbdeboer 13y agoYes. You need to add a @MirrorsUsed annotation in your main.dart file. See https://github.com/jbdeboer/angular-dart-js-size/blob/master/main.dart https://github.com/jbdeboer/angular-dart-js-size/blob/master... for our current best practices. You should get ~173KB gzipped, minified dart2js output.
- Max_Horstmann 13y agoBeautiful. Thanks!
- lennel 13y ago
- mjibson 13y agoI'm excited for this. I have a fair sized angularjs app that is getting unwieldy, and having a compiler that yells at me about type problems sounds great. Even if dart doesn't get supported by non-Chrome browsers, I think it could still provide lots of value to developers: it has the same useful type checking as typescript, with some other needed features. It is possible that the transpilation to JS will cause problems, but overall I think it'll be a better dev experience producing better software.
- srin 13y agoYeah I started making a chrome app for my own use and it's starting to get to a point where if I don't work on it for a while, I spend a bit too much time making sure I'm not creating bugs interacting with old code Also, Chrome apps seem to be a great use for this even if no other browsers embed a dart VM (if it gets to that). I'm just not seeing why this is so bad
- WoodenChair 13y agoIf you don't like Dart, don't use it. Nobody is taking away your AngularJS. Google has a right to promote whatever language it thinks will give it a competitive advantage. You have a right to be revolted by it. However, the hyperbole surrounding anything that even remotely, several years down the line, may threaten the monopoly of JavaScript on the client side web is ridiculous. Language competition is good - it ultimately will make for a better JavaScript. Personally, I think there are a lot of people deeply invested in Javascript who fear anything that even remotely, one day in the super future, may threaten their skill set. That's understandable - it's the same way MS developers scoffed at learning Objective-C when the iOS ecosystem blew up and the Windows monopoly didn't matter as much. Let's inject some reality - Dart is no threat to JavaScript for the foreseeable future. AngularJS is not going anywhere. Dart can't be forced down your throat, because no consumer browser even supports it natively yet. You don't need to use it, you don't even need to think about it. Let the people that like it be.
- Helianthus 13y agoJust because it can't be forced down our throat doesn't mean it's not uncomfortable that Google's trying.
- WoodenChair 13y agoLike I said, "You have a right to be revolted by it." But, I think it would probably be a better use of your time to be uncomfortable over things like hunger and disease than a company trying to promote a new programming language to further its self interest - that's what companies do.
- Helianthus 13y agoYou have a right to be revolted by peoples' revulsion, which you are presently executing quite well. I don't have a problem with that, I just think you're loudly complaining about how loud everyone is. ;)
- 13y ago
- cpprototypes 13y agoWhen I look at Dart vs JS (JavaScript), I see a lot of parallels to Java/C#. The Java language stagnated for a long time under Sun. The language was usable only through the heroic efforts of tool vendors (Eclipse, IntelliJ, etc.) Even with these tools, Java is just barely good enough. C# is technically a superior language to Java. Combined with an excellent IDE (VS), the .NET platform is probably technically superior to the Java platform. However, .NET did not destroy Java. And it's because Java is superior to .NET in many non-technical areas (such as a better open source community). And other solutions appeared to help the Java platform with the language stagnation issue (Scala, Clojure, Groovy, etc.). Now Java itself is somewhat catching up (Java 8) and the JVM platform remains a powerful and thriving community. The situation with Dart and JS seems to be similar. The JS language has stagnated for a long time. Google is trying to be like MS with C# and created Dart to fully replace JS. And Dart is probably technically superior to JS. But just like Java vs C#, I don't think technical superiority will be enough. The JS platform is addressing the language issue with CoffeeScript, TypeScript, and others, just like Scala and Clojure appeared for the JVM. And JS itself is improving slowly (ECMAScript 6) just like Java 8. And the JS open source community is very very strong (all the web related libraries and frameworks and now additional strength from Node.JS) and it's unlikely Dart will have a comparable community. I think that Dart may achieve some success like .NET/C# did. However, I don't think it will destroy JS like Google hopes it will. The JS platform is just like the JVM platform. Has so many flaws, but is good enough.
- LiweiZ 13y agoIf Google is able to get browsers provide the UX capability same as or even better than Androd/iOS does, things will be different. I'm a layman of web development. But I think this is something worth noticing. The current UX capability in browsers is definitely not a strong point compared with native apps. Google's strategy seems to take territories of internet through browsers. In the mid/long term, making the gap between web app and native app smaller or close to zero in different aspects(such as UX, product development) will probably be one of its high level focuses.
- sek 13y agoNot a good comparison. Java and C# are both well designed server side languages. C# has the simple advantage of being younger and learn from Java in the real world. JavaScript in the real world is not even close to Dart. JavaScript is currently trying to solve problems Java never had to begin with. In almost every category Dart is technically superior. Shouldn't be a surprise, they took their time and learned from more than a decade of dealing with JavaScript. They are also not done yet, they are planning to inject binary code directly into memory. Just look at Lars Bak's history, he is the right guy to create the Java/JavaScript successor for the web.
- bovermyer 13y agoI like Dart. It's fun to write. I don't understand all the vitriol directed towards it.
- edtechdev 13y agoI don't either, although while I think dart is an improvement over javascript, it also is basically just like java. I'd prefer a runtime that multiple languages could easily compile to, but until then there are several languages that can compile to javascript, treating it like a runtime (including dart itself): https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS https://github.com/jashkenas/coffee-script/wiki/List-of-lang...
- cletus 13y agoI'm really starting to get tired of the cynical and snarky negativity on HN. Whoever thinks this is part of some grand plan to force Dart down our throats clearly has no clue whatsoever about how Google works. Standard disclaimer: I'm a Google engineer and these opinions are my own and don't reflect those of my employer. Google is a really large company with >10,000 engineers. A lot of what we do starts as grassroots efforts. Honestly, getting 10,000 engineers to act in a coordinated fashion is probably like trying to herd 10,000 cats. AngularJS started as a side project that became Google-sponsored and it grew organically. Being Google-sponsored simply means some team somewhere has dedicated some engineers to working on it. That's it. Likewise a group of engineers separately started Dart due to dissatisfaction with JavaScript being the lingua franca of the Web. The idea was that Dart can be implemented as a VM within a browser and get faster performance that way. Likewise, it should compile to JavaScript for browsers that don't support Dart in the browser (which is all of them except Chrome). Also, Dart shares a lot of the philosophies of GWT in sharing code between client and server. Now my personal view is that I honestly don't see the point of Dart. I mean no disrespect to the team or their efforts but I don't agree with the premise or the design philosophy of Dart. Optional typing seems to me to combine the worst of both worlds. If typing is useful (as the static typers will argue) then be statically typed. If it's not be dynamically typed. Dart's type system is basically just the Closure JsDoc system used by the Closure compiler. That's it. To me, there's no real innovation there. Dart is really just another Coffeescript and I don't see the point of Coffeescript either. One of the benefits of development in JavaScript is you can simply refresh your browser and it just works. I'm a huge fan of this fast iteration cycle in development. It's the same reason I'm a fan of Python, Ruby and even PHP. Additionally, as soon as you add a translation step from something to JavaScript, you introduce potential bugs in that translation (eg I've seen bugs with the Closure compiler incorrectly removed code it thought was dead and that was JS to JS let alone the issues with, say, GWT's Java to JS). Even if there aren't bugs, tracing issues back to the source becomes more difficult. Rob Pike through Go seems to believe this too (not that I claim to speak for him) because he's repeatedly mentioned that the simple syntax of Go and fast compilation is a deliberate feature, a philosophy I agree with 100%. It's also one reason I detest C++: slow compilation kills productivity (IMHO). So AngularDart is nothing more than another group of engineers (perhaps there's a crossover with the Dart folks) wants a modern Web framework for client-side Dart so they created one. The idea that this is part of some grand strategy is quite frankly ludicrous. Google puts their effort behind a lot of experimental projects. Some work out, many don't. Will Dart succeed? I don't presume to know. But while I don't agree with the premise/philosophy it makes me happy that the company I work for is still prepared to experiment with such efforts and devote resources to them. If you work at Google you'll often see three teams working on roughly the same thing, typically without knowing about the existence of the others. They may consolidate or compete (if they have incompatible philosophies that the teams feel strongly about) or something in between. This happens because so many efforts just start out as a single engineer or a small group of engineers just trying something out or they want to solve a problem they see (and in an organization this large it's rare you're the only one who sees a particular problem and wants to do something about it). So, please, can we discuss this on its merits rather than the new norm of seeing vast conspiracies or simply seeing things as some collusion with the NSA. It's really tiresome. EDIT: added a paragraph about the issues of bugs and translating something to javaScript.
- deleted 13y ago[deleted]
- azio_m 13y ago"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction." ~ Albert Einstein
- wnevets 13y agoHow is this anything but a good thing for AngularJS?
- TheMagicHorsey 13y agoDon't know much about Dart. Is there a way for Dart code to call/use Javascript libraries? Like could I use D3 in Dart?
- _ak 13y agoThere's a library to call JavaScript code from Dart, both in the VM and when the Dart code is compiled to JS: https://www.dartlang.org/articles/js-dart-interop/ https://www.dartlang.org/articles/js-dart-interop/
- spankalee 13y agoYep, we use d3.js on Dart projects internally. Check out the dart:js library, which is pretty new, and the article that _ak linked (which needs some updating). http://api.dartlang.org/docs/releases/latest/dart_js.html http://api.dartlang.org/docs/releases/latest/dart_js.html
- camus2 13y agoGood for Dart users. And competition is healthy. Javascript needs some challenge, just like Flash forced HTML to evolve. So this is a good thing. Congratulations. And devs should know this, nothing is set in stone on the web.
- nicklovescode 13y agoIf someone creates egghead.io for Dart, I will pay for it.