Author: Svetlin Nakov
September 30, 2007
On 26th of September 2007 I and Peter Tahchiev organized the first meeting of the Bulgarian Java User Group (BGJUG) running at the Bulgarian Association of Software Developers (BASD). It was attended by about 120 Java developers. It is a good start!

I gave a talk on AJAX applications development with the Google Web Toolkit (GWT) technology.

I presented the fundamentals of GWT and made few live demonstrations including creating custom widgets and using RPC services. The GWT presentation, the demonstrations and the video recording (in Bulgarian) are available for download from the seminar’s official page.
There was high interest to my talk and to the event as a whole. Good job!
The BGJUG will meet regularly once monthly, each last Wednesday of the month. I hope the Java community will constantly grow and the events will become better and better.
Tags: AJAX, Association, custom widgets, google web, GWT, java developers, java user group, rpc services, Software, User
Author: Svetlin Nakov
September 5, 2007
In my current GWT project I have some data comming from the server side but is unlikely to be changed during the execution of the project. This is the the list of languages available in the system. I wanted to cache the requests to the RPC service that returns the list of available languages so that this list to be dowloaded only once.
What I done:
public class LanguageServiceAsyncCache {
private static LanguageDTO[] languagesCache = null;
public static void getLanguages(final AsyncCallback callback) {
if (languagesCache != null) {
// Languages are cached, return the cached instance
callback.onSuccess(languagesCache);
}
else {
// Execute a RPC service to get the languages list
LanguagesServiceAsync languagesServiceAsync =
ServiceUtils.getLanguagesServiceAsync();
languagesServiceAsync.getLanguages(new AsyncCallback() {
public void onSuccess(Object result) {
languagesCache = (LanguageDTO[]) result;
callback.onSuccess(languagesCache);
}
public void onFailure(Throwable caught) {
callback.onFailure(caught);
}
});
}
}
}
In the above code the LanguageDTO class is simple JavaBean that transports the data from the server to the client (see Data Transfer Object pattern). The ServiceUtils is a simple class that keeps the client proxies of the RPC services as singletons. It is used to ensure that teh service proxy for each RPC srevice is created no more than once.
Tags: AsyncCallback, class, languagesCache, list, object result, public static void, rpc service, rpc services, service proxy, void