A quick look at CoffeeScript, TypeScript, and Dart
As more developers focus on working on the front end, more tools are created to assist the developers. We now have some great tools and IDEs to help us with our development of JavaScript. The language itself can be hard to grasp and leads to many errors and bugs in your code. New languages for the web have been emerging to help tackle the issues that people are having with building scalable JavaScript applications.
Dart with a side of Popcorn.js
Update: Popcorn.js is no longer maintained I have removed by Mozilla
So personally, I’m not interested in using Dart for building web applications, I’m more interested in the Dart VM but after watching Vijay Menon’s video on JavaScript Interop. I was interested to see how well Dart would work with a JavaScript library that I have been working with for a bit now, Popcorn.js.
Popcorn.js is a JavaScript library that is used for working with media, it will allow you to embed video and setup time-based interactions.
MD5 hashing in Dart
Here is some Dart code for doing MD5, though at this point in time, MD5 is becoming obsolete in favor of SHA1. But as I have done code for MD5 in other languages I figured I would duplicate the code for another comparison. To look at the languages, checkout MD5 hashing in Python, Ruby and Groovy and MD5 hashing in CoffeeScript, Perl and Scala.
I do like how you can use Method Cascades, this is something that I really wish Java had in it because the code is much cleaner in my opinion.
Using Dart with Blizzard’s Battle.net API
As with a lot of postings on this blog, when I look into learning a new language I copy something I have done before. I have decided to use the Battle.net API to pull World of Warcraft data. It’s an easy subject to reason about and show off parts of the language’s syntax.
Also, as I have the same code in Ruby, Groovy, and CoffeeScript it’s a nice comparison. You can find the other code as part of the Updated World of Warcraft Armory code posting.
Why Dart Will Not Make It…
Yes, the title is a bit of a troll. I like Dart, I think it’s a great new language made for the web! But, I do have some issues with the focus they have.
So one day a group of developers got together and declared that JavaScript is hard. It’s hard to write good JavaScript code, it’s hard to optimize it, and it’s easy to write crappy code. I do not disagree with this but I feel you can write crappy code in any language, trust me I’ve seen it done.