Trying Google Web Toolkit again – and liking it

Development, JavaScript January 11th, 2010 @ 11:01

A while back, I tried out Google Web Toolkit to see if it was any interesting. My main concerns after that early glance was the stability of the applications and the possibilities to mix GWT code with plain JavaScript code.

Giving it another stab

I decided to give it another go last week, when re-building the mixtape interface for my side project Spotiseek. A few things led me to creating an “Ajax” application with GWT:

  • quite a few requests are required to present the view – I needed the requests to be cached in the client to reduce the server load
  • I needed an application built on stable and easily maintainable code
  • I figured it would be a good chance to learn more about GWT
Spotiseek Mixtape based on Coldplay

Spotiseek Mixtape interface

Drawing some conclusions

After completing the first release of the new interface, I feel confident enough to draw a few conclusions:

Positive: It’s Java!

When looking to write stable and easily maintained code, I really can’t find any better candidate than Java. Since I’ve been working with Java for a number of years, I’m of course very comfortable with developing GWT apps.
The syntax is nice and clean and of course the magic of the fantastic IntellJ IDEA is indispensible.

Positive: It does what I want it do do

It might appear a ridiculuous header, but I have to say it’s very easy to create widgets that does exactly what you want. There’s little confusion on how to actually construct the application.

Negative: Problematic project setup in the IDE

Even though IntelliJ is a fantastic IDE, there’s appearantly some improvements that could be made to the setting up of GWT projects.

Just setting up a GWT project is not a huge matter, but trying to add a GWT project module to an existing web project was a lot of hassle. There was a lot of problems getting the built-in build/make process to put the files in the right place etc.

Negative: Surprisingly poor community support

I honestly thought that the usage of GWT would be more widely spread across the internet. But when I – from time to time – got stuck with an issue, there wasn’t really that much help from Googling.

There are of course a few good forums and such where many questions are answered, but unfortunately not the answers I was looking for. I had to dig deeper in the Google documents in  order to get enough info to draw my own conclusions.

EDIT: One nice resource I’ve found is Matt Raible’s blog.

Maybe it’s not inadequate for most issues, but I had expected more…

(Sort of) Negative : Building everything from scratch

Usually, you try to mix as much HTML and JavaScript as possible in order to write code more efficiently. Building it all up from scratch is often a quite expensive process and rarely gives you the most maintainable code.

But with GWT I didn’t really see any way of not building everything from scratch. Partly because it’s very easy to do so, but also because I didn’t find any good way of reusing existing HTML components.

I’m not sure it’s a true negative having to build everything from scratch, but it requires a somewhat different approach than you might be used to.

To sum it up…

Even though there was a few problems during the development, I’m glad I chose to develop the application in GWT. It’s resulted in a nice (enough) application, built on code that is stable and easy to maintain.

Also, I’ve learned a lot about GWT development and will have no problems going forward with the development.

(Apart from the conclusions I’ve drawn, there’s of course a bunch of positives that comes with developing GWT applications. )

Maybe not suitable for all products

As I’ve stated before, I still feel that you should always consider if GWT is the best approach for your particular application.
I guess a certain amount of complexity is required, as it’s probably more tedious to write GWT Java code than regular JavaScript. If you’re going to develop a small-sized application, you’re probably best of doing it the old fashion way.

SEO issues with JavaScript applications

Of course, there are some issues with building your applications in JavaScript. One of them being the drawback in Search Engine Optimization (SEO), as your content is hidden from the indexing robots.
I know Google have proposed a new standard for specifying JavaScript content, in order to make the robots understand how to activate the content. But we’ll see what happens there…

The one essential Agile ingredient

Other November 8th, 2009 @ 13:11

I just read a great article, summarized over at InfoQ, about Agile development.

I think Mark W Schumann is spot-on with his formulations on what you have to understand and accept in order to be successful with agile development.

Pairing is important, but it’s more important that you’re happy to be corrected a couple dozen times a day. Test-driven development is useful, but it’s more useful to imagine a hundred ways something can go wrong. Stand-up meetings can be effective, but the trust in your colleagues that frees you to do your own thing makes them really effective.

It’s all about being humble and accepting the fact that you just don’t know everything at the start of a project, a task or whatever.

… there has to be an attitude in middle-to-senior management that they don’t know everything, that some things aren’t amenable to control, that surprise is something that should be expected. You have to trust your teams, even when they don’t deliver the results you expect. You have to imagine more than one possible outcome.

Really recommend reading the post, no matter if you’re a developer or a manager.

Presentation: How to go from Flash to Flex development and why

Flash & Flex October 16th, 2009 @ 15:10

I’ve conducted a small study recently, trying to figure out if we could evolve in our Flash RIA development somehow. I’ve read and experimented a lot with Flex, MXML and related tools to see if we’re missing something (we’re not using it very much today).

It’s not that we’re unhappy with how things are done now, but with the new Flex 4 and everything associated to it, I’ve felt that there’s an opportunity to make some improvements to our workflow.

Summing it up

As presented below, there are a few conclusions to be drawn here, for example:

  • Flex 4 seems to be a really nice upgrade and probably something you can’t ignore in the end.
  • There’s little information on the web about development of large Flash/RIA applications (like those we do). Pretty much all focus is on Flex development of small-to-medium sized applications. I’m not to speculate on the reasons why no one is spreading the word, but hope that my work can shed some light on the area.
  • There’s a lot of fuzz around the Adobe products in general and Flex in particular. Very few seem to have any criticism at all when it comes to Flex, which is a bit disturbing, as nothing that looks too good to be true ever is. But maybe I’ve just been looking at the wrong side of the web? Just a reflection…

Presentation of findings

I held an in-house presentation on my findings yesterday, and I thought I’d better share it with the world (= your favourite search engine). I’ve stripped it down a bit, as there were some company specific things in there, but most of it is free for everyone to read.

A few things to consider before jumping in, though:

  • This is a PowerPoint (well, OpenOffice actually) slide with notes. There was lots said when presenting each slide, so I can’t guarantee that you’ll learn everything I said. I understand this is not perfect, but figured that it’s better to upload this than nothing.
  • It’s just plain slides with notes, really. I did have some imagery in the original slides, but left it out as it’s probably only needed as “distraction” when viewed on a large screen with me talking next to it. So don’t get mad if it’s boring!
  • The plan wasn’t actually to hold an in-house presentation, but I figured it was a good idea. So the format on which it is presented may or may not be optimal, as it’s pretty much been summarized as I’ve went along. It could be a good idea to shape it up and make it a bit better, but at the moment, it’s more important just getting it “out there”.

The presentation itself

With that having been said – and my back having been covered ;-) – here it is (also available as a PDF):

Download (PDF, 134.18KB)

EDIT: Also added the presentation to SlideShare.

Interesting tool for comparing browser versions

Browser Compatibility September 24th, 2009 @ 14:09

I stumbled upon Expression SuperPreview, a really neat tool for comparing different versions of web pages.

It basically lets you enter the URL (local or public) of  a web page, and allow you to compare images of different browser versions. Compard to other tools, like BrowserShots, it’s got the handy addition to also inspect and compare DOM elements in the views.

Slim & Free or Fat & Premium

There’s a free, slimmed version available for Internet Explorer (6+) comparisons and a “premium” version included in Expression Web, where you can compare with Firefox and other browsers you may have installed. The premium version is available as a 60-day trial, and the licence is priced at $149 USD, which could prove to be money well spent.

I usually test my apps in IETester and on a virtual machine, but I’ve downloaded the 60-day trial of SuperPreview and will give it a go.

Flash catalyst beta out

Flash & Flex June 1st, 2009 @ 14:06

I read today on InsideRIA that the first beta of Flash Catalyst is available for download on Adobe Labs!

I’ve been both sceptical and excited about Catalyst in previous posts, so it’ll be very interesting to try it out for real! :-)
I’ll probably post my initial thoughts on it sometime soon.

EDIT: The Beta 1 of the new Flash Builder (aka Gumbo) is also out. Ryan Stewart posted another blog about the two releases.

Why and how to use MXML?

Flash & Flex April 23rd, 2009 @ 16:04

I’m yet to fully understand the “awesomeness” of using MXML in your Flash/Flex applications. I’ve always written my code in AS (1,2,3) and set up the views by combining AS code with laying them out in the Flash authoring environment. And I have to say that’s worked out well!

But MXML is said to improve productivity as be “easier to write” and that is a matterI’ve been delving into quite a lot over the past months. (Unfortunately “easier to write” usually comes with a bunch of unneccesary, over-the-top functionality…).

What do others say?

Recently I’ve been trying to figure out how to use MXML together with AS code. I’ve scanned the web for articles, and have found a few interesting. This one, by Dan Orlando, seemed to be on the same track as myself. Also, I’ve previously come across this one, discussing a few pros and cons of MXML.

I don’t know the answer… yet.

I haven’t really come to any conclusion yet, but I’m hoping to do so shortly. I’m sure there’s benefits from using MXML – i.e. to lay out your views – but it’ll be interesting to see how to best combine it with “regular” AS code…

This was a post in the midst of something, but more is to come on the topic, for sure!

EDIT: I’ve posted a presentation about Flex (and MXML).