December 4, 2013

Dart workshop with code lab

Today I hosted a three-hour workshop/code lab with my colleagues at FindOut. I started off with a Dart Quiz as a way to see how much they knew about Dart and to get some good discussions started.

Then I showed them some of the slides from the Google I/O '13 presentation by +Justin Fagnani and +Seth Ladd, especially pointing out the improvements in syntax and standard libraries compared to JavaScript.


After that they went through the Pirate badge code lab which is so well documented that I hardly had to assist at all.

Finally, I talked about some cool things built with Dart:
The workshop was very well received and the feedback was that it was really easy to get started with web development using Dart.

June 24, 2013

Vert.x, Node.js and some reflections on performance

Four years ago Node.js was invented. It's a server-side framework with an asynchronous, event-driven programming model with non-blocking I/O using Javascript. It has become very popular in the web community since you can use Javascript and the same async programming model both on the client and server. Node.js is using the V8 Javascript VM, which has had an incredible performance since its' start (see my earlier post).

Vert.x is an alternative to Node.js that runs on the JVM. It supports the same programming model but for any JVM language (the "x" is for any language). Currently it supports Java, Groovy, Ruby, Python and Javascript, with Scala and Clojure on the roadmap. Earlier this year the Vert.x community chose the Eclipse Foundation to be its vendor-neutral home. The Eclipse Foundation changed policies so that the project could continue being hosted on GitHub, which was not possible before Vert.x came along.


Regarding the performance of Vert.x compared to Node.js, it has been shown to be faster in some benchmarks here and here.

Benchmark result from "Inside Vert.x. Comparison with Node.js"

Given that the JVM is 18 years old compared to V8's five years, it may not be so surprising. More interesting is that the original V8 designers in their Google I/O 2013 talk show that getting predictable performance for a highly dynamic language like Javascript is problematic. That's the reason why they are now working on the Dart language and VM which is already twice as fast as Javascript in some benchmarks

February 10, 2013

Jfokus 2013



Here are some of my impressions from the Jfokus conference here in Stockholm. The venue and content was better than I expected, and it was interesting to hear talks and spot trends around the Java platform. The scope was even broader than Java and the JVM, which was nice because I wanted to focus more on the web platform.

The functional programming trend is still strong and will probably be mainstream when lambda expressions comes with Java 8 this autumn. Here in Sweden Scala seems to be really popular with several talks on that subject. However, I believe pure functional programming still will be a special field since monads are too hard to understand for the average programmer.

For me the high point during the conference was seeing +Seth Ladd presenting web components and the Dart language. It was a really compelling story to see how you can create reusable web components already today. I really hope innovation prevails and that Dart will become a sane alternative to Javascript.

In the closing session, +Dan North gave a fun and thought-worthy presentation where he sought simplicity and questioned complicated architectures and frameworks. There were many takeaways, such as that I have to buy a bath duck to put next to my computer .What he didn't say is that we need to find abstractions to cope with complexity and using encapsulation is key to achieve that. Dan said he felt liberated using Javascript with Node.js because he could focus on real problems... For me it is just the other way around, I feel I have to write lots of boilerplate code on the web platform compared to when writing desktop applications on the Eclipse platform with lots of reusable components.

Until Dart and web components takes off I think I found a real interesting alternative. Our fellow Scandinavians celebrated the Vaadin 7.0 release on the way to the conference and after listening to a few talks and playing around with it, it seems to be a really productive environment. They have their own component library with over 300 reusable components to choose from, such as nice looking charts. An interesting possibility is that you can even use Scala with Vaadin. But why on earth should you be using Vaadin? Their CEO +Joonas Lehtinen explained that the reason is that you should be able to write professional looking web applications for the business with a low budget. I think that is a really good reason.