November 3, 2012

Dart - the king of speed

The web as a platform is moving at an incredible pace right now. The modern web browsers are getting better in supporting the new HTML5 standards. Javascript runs 100 times faster now compared to 2007, according to Lars Bak the designer behind V8. Rich web applications are now developed as a single-page with most of the logic on the client. The gap between web applications and traditional native desktop application is getting smaller.

Chrome V8 performance from Google IO 2012 
I have a long experience in writing large-scale applications in Java using modular and object-oriented concepts on the Eclipse Rich-Client Platform. I have used the Eclipse Modeling Framework (EMF) to generate editors from domain models, and the Graphical Editing Framework (GEF) for adding graphical editing capabilities. I am spoiled with having lots of support from the platform.

Implementing similar applications on the web platform with Javascript seems like travelling back ten years in time. There are several popular frameworks that fix some of the really bad parts of Javascript and also add support for classes and components. But, you still have to write lots of boilerplate code to support things I am used to getting from the platform.

I am quite novice when it comes to web programming, but I do have some experience with the Google Web Toolkit (GWT). It has support for both EMF and GEF, and seems like a path for writing very rich and capable web applications. The drawback with GWT is that you are stuck with Java, which is lacking many of the more modern language features such as first-class support for functions. Also, there is a compile step to Javascript which makes edit-and-continue debugging hard to achieve.

Using GWT feels like driving an old reliable Volvo. It is safe and you don't have to worry crashing . But suddenly a new fresh-looking sports-car is passing you on the street. It is looking better, has nicer features and seems faster, but maybe not as crash-safe as a Volvo yet... In this analogy the faster car is the new Dart language that Google has been working hard on for more than a year. Dart is designed from ground up to support writing large, structured and performant web applications. The Dart VM engine it is already outperforming V8 in several key benchmarks. The goal according to Lars Bak's talk at Strange Loop is to make it at least twice as fast as V8. Maybe "V16" would be an appropriate name...

I think Dart may be the platform of choice for many developers with my background. Dart is not just a new language. It has great tooling with an Eclipse-based editor, new frameworks and a package manager "pub". The VM will initially only be available in Chrome, but Dart code can be compiled to Javascript, thus supporting all modern browsers.

Lars Bak said "speed is king!". If he can deliver that, I believe Dart has a big chance of being more than just a niche language.

April 2, 2012

EclipseCon 2012

EclipseCon2012 Cover

This year's EclipseCon was especially exciting because my colleague Fredrik and I had a talk accepted and was one of a few highlighted sessions.

Our talk was about sharing our experiences of migrating one of FindOut's tools to the new Rich Client Platform "RCP 2.0" in Eclipse 4.2:



Here are the highlights from the conference:

Monday:

The conference started out with an excellent tutorial on writing rich client applications with Eclipse RCP 4.x by Kai Toedter. He also showed that the default SWT rendering engine in the platform can be replaced with Swing. He used the Napkin theme for his contacts demo. Very impressive!


Tuesday:

Tom Schindl explained the new application platform and showed how to easily pool resources and a locale support service that he connected to google translate. The audience was asked for a language to translate to, and without restarting the application "Hello World" was switched to "Hallo Verden" (Norwegian). Impressive!

Brian de Alwis showed how to style your 4.x application with CSS. He also demoed the nifty CSS Spy and editors. For us who had little knowledge of CSS this tool came in real handy.

Alexander Nyßen gave a comprehensive overview and history of GEF. He also explained GEF4 and the main priorities to introduce there. We were especially glad that one of the bullets was to migrate GEF to use the new 4.x application platform.

Wednesday:

e4 compatibility layer sketch
Figuring out the compat layer
Tom Schindl talked about e(fx)clipse which is a distribution of Eclipse for creating JavaFX applications. He also showed that the default SWT rendering engine in can be replaced with JavaFX.

After lunch it was time for us to present.  We were happy to see that we had about 60-70 attendees in the room. The presentation and demo went very well and we had a very good discussion with the audience during the Q/A.
Eclipse 4 BOF signup
In the evening we attended the e4 BOF which was well attended with all the key people from development and a number of users. One interesting topic was how the solve the problem of having multiple dependency injection frameworks. One example is that Xtext uses Guice. It was also noted that 4.2 is lacking a documented API, something that will be addressed in 4.3. Many of the common UI components such as the Properties view, the Project Explorer and the Preference dialog need to be migrated to the new platform services.




Thursday:

Eclipse 4 meets CDO - inspiring demo of what you can do with the modeled application. Since the application model is implemented using EMF, CDO can be used to share it between multiple users. Think instant content sharing and collaboration using the application model.

Wrap-up session
In the closing session it was revealed that the conference had 650 attendees with 360 of them first-timers. 36 countries and 41 US states were represented. There were 2972 complaints on the WiFi according to Mike Milinkovic. All of this was washed down with almost 7000 beers.

One valuable thing for us was meeting and mingling with everyone including other swedes from companies such as Ericsson, Sandvik, IAR and Oracle...

It was also great to meet the e4 team face to face. We would especially like to thank Remy Suen for fixing a bug that we ran into when migrating our application.

Finally, a special thanks to the Eclipse Foundation for yet another great Eclipse conference!

References