Design and implementation steps:
- Drawing with required application, pages on paper
- Studying functional requirements. Make a list of demands and goals (very important because the aim is not exactly project will not succeed)
- Drawing in GIMP’s answer to the question “how should it look?”
- Document “Widget selection” which will provide […]
Archive for the ‘AJAX’ Category
Applicatie Design GWT
smoothgallery
http://smoothgallery.jondesign.net/what/
Using mootools v1.11, this javascript gallery and slideshow system allows you to have simple and smooth (cross-fading…) image galleries, slideshows, showcases and other cool stuff on your website…
Auto-Completion Textbox GWT
Alternatively, you can create your own implementation of CompletionItems interface (see below) to get a list of items using RPC.
Updated 05/27/06. New version is up. Now with AutoCompleteTextArea.
Please leave your questions or comments here.
Source code:
CompletionItems.java:
/*
Auto-Completion Textbox for GWT
Copyright (C) 2006 Oliver Albers http://gwt.components.googlepages.com/
This library is free software; you can redistribute it and/or
modify it under […]
JUnit GWT
- Create gwt application
webAppCreator info.eecho.black.client.Black
- Create test java, and run scripts
junitCreator -junit /home/sergej/Documenten/eclipse/plugins/org.junit_3.8.2.v20080602-1318/junit.jar -module info.eecho.black.client.Black -eclipse Black info.eecho.black.client.test.Black
- Compile class file
javac -cp "$APPDIR/src:$APPDIR/test:$APPDIR/war/WEB-INF/classes:/home/sergej/Documenten/eclipse/plugins/org.junit_3.8.2.v20080602-1318/junit.jar:/home/sergej/Documenten/gwtlib/gwt-linux-1.6.4/gwt-user.jar:/home/sergej/Documenten/gwtlib/gwt-linux-1.6.4/gwt-dev-linux.jar" test/info/eecho/black/client/test/Black.java
- Edit gwt xml file to add
vim src/info/eecho/black/client/Black.gwt.xml
<source path="test/" />
- Run test
./Black-hosted
Time: 15.879
OK (1 test)
optimize GWT
1. optimize network exchanges (generally, you’d better have 1 RPC call
return 3 “kinds” of data, than 3 RPC calls)
2. but GWT-RPC might be slow, particularly while serializing/
deserializing large object graphs
3. when updating the UI, working with hidden (display:none) or, even
better, detached widgets is faster; sometimes, building a new widget
“from scratch”, populating it and replacing an […]
Profiling GWT application performance
Posted by Sumit Chandel, Developer Programs Engineer - Monday, November 24, 2008 at 4:41:00 PM
By Sumit Chandel, Google Web Toolkit Team
A couple weeks ago, I talked about On-demand widget creation in GWT, a technique you can use to improve the performance of your own GWT applications. What we detailed there was how to apply the […]
Security for GWT Applications
Dan Morrill, Google Developer Relations Team
Updated January 2009
It is a sad truth that JavaScript applications are easily left vulnerable to several types of security exploits, if developers are unwary. Because the Google Web Toolkit (GWT) produces JavaScript code, we GWT developers are no less vulnerable to JavaScript attacks than anyone else. However, because the goal […]
DOM Events, Memory Leaks, and You
Joel Webber, Google Web Toolkit Team
Updated January 2009
You may ask yourself, “Why do I have to use bitfields to sink DOM events?”, and you may ask yourself, “Why can I not add event listeners directly to elements?” If you find yourself asking these questions, it’s probably time to dig into the murky depths of DOM […]
JUnit Automated Testing links
One of the core features of GWT is testability, which means we can easily test our applications using a set of tried-and-true testing tools. Testability for GWT applications breaks down into the three following types of testing components:
* Standard JUnit TestCases
* GWTTestCases (subclasses of the JUnit TestCase)
[…]
Java Mocks
http://easymock.org/
EasyMock provides Mock Objects for interfaces in JUnit tests by generating them on the fly using Java’s proxy mechanism. Due to EasyMock’s unique style of recording expectations, most refactorings will not affect the Mock Objects. So EasyMock is a perfect fit for Test-Driven Development.
EasyMock is open source software available under the terms of the MIT […]
Testing Methodologies Using Google Web Toolkit
Sumit Chandel, Google Developer Relations
March 2009
This article is a direct adaptation of Daniel Wellman’s excellent article, “Google Web Toolkit: Writing Ajax Applications Test-First”, published in Better Software magazine (November 2008).
One of the core features of GWT is testability, which means we can easily test our applications using a set of tried-and-true testing tools. Testability for […]
MVC GWT
General idea
Since MVC is probably the most most widely used architectural pattern for designing classical web applications it is also appealing choice for GWT. However optimal implementation of this pattern differs quite significantly from traditional web MVC and is much closer to MVC for desktop clients. One of these differences is that the Model in […]
About the Flex Ajax Bridge
The Flex Ajax Bridge (FABridge) is a small code library that you can insert into an Flex application, a Flex component, or an empty SWF file to expose it to scripting in the browser.
Rather than having to define new, simplified APIs to expose a graph of ActionScript objects to JavaScript, with FABridge you can make […]
BorderLayout problem GWT ext
So I finally figured this out, and this solution also applies to the original poster. Starting with GWT 1.5, and I’m not sure why, but you can no longer specify the EXT css and javascript includes in the gwt.xml file.
They must be placed in the HTML page in the body tag in the following order, […]
pyjs
http://pyjs.org/ Many people, when first finding out about Google Web Toolkit, wonder “why can’t I use Python instead of Java?”. pyjamas is designed to make that possible. (Download Pyjamas 0.4).
SplitterWidgetBorderLayout
package com.eEcho.client;
import com.google.gwt.user.client.ui.Composite;
import com.gwtext.client.core.Margins;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;
public class SplitterWidgetBorderLayout extends Composite{
// Margins(int top, int left, int right, int bottom)
int MTOP = 0;
int MLEFT = 0;
int MRIGHT = 0;
int MBOTTOM = 0;
Panel layout = new Panel();
Panel mainBorderPanel = new Panel();
Panel subBorderPanel = new Panel();
Panel westPanel;
Panel centerPanel;
Panel eastPanel;
int MINWEST = 100;
int MAXWEST = 250;
int […]
custom ClickListener on composite gwt
package com.esaturnus.gwt.client;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.ClickListenerCollection;
import com.google.gwt.user.client.ui.SourcesClickEvents;
import com.google.gwt.user.client.ui.VerticalPanel;
public class ClickableVerticalPanel extends VerticalPanel implements SourcesClickEvents {
private ClickListenerCollection listeners = new ClickListenerCollection();
public ClickableVerticalPanel() {
sinkEvents(Event.ONCLICK);
}
public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);
if (DOM.eventGetType(event) == Event.ONCLICK) {
listeners.fireClick(this);
}
}
public void addClickListener(ClickListener listener) {
listeners.add(listener);
}
public void removeClickListener(ClickListener listener) […]
Iterator Map GWT HashMap
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;
private Map ors = new HashMap();
for(Iterator i=broadcasts.entrySet().iterator(); i.hasNext();){
Map.Entry entry = (Map.Entry) i.next();
AVChatThumbnail thumbnail = (AVChatThumbnail) entry.getValue();
thumbnail.stop();
}
of
Iterator iterator = audiostream_requests.keySet().iterator();
while( iterator. hasNext() ){
String streamName […]
Allow data sources across domains GWT
http://www.drivenbycuriosity.com/mywp/?p=52
Accessing PHP pages in Hosted Mode GWT (remote host)
Accessing PHP pages for debugging in hosted mode has been an issue mostly confined to those running Linux systems prior to IE7. Now the question comes up for Windows developers as well. I never liked the Tomcat proxy idea since it lends itself to writing code using […]
GWT Java Random
import com.google.gwt.user.client.Random;
Random.nextInt(_ors.size())
