Stephen Smith's Blog

Musings on Machine Learning…

Moving to GWT 2.1

with 5 comments

One of the good things about moving to Web development is how fast things change. When we developed using Visual Studio for Microsoft Windows, there would be a new version every three or four years and things didn’t change that much. At least until .Net came along, then there was one very big change and then things resumed at their usual pace. With the Web world and using the Google Web Toolkit (GWT), there is a new release every three months or so and many of these releases involve fairly major changes. Fortunately we had adopted the Agile Software Development Methodology at the beginning of Accpac 6.0. This gave us a mechanism to live with-in the fast changing world of the Web.

At some point during Accpac 6.0 development we froze taking new versions of GWT. This was part of stabilizing our product, so we could finish all the features and produce a solid release. The version we froze on was GWT 1.7. Part of this was that the next release was 2.0 and we felt absorbing those changes could jeopardize our release date. Now that we are onto Accpac 6.1 development we have moved up to the current version of GWT which is 2.1 and are excitedly awaiting the release of 2.2. We will try to stay current with the newest version of GWT for as long as possible through the Accpac 6.1 Agile development.

This blog posting will talk about some of the new features that we have picked up moving to GWT 2.1. Some of these provide better product functionality and performance. Some of these provide better developer productivity.

New Event Model

The big change for us going to GWT 2 was a change in the event model. Up until 1.7, you added a listener to receive any event. Basically you just registered the object you wanted called when the event happened. This model has been replaced by a handler model. There are quite a few technical reasons that make this a better approach, but for us we gain two main benefits. One is that it sends all the events through a central queue and makes the order that things happen much more predictable. This greatly simplifies things for us and allows us to simplify our code and not worry about so many cases when focus is lots and such. The second thing is that it vastly improves keyboard handling. The keyboard handling is a major concern for the productivity of heads down ERP document entry clerks. With this change, the keyboard handling becomes much better, especially making it uniform across all browsers.

New Table Control

Another big change is to the Table control. Google has re-written the built-in table control from scratch and called it the CellTable. The table control is now much lighter weight and provides better functionality and performance. ERP packages rely heavily on their table control for fast efficient data entry. Google is a pioneer in getting the most power out of Web Browsers. With the new table control they have raised the bar over all competing libraries. For Accpac it is nice to get this extra functionality at very little cost from the core GWT library. The CellTable is part of Google’s new Data Presentation Widgets which introduce a very efficient virtual scrolling scheme that we are taking advantage of. Virtual scrolling is the ability to load just a small window of the total records available into the Browser, but then load additional records as needed as you scroll around.

Client Bundles

GWT 1.x had the concept of an image bundle. Here you combined a bunch of small image files into a single large image file. This improved performance by only having to download one file (or check if one cached file has been updated) rather than a whole bunch of small files. Generally reducing the number of round trips to the server. Modern Web Sites are generally composed of many small graphics that provide visual richness with aspects like rounded corners or special shading that HTML doesn’t provide by default. We use this in the current product to help the initial Portal page load quicker. GWT 2 then extends this concept, with client bundles, to let you bundle together other common resources such as XML files, CSS files and more image files (a few specific ones couldn’t be bundled). This then improves our performance further by removing these files from needing to be downloaded separately.

Deferred Binding

GWT 2 introduced a feature called Deferred Binding, this allows us to build several Accpac screens together as one GWT object. The advantage of this is that it improves caching. You only run what you need for a screen, but then the Browser can cache all the shared bits, so running one screen, will help speed up the running of the next screen. This also saves some disk space (not that this is so important these days). A bigger advantage of this is that is speeds up our compile or build time, since it takes about the same time to build 10 bundled screens as 1 separate screen, so we can get a 10x improvement in build times. This greatly helps us with our continuous build/integration environment to be quickly checking things as we check in new code.

Eclipse Plug-in

With GWT 2, Google has greatly improved their Eclipse integration. There is now a Google plug-in for Eclipse that adds direct access to a number of tools and wizards. This is nice for developers to have quicker access to a number of things.

In Browser Debugging

With GWT 1, you had to debug using Google’s built in hosted mode debugger. This caused some differences between debugging and running in a real Browser. With GWT 2, you now debug directly in the Browser. Debugging is controlled by a browser plug-in which are available for IE, Firefox, Safari and Chrome. This is nice because now you can check out how style sheet changes work in different Browsers while you debug.

Below is a screen shot of an Accpac screen running in the Chrome Browser stopped at a breakpoint in Eclipse:

At this point we can examine variables, single step through code and do any normal debugging activities. Then we can resume execution:

Better Code Generation

As Google develops GWT, with each version they make the code more efficient, so we get some benefit just by re-compiling with GWT. Plus as Browsers evolve GWT can take advantage of newer features to reduce code size and enhance performance. Especially as various parts of HTML5 start appearing in various Browsers, our programs automatically will use these features where it makes sense. The evolution of the Browser is accelerating again, IE 9 should be released soon, Firefox is planning three releases this year and Chrome is speeding along as usual.


By using the Google Web Toolkit, Sage ERP Accpac is able to gain many advantages from version to version just as a result of using this toolkit. Combine this with the applications features our programmers are adding and we’ll see the speed of Accpac development really accelerate.



Written by smist08

February 12, 2011 at 4:44 pm

Posted in sage 300, Software Architecture

Tagged with ,

5 Responses

Subscribe to comments with RSS.

  1. Good News. Looks like the decision to use Google tools is turning out just like you hoped.

    Free Polazzo

    February 13, 2011 at 1:44 am

  2. […] This post was mentioned on Twitter by Aggyey Mishra, smist08. smist08 said: Blogged on Accpac 6.1 moving to GWT 2.1 – […]

  3. Suddenly a product release cycle taking cadence from VS 2005, 2008, 2010 feels quaint, if not absurd.

    I think the “Culture of Apps” has driven a different product cadence, yet many Apps have no serious capability, beyond convenience. If it’s possible to architect a deeply sophisticated application and release independently as Apps working together around Restful interfaces, that pattern is simpler and unbeatable.

    clive boulton

    July 1, 2011 at 7:53 pm

  4. […] Last weekend I travelled down to Seattle, Washington for a nice getaway weekend and to see the Science Fiction exhibits at the EMP.  Then on Monday night I gave a presentation to the Seattle GWT Users Group on Sage ERP Accpac’s use of the Google Web Toolkit (GWT) in our 6.x product line. I found the group to be really knowledgeable and they asked great questions throughout the presentation. I learned a lot from the meeting and from chatting with the various people attending. Definitely very worthwhile. I previously blogged about Sage ERP Accpac’s use of GWT here. […]

  5. You highlight GWT’s awesome points very well. I agree the debugging is awesome.


    September 24, 2011 at 11:16 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: