Using the gwt KeyHandler instead of KeyboardListener

private void listenToSearch(final CustomTextBox searchBox)
{
searchBox.addKeyDownHandler(new KeyDownHandler()
{

public void onKeyDown(KeyDownEvent event)
{
if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER)
{
search(searchBox);
}

}
});
}

Using the gwt ClickHandler instead of TableListener

private ClickHandler listenToTableClick(final FlexTable table)
{
return new ClickHandler()
{

public void onClick(ClickEvent event)
{
//instead of casting the former sender as a FlexTable, use the original table

Cell cell = table.getCellForEvent(event);
int row = cell.getRowIndex();
int col = cell.getCellIndex();

//original code here

}
}

iPhone and other mobile devices hacked via SMS

http://www.forbes.com/2009/07/28/hackers-iphone-apple-technology-security-hackers.html

AppEngine Date field editing


When you have a Java Date field in the AppEngine JDO and try to enter the new value using Google Web interface:
Data Viewer -> Edit Entity or Create an Entity

you may be getting this error: "Could not instantiate int: invalid literal"

I think this is a bug, as this field should be a Date not an int, but there is a simple work-around:
1) change the int to null, then save
2) change the null to gd:when and you can enter a date in the format 2009-07-29 20:36:17.565000


Using the appengine database

Google has a nice short document on how to get started using the appengine database using JDO. http://code.google.com/appengine/docs/java/gettingstarted/usingdatastore.html

Mouse Button Click

If you need to determine which button is clicked on a mouse with a ClickHandler, you can use the NativeEvent class. Here is code that determines whether or not the ClickHandler was trigger by a right click or not (event is ClickEvent):

if(event.getNativeEvent().getButton() == NativeEvent.BUTTON_RIGHT)

{

GWT.log("Right Click", null);

}

else

{

GWT.log("Left Click", null);

}

smartclient.com GWT

There is a nice showcase of GWT widgets:


GWT 1.6: "removeClickHandler" solution

GWT 1.6 changed all Listeners to Handlers and in the process setup a few different practices. One possibility with GWT before 1.6 was to add a ClickListener to a FocusPanel and then remove it by calling the method removeClickListener(ClickListener listener). But, in 1.6 this is not an option with Handlers. There is no removeClickHandler(). Instead, when you add a handler to a widget, it returns an instance of HandlerRegistration. This can then be used to remove that handler. Here is an example of a handler being adding then removed:

FocusPanel focus = new FocusPanel();

HandlerRegistration registration = focus.addClickHandler(new ClickHandler()

{

public void onClick(ClickEvent event)

{

// Panel has been clicked

}

});

registration.removeHandler();

KeyPressEvent: Getting the key code

There is a new way to get what keys are pressed in GWT 1.6. Now KeyPressHandler is used to listen to a TextBox:

TextBox box = new TextBox();
box.addKeyPressHandler(new KeyPressHandler()
{
public void onKeyPress(KeyPressEvent event)
{
// Listen to key event
}
});


You can use event.getCharCode() to get the character that was pressed, but in order to get the key code (int) that was pressed you need to use the following method:

event.getNativeEvent().getKeyCode()


So here is code to listen to when the "Enter" key is pressed:

TextBox box = new TextBox();
box.addKeyPressHandler(new KeyPressHandler()
{
public void onKeyPress(KeyPressEvent event)
{
if (KeyCodes.KEY_ENTER == event.getNativeEvent().getKeyCode())
{
System.out.println("Enter key has been pressed");
}
}
});

Apple Tablet

Mashable.com wrote that Apple may release a new 10 inch Tablet in September for the Christmas season. They included some Photoshoped images of how it might look like:

http://mashable.com/2009/07/27/apple-tablet/

Name: Touch Book Pro?




Alerting Visitors when JavaScript is Disabled

The web site we're developing is JavaScript based, so we need to warn users if they come to our site with JavaScript disabled. The easiest way to do this is to use the HTML <noscript> tag (http://www.w3schools.com/TAGS/tag_noscript.asp).

For example:

<head>
<script ...
</script>
</head>
<body>
<script ...></script>
<noscript>
<div class="noscript-warning">
<h1>Please turn on JavaScript to use this site.</h1>
<p>
It seems that you have JavaScript turned off. You will need
to turn it on in order to use this site.
</p>
</div>
</noscript>
</body>

The contents of the <noscript> tag will only be displayed when JavaScript is disabled. When JavaScript is enabled, the tag and its contents will not be displayed at all.

Google Wave beyond the sandbox

On September 30, 2009 Google is planning to make the Google Wave available beyond the current developer's sandbox to additional 100,000 users.

In the meanwhile, if you want to see Google Wave in action, come to the Chicago Google Technology User Group conference:

Video: Android 103

JavaScript: browser type and version detection

To check for a specific browser type and version and display a popup, include below code in HTML page:
<script>
if (navigator.userAgent.toLowerCase().match("safari") && navigator.userAgent.toLowerCase().match("version/4")) {
window.alert("Detected Safari 4 browser!!");
}
</script>

Re: [gtug-managers] Gain potential members...

Hi Ales,

it is really not difficult to get a LOT of people attending your GTUG....

Create Event Brite account:
http://chicago-gtug.eventbrite.com/

Create a Meetup.com account:
http://www.meetup.com/chicago-google/

Create a Facebook account:
http://www.facebook.com/group.php?gid=57657640517

Have people following you on Twitter using your specific hashtag (our is #ChiGTUG):
http://twitter.com/#search?q=ChiGTUG


respectfully,

Uki Dominque Lucas

principal @ The Revere Group, an NTT Data Company (Nippon Telegraph &
Telephone Corp.)

Hi.

I have a little problem... well, I don't know a lot of people and I don't know a good way to reach people for the club. Yeap... sounds stupid because I created the group, but that's my initiative I mean I have to motivate people to join the group.

So any idea ? ... little advice ? ... anything it's really appreciated and well... this is the best place to ask

ales
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "gtug-managers" group.


On Jul 21, 2009, at 11:36 PM, ales wrote:

>
> Hi.
>
> I have a little problem... well, I don't know a lot of people and I
> don't know a good way to reach people for the club. Yeap... sounds
> stupid because I created the group, but that's my initiative I mean I
> have to motivate people to join the group.
>
> So any idea ? ... little advice ? ... anything it's really appreciated
> and well... this is the best place to ask
>
> ales

Terminal: RSA host key verification error

In case you get below error in your terminal, you can edit your .ssh/known_hosts file in your home directory.
Error:
RSA host key for xx.xxx.xx.xx has changed and you have requested strict checking.
Host key verification failed.
Solution:
- Find and open in your terminal .ssh/known_hosts:
pico ~/.ssh/known_hosts
- Delete all the content for this host and save file.
- When you log in to xx.xx.xx.xx server, it will prompt you to verify that this is a known host and will append permissions to .ssh/known_hosts file.

Entrepreneurial Thought Leaders


few valuable lessons out of this one:

"Don't try to save money on the toilet paper and peanut butter and the customer care."

GWT 1.7 using ChangeHandler on ListBox (drop-down)

Here is a simple example of how to listen to the change event.
This functionality replaces the deprecated listBox.addChangeListener(new ChangeListener(){//implementation} );


private ListBox populateLearningLanguage()
{
final ListBox listBox = new ListBox();
addLanguages(listBox);
listBox.setSelectedIndex(2);

listBox.addChangeHandler(new ChangeHandler()
{
public void onChange(ChangeEvent event)
{
int selectedIndex = listBox.getSelectedIndex();
if (selectedIndex > 0)
Window.alert("Something got selected " + listBox.getValue(selectedIndex));
}
});
return listBox;
}

Flexible USB keyboard

This keyboard is incredibly flexible and the buttons have a real "press down" feeling to them, but as with any new keyboard there is much getting used to be overcome.

The seller advertised it as indestructible, so if you work in the chemical lab, or eat a lot of pizza while typing, that may be a good choice.

I like it because it is super light, flexible and lays down on the table which is good for my wrists. There are only blue and black versions available.

Works both with Mac and Windows.

After using it for few days I have the following problems:

- pressing buttons is a little harder than normal keyboard
- you have to be more precise
- space bar does not get pressed way too often and I end up with words stuck together
- arrows placement is terrible
- Windows/Apple special button is too small for as often as I use it
- backspace is too small


Photoshop tutorial: create aqua button






http://www.webdesign.org/cat/photoshop/tutorials/aqua-style-button-with-photoshop.35.html




Ant: TAR and GZIP task

You can create an ant task called, tar task, to compress a directory instead of manually creating the tar in command line.
http://ant.apache.org/manual/CoreTasks/tar.html Insert below text in your build.xml file for your project:
<tar destfile="${dist}/manual.tar" basedir="htdocs/manual"/>
<gzip destfile="${dist}/manual.tar.gz" src="${dist}/manual.tar"/>

Maven, GWT, and Eclipse round 2

So I've definitely made some progress in the Maven, GWT, and Eclipse integration. Below would be a working sample starting from a GWT project started using the google eclipse plugin.

Prerequisites:
Eclipse 3.4
Google Eclipse Plugin
m2eclipse plugin

Create your gwt project:

Create a pom for your project:


Edit the pom to look like this (profiles and resource filtering are definitely not needed and can be removed) and add any other jars you may need for your project:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.demo.application</groupId>
<artifactId>Application</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<outputDirectory>war/WEB-INF/classes</outputDirectory>
<testSourceDirectory>test</testSourceDirectory>
<testOutputDirectory>target/test-classes</testOutputDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>src</directory>
<includes>
<!--
This will include all files in the root source like
log4j.properties or applicationContext.xml
-->
<include>*.*</include>
<!--
This will include all files in client: 1. so this project can be
inherited by another project (needs java files) 2. will include
image files for image bundles
-->
<include>**/client/**</include>
<!-- This will include any css and image files in the public folder -->
<include>**/public/**</include>
<include>**/*.gwt.xml</include>
</includes>
</resource>
</resources>
<filters>
<!--
This tells which file to use for filtering, ${target} gets replaced
by the target property specified in your profile
-->
<filter>src/${target}.properties</filter>
</filters>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<!--
This plugin will copy dependencies into the right outputDirectory
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<outputDirectory>war/WEB-INF/lib</outputDirectory>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.3</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>google-maven-repository</id>
<name>Google Maven Repository</name>
<url>http://google-maven-repository.googlecode.com/svn/repository/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>com.google.appengine.orm</groupId>
<artifactId>datanucleus-appengine</artifactId>
<version>1.0.2.final</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>1.1.0</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-jpa</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jpa_3.0_spec</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo2-api</artifactId>
<version>2.3-ea</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>local</id>
<properties>
<target>local</target>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<target>prod</target>
</properties>
</profile>
</profiles>
</project>


You'll have to install some of the jars into maven manually, they aren't really keeping up to date with these things. For the datanucleus-appengine-1.0.2.final.jar you have to use the one that was placed in the lib folder and run this command

mvn install:install-file -DgroupId=com.google.appengine.orm -DartifactId=datanucleus-appengine -Dversion=1.0.2.final -Dpackaging=jar -Dfile=/path/to/file

At this time I would enable maven (I got some error message but just hit ok):

If you are using profiles (you probably have an error in your project at this point) tell maven which active profile to use:

You'll get a message if you want maven to update your project, hit ok.
You're done, just ignore the warning about the missing gwt-servlet.jar, it will be there, just named differently.

now we just need to make an ant build.xml to make compiling, and deploying easy.

<project name="Application" default="java_compile" basedir=".">

<property file="./src/local.properties" />

<target name="java_compile" description="Java compile, filter resources, copy jars">
<echo>Make sure you have set up Maven Executable in ./src/local.properties</echo>
<echo>Your mvn exe is set to ${MAVEN_EXEC}</echo>
<!-- process-resources filters the files in the resources directory and copies them to target/classes -->
<!-- dependency:copy-dependencies copies the dependencies to the target/dependency folder -->
<delete dir="war/WEB-INF/lib" />
<exec taskname="compile project" dir="${basedir}" executable="${MAVEN_EXEC}">
<arg line="clean process-resources compile dependency:copy-dependencies -P local" />
</exec>
</target>

<path id="project.class.path">
<pathelement location="war/WEB-INF/classes" />
<pathelement location="${gwt.sdk}/gwt-user.jar" />
<fileset dir="${gwt.sdk}" includes="gwt-dev*.jar" />
<!-- Add any additional non-server libs (such as JUnit) -->
<fileset dir="war/WEB-INF/lib" includes="**/*.jar" />
</path>

<target name="gwt_compile" description="GWT compile to JavaScript" depends="java_compile">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src" />
<path refid="project.class.path" />
</classpath>
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg line="-Xmx512M" />
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="com.demo.application.Application" />
</java>
</target>

<target name="create_war" depends="gwt_compile">
<echo>Creating the war file in target/Application.war</echo>
<zip destfile="target/Application.war" basedir="war" encoding="UTF8"/>
</target>
</project>


then our local.properties file needs to look something like this

gwt.sdk=/path/to/gwt-os-1.7.0
MAVEN_EXEC=/path/to/mvn.exe


Once that is done you need to run "ant java_compile" to copy the jars into the war/WEB-INF/lib folder. And every time you change the dependencies you'd want to run "ant java_compile"

Now if you ever want to simply create a war file without using eclipse you can just run "ant create_war"

Eclipse not showing code errors (in red)

Occasionally Eclipse stops showing the code syntax errors that is annoying and makes it as useful to code as Text pad or BBedit.

I found that re-saving your Eclipse Perspective fixes the problem:

Now just save it with any name you like and re-start Eclipse, that does it 99% of the time.





Google Web Toolkit 1.7 (GWT) in Eclipse 3.4

Make sure your Eclipse knows that you are using GWT 1.7.0


YouTube.com warns Internet Explorer (IE6) users

YouTube.com has the "guts" to tell Internet Explorer 6 (IE6 ) browser users "We will be phasing out support for your browser soon."

The users of IE7 are OK.

This is great news for pretty much all Web developers as IE6 is a support nightmare and YouTube.com has a great market pull to make change.

This market pull was previously demonstrated with Flash plugin -- lot people downloaded the Flash plug in just to view movies on YouTube.com

Now users are asked to download Google Chrome, IE8, or Firefox 3.5 (Opera and Safari are not listed).

Our hats off to YouTube.com!

http://www.youtube.com

Installing GWT 1.7 with Maven2



Change pom.xml:

<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>1.7.0</version>
</dependency>

RUN Maven2 (via Ant) to see missing dependencies:



<property name="GOOGLE_WAR" value=".\\war" />
<property name="MAVEN_TARGET" value=".\\target" />
<property name="GOOGLE_SRC" value=".\\src" />
<property file=".\\maven\\resources\\${user.name}.properties" />


<target name="prepare">
<echo>Make sure you have set up Maven Executable in .\\maven\\resources\\${user.name}.properties</echo>
<echo>Your mvn exe is set to ${MAVEN_EXEC}</echo>
<!-- resources:resources filters the files in the resources directory and copies them to target/classes -->
<!-- dependency:copy-dependencies copies the dependencies to the target/dependency folder -->
<exec taskname="mvn war" dir="${basedir}"
executable="${MAVEN_EXEC}">
<arg line="clean resources:resources dependency:copy-dependencies -Dtarget=${TARGET}" />
</exec>
<delete dir="${GOOGLE_WAR}\\WEB-INF\\lib" />
<!-- copy the maven depenecies to the war/WEB-INF/lib folder -->
<copy todir="${GOOGLE_WAR}\\WEB-INF\\lib">
<fileset dir="${MAVEN_TARGET}\\dependency" />
</copy>
<!-- copy the filtered resources to the src folder -->
<copy todir="${GOOGLE_SRC}">
<fileset dir="${MAVEN_TARGET}\\classes" />
</copy>
</target>





Install missing dependencies to your LOCAL REPO:

uki@Uki:~ $ cd /opt/gwt/gwt-mac-1.7.0 
uki@Uki:/opt/gwt/gwt-mac-1.7.0 $ mvn install:install-file -DgroupId=com.google.gwt -DartifactId=gwt-servlet -Dversion=1.7.0 -Dpackaging=jar -Dfile=gwt-servlet.jar [INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [install:install-file] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [install:install-file]
[INFO] Installing /opt/gwt/gwt-mac-1.7.0/gwt-servlet.jar to /Users/uki/.m2/repository/com/google/gwt/gwt-servlet/1.7.0/gwt-servlet-1.7.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL




uki@Uki:/opt/gwt/gwt-mac-1.7.0 $ mvn install:install-file -DgroupId=com.google.gwt -DartifactId=gwt-user -Dversion=1.7.0 -Dpackaging=jar -Dfile=gwt-user.jar 
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [install:install-file] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [install:install-file]
[INFO] Installing /opt/gwt/gwt-mac-1.7.0/gwt-user.jar to /Users/uki/.m2/repository/com/google/gwt/gwt-user/1.7.0/gwt-user-1.7.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL

RE-run the Ant (Maven2) until you get BUILD SUCCESSFUL

















GWT 1.7 is released

GWT 1.7 is out, it adds explicit support for IE8, Firefox 3.5, and Safari 4, fixed GWT outputs expressions too long for WebKit (Safari 4 crashing).

Download:

Release notes:

iPhone presentation

http://docs.google.com/Presentation?id=ddcdv84n_2hhv88dfq

if you have any questions let me know: philip.wodarczyk@gmail.com

App Engine Presentation

I didn't put my presentation up, but here is a link to the app engine home page

http://code.google.com/appengine/

The video on that page was the first video I watch on App Engine and goes over the exact same thing I went over in my talk. It was a great first meeting. I'm looking forward to meeting more people and exchanging more ideas. Enjoy!

Facebook and OpenSocial presentations

Here are some useful links from my two presentations at the GTUG conference at Google Chicago last night.

Facebook Connect
OpenSocial

OpenSocial
OpenSocial 4 GWT

Maven and GWT

For those wanting to look at my project to see how I used maven with my gwt project the link is http://code.google.com/p/gwt-editable-label/

I also hope I didn't bore everyone too much since I got really technical. I will post later with updates and better comments on how everything works together. Next time we definitely need to have fewer presenters and more time for talking / mingling.

Google Technology (to jump-start your next big idea)

Agenda:

5:15 PM - Uki D. Lucas (Chicago-GTUG.com):
- Introduction

5:30 PM - Gregory Kick (Google.com)
- GData, Guice, Google collections

5:45 PM - Jordan Beck (Revere Group)
- hosting on Google Code
- GWT and Google AppEngine
- Photo Carousel example Widget

6:05 PM - David Wolverton (Revere Group)
- Facebook for Google Web Toolkit

6:30 PM - Trevor Skaife (Revere Group)
- Maven2 dependencies with Google Web Toolkit

6:45 PM - David Wolverton (Revere Group)
- OpenSocial
- Google Friend Connect for Google Web Toolkit

7:00 PM - David Lo (Revere Group)
- Building mobile applications with Android

7:15 PM - Phil Wodarczyk (Revere Group)
- Building application with iPhone (cool bonus presentation)

7:30 PM - 8:00 PM
- Questions and Answers

------------------------------------------------

Purpose of these meetings:

We would like if after this meeting you go home and by Sunday night had a little social application deployed.

- think tank
- open source project support
- established enterprise education
- new idea/start-up incubator

New generation of websites using social networking:




angel investments:
http://www.prosper.com/

Do not leave tonight without stopping by and saying hello, leave your business card!

Future:
- Google Wave
- Android in depth
- Google Maps for GWT
- Friend Connect in depth













Twitter Search URLs

You can bookmark or create a link to any search on Twitter. Just do the search and copy the web address at the top of your Internet Explorer, Safari, Firefox or whatever you are using.

Here are some examples of searches you can do and the link that Twitter uses:

Search for fireworks:
enter: fireworks
link: http://twitter.com/#search?q=fireworks

Search for tweets with "fireworks" and "Chicago"
enter: fireworks Chicago
link: http://twitter.com/#search?q=fireworks chicago

Search for tweets with the exact phrase "Chicago fireworks":
enter: "Chicago fireworks"
link http://twitter.com/#search?q="Chicago fireworks"

Search for tweets with the exact phrase "Chicago fireworks" and "3rd of July":
enter: "Chicago fireworks" "3rd of July"
link http://twitter.com/#search?q="Chicago fireworks" "3rd of July"

What is a browser?

I think it is only fair to ask ourselves before making a presentation... how much simpler could I explain this?

"OpenSocial is a set of common APIs that is implemented by... yada, yada"

hmm.. maybe not...

"Nobody likes to sign up to yet another new website, in fact is costs companies millions in marketing of dollars. However, joining by clicking a familiar Google Friend Connect icon seems to pose no obstacle..."




Adding Twitter feed widget to your Website

Would you want to have the Twitter feed on your Website, like the one in the right margin of this site?

Paste the following code in your blog as HTML/JavaScript element. Replace 'chicago-gtug' with what your interests are.

<script language="javascript">
/* widget config */
var jtw_divname = 'jtw_widget1';
var jtw_search = 'chicago-gtug';
var jtw_width = '250px';
var jtw_height = '480px';
var jtw_scroll = 'yes';
var jtw_widget_background = '#FFFFFF';
var jtw_widget_border = '1px solid #DDDDDD';
var jtw_center_widget = 'yes'; /* tweet styling */
var jtw_tweet_textcolor = '';
var jtw_tweet_background = 'url(./img/greygrad.png) repeat-x #fff';
var jtw_tweet_newbackground = '#ffe';
var jtw_tweet_border = '1px solid #DDDDDD';
var jtw_tweet_margin = '3px';
var jtw_tweet_fontsize = '12px';
var jtw_hide_img = ''; /* search and display config */
var jtw_pre_html = '<center><b>Twitter: #Chicago-GTUG</b></center>';
var jtw_post_html = ''; var jtw_mid_html = '';
var jtw_num_tweets = '5'; var jtw_tweet_lang = 'en';
var jtw_widget_refresh_interval= 10;
</script>
<script src="http://tweetgrid.com/widget/widget.js" type="text/javascript"></script>

Google announces "Chrome OS"

Google announced a Linux-based operating system where the applications will be Web based like Google Docs, Calendar, and any other RIA application we will write with GWT (Google Web Toolkit) on HTML5.

Why Google did not use Android for that purpose as I previously predicted? Google blog stated:

“Google Chrome OS is a new project, separate from Android. Android was designed from the beginning to work across a variety of devices from phones to set-top boxes to netbooks. Google Chrome OS is being created for people who spend most of their time on the web, and is being designed to power computers ranging from small netbooks to full-size desktop systems. While there are areas where Google Chrome OS and Android overlap, we believe choice will drive innovation for the benefit of everyone, including Google.”

The above statement tells me nothing, but my assumption is they took the same Linux base as Android, they added Chrome to it and many other useful features. I imagine that it will feel somewhat like Widgets Dashboard where everything is from the Web, but it is still the Desktop.

My biggest hope is that just like with Android, the Java will be the primary tool to develop Chrome OS applications on top of the Linux base.

There are many nay-sayers about hosting the apps in the "cloud" and not having them locally (while in the plane over Atlantic ocean), but Google has the solution for that as well.

We have been successfully using and sharing Google Docs for couple of years now and at this point I hate when someone sends me the Word document in the email.

I don't see any reason for NOT dumping the Eclipse IDE and writing all my shared Java code over the internet and using Google servers to deal with 12 minute compilation time of my GWT application. Who knows they might have it done in 3 minutes!

Can you imagine a Web based Photoshop incarnation where the 500 Mb layered image is stored in the cloud? You'd receive the small view-only version of your work (screen size chunk) and Google servers do the heavy lifting of applying the new filter, texture, mask, etc?!? You could do Photoshop on any $500 computer available and it would be much faster.



Official Google Blog: Introducing the Google Chrome OS

Official Google Blog: Introducing the Google Chrome OS

Getting GWT working from SVN

1) check out the project from SVN
2) run ant to download the Maven2 dependencies locally and copy them
to the war/WEB-INF/lib
3) refresh Eclipse project so it knows that new jars are there
4) remove jars from Project -> Properties -> Java Build Path
5) add all jars from the war/WEB-INF/lib to make sure Eclipse knows
the exact set of jars the pom.xml had

example for gwt lazy panel

The gwt lazy panel has a createWidget method that is created when lazyPanel.setVisible("true") is called, making it possible to reduce initial loading of a tab panel

hasBeenLoaded = false;
TabPanel tp = new TabPanel();
tp.getTabBar().setStylePrimaryName("tabStatisticsMain");
tp.getDeckPanel().setStylePrimaryName("tabStatisticsMain");
tp.setWidth("100%");
VerticalPanel vp1 = new VerticalPanel();
VerticalPanel vp2 = new VerticalPanel();
create(vp1);

tp.add(vp1, "Individual stats");
tp.setVisible(true);
final LazyPanel lp = new LazyPanel()
{
@Override
protected Widget createWidget()
{
return create(vp2);
}
};
lp.setVisible(false);
tp.add(lp, "Team stats");
tp.addBeforeSelectionHandler(new BeforeSelectionHandler()
{
public void onBeforeSelection(BeforeSelectionEvent event)
{
if (event.getItem().intValue() == 1){
lp.setVisible(true);
if(!hasBeenLoaded){
Document.get().getElementById("Loading- Message").getStyle().setProperty("visibility", "visible");
hasBeenLoaded = true;
}
}
else
lp.setVisible(false);
}
});

tp.selectTab(0);
container.add(tp);