Dart talk in Stuttgart - the Slides


On 22.11.2012 I was guest of the Java Usergroup in Stuttgart. It was a fun evening, with a lot of discussion on Dart. Here are the slides which I used:

What have I learned from that evening?

Not everybody likes JavaScript

First, there are still a lot of people who don’t like JavaScript. OK, I asked Java developers who are not known for their love to JavaScript. But after all, this group contains a lot of people. Some might say, they have not understood JavaScript very well and can’t judge. Well, that might be true. But this is not what counts. People often don’t have the time, the energy or the budget to learn things for which they need to make a complete refactoring of their minds. And this is often the case if you have programmed Java for a long while and suddenly turn to JavaScript. It happened to me back then, I know what I am speaking of.

JavaScript has its benefits - I myself like JavaScript meanwhile (except the quirks of course). I have invested a lot of time to learn about it. Still I am not a master, but I can survive. That’s fine. But it took me a lot of time and sometimes I was near to grief. Lucky me, I have found Stoyan Stefanovs excellent book “JavaScript Design Patterns” which is not only well written but also helped me to really get started.

Dart addresses the heavy learning curve. It seemed to me the audience liked the new flexibility which comes with Dart, compared to Java. And that they could still think in “old patterns” and use for example Classes. And that the syntax was so freaking familiar.

People don’t like experiments so much

Second, people were concerned whether Dartlang is an approach one needs to follow or if is just an experiment among thousand others.

JavaScript is everywhere. Why should one learn about Dart? It is easy to learn but you still need to read some docs and play around with the language - it costs you time.

There is a dart2js compiler, which lets you build your Apps right now. If Dart would become accepted by the masses is unknown to me. But I suspect there will be something “happen” in combination with Android.

Jochen Wiedmann summed up what I think on Android thing:

Had the pleasure to attend an interesting talk, organized by +JUG Stuttgart and given by +Christian Grobmeier on #Dart . Most appealing, in particular, a theory proposed by Christian: In order to resolve the chicken and egg problem that Dart’s not in widespread use, because the Browsers don’t support it natively, and vice versa, (and for a number of other reasons), Google might make Dart a first-class-citizen of Android: In other words, create a bridge between Dart and Dalvik that would allow to write Android Apps in Dart.

Well, that MIGHT be true. But I am not a Googler nor do I have insider information. It just makes… sense.

Using dart2js is not so elegant as running Dart in a native browser VM. With Roadcrew.js I found out that the generated JavaScript would take 200kb space, while writing JavaScript on my own + the jQuery library would only take only 100kb.

But Dart is still young and dart2js will optimize with time. And for just 100kb more (web fetishists will say its unbelievable huge and not acceptable) you get readable, maintainable code with great tooling which even the Java developers in your team can understand.

Dart Talk

At the moment I do not use Dart in production. It is still changing to much. While the base syntax might be “pretty” stable, the libraries are undergoing a refactoring at the time of this writing which last for - i am guessing - 1 year or so. But once Dart is stable, I will surely start using it in production. Let us hope it this date is not so far away.

A nice evening

All speculations. What is real and fact: the evening was nice! The whole usergroup is organized in an excellent way. You would even get some snacks. And the location is wonderful. I simply decided that I will need to visit this beautiful city at daylight. Here is an unsharp photo of it. Sorry, but my Android phone wouldn’t make it better. For sure I will visit Stuttgart again - it is a great community over there.

NOTE: I have been asked if there was only one or two persons attending. That photo has been taken BEFORE the talk :-) In fact, around 40 people were there.

Tags: #Dart #JavaScript #Talk