An interesting approach reinventing desktop human-computer interaction from http://10gui.com/video/
And very inspiring article from UXMag:
http://www.uxmag.com/technology/toward-a-better-tablet-os-part-2
Just found another great example of HTML 5.
http://code.google.com/p/quake2-gwt-port/
Those guys have ported Quake via GWT to pure HTML and JavaScript. I am pretty sure it will behave well only on WebKit, yet it shows the new approach the web is going, “sadly” without Adobe Flash.
Great news. HTTP4e was released few weeks ago. Today I found some time to post it.
New features:
- Introducing @file abilities to load external payload to body by simply passing @/file/path
- Export HTTP sessions report as HTML
- Export and import HTTP4e replay script
- Importing raw HTTP packets
- Importing http packets directly from Firefox’s Live HTTPHeaders
- Enhancing tabs
- Fixing Pretty view XML formatting
- JMeterone click script generation
- PHP, Flex/ActionScript, Cocoa/Objective-C, Ruby, Pythonone click script generation
- C#, Visual Basic.NETone click script generation
- JavaScript, Prototype, jQuery one click script generation
- Apache HTTP Components 4.x one click code generation
Stay tuned for more news and examples.
Probably many of you needed to add Mootools, jQuery or Scriptaculous kinda effects within your GWT code.
I came across those two and I am spreading them to web:
Brand new, dead-easy to use library called GWT-FX:
http://code.google.com/p/gwt-fx/
A GWT wrapper over Mootools:
http://www.amateurinmotion.com/projects/gwt-mootools.html
Every now and then I need to use the Velocity templating. And the first thing I always experience is that nasty failure.
SEVERE: ResourceManager : unable to find resource 'template.vm'
in any resource loader.
Exception in thread "main"
org.apache.velocity.exception.ResourceNotFoundException:
Unable to find resource 'template.vm'
...
Velocity is so picky and always complains about the .VM template not being found. And I always start fiddling around, making sure file name is correct, making sure the VM file is right file location, class path location and yet same cruel error ResourceNotFoundException…
The answer for “properly” configuring Velocity and making it happy is bellow:
Properties p = new Properties();
// Uncomment if template.vm is being loaded from file system
//p.setProperty( "resource.loader", "file" );
// absolute or relative path
//p.setProperty( "file.resource.loader.path", "./src" );
//p.setProperty( "file.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.FileResourceLoader" );
// Uncomment if "template.vm" is being loaded from class path, jar, zip,..
//p.setProperty( "resource.loader", "class" );
//p.setProperty( "class.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader" );
VelocityEngine ve = new VelocityEngine();
ve.init(p);
Template t = ve.getTemplate("template.vm");
All said, I am not sure why Velocity team designed it in such a strict way. Instead the engine should be smart enough to find the template directly from Class path location or File resource. Why so difficult?
One year ago I was involved with Selenium as part of a web automated testing project. I discovered multiple limitations with the Selenium framework, mainly with its integration with existing CruiseControl architecture. Having some time lately, I explored the idea of Selenium4j, a framework translating Selenium HTML scripts to Java Junit tests. I hosted to project at
http://code.google.com/p/selenium4j/
Problems with Selenium IDE HTML tests
- While Selenium IDE is great tool for creating HTML tests, the HTML scripts are not Java tests and as such are not usable outside of the Selenium IDE environment
- Using the IDE to create the Java JUnit test works one way only – from HTML to Java. Re-using the java test within Selenium IDE proved to be unreliable and buggy
- Using Selenium RC to invoke the HTML files is not practical solution as it allows only a limited configuration such as browser, server and a single suite. E.g.
java -jar selenium-server.jar -multiwindow -htmlSuite "*iexplore" "https://www.website.com" "C:\suite.html" "C:\results.html"
Motivation for Selenium4j
- Reuse the Selenium HTML suites for regression testing
- To be able to integrate them within an automated environment (think CruiseControl f.i.)
- Make the Selenium HTML tests configurable
WebDriver (Selenium2) solution?
Looking into WebDriver there is no analog of the Selenium IDE. The IDE is an amazing tool for recording the user clicks and it should be great if WebDriver solve the HTML automation integration. It seems that the later version of the IDE (1.0.5 as of writing) provides better support for the new Selenium2 API. Yet, the problem with HTML test integration is still on the table. As long as you record your script and export it to HTML, you are on your own. You need to manually use the IDE to translate the HTML scripts to the desired language (Java in my case), then you need to copy the source, paste it to you Eclipse/Netbeans, make sure compiles, configure it properly. In other words, it’s not fun. WebDriver should provide a solution that simplifies that process and at the end the recorded Selenium IDE script should be seamlessly integrated within an automated environment. In that context, Selenium4j is an example how HTML could be easily translated to a Java JUnit sources.
How does Selenium4j work?
Interesting. I’ve build few Mathematics Applets 10 years ago. Yet, I can still discover their links on internet. I’ve just found my Spirals Applet being featured at comPADRE – a Physics and Astronomy community site.
Applet is http://www.roussev.org/applets/spiral/spiral.html.
And the Spirals Algorithm is as simple as:
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
public class HelloSpirals extends Applet {
int max = 100;
int centerPosition = 150;
double angle = 22 / (double) 128;
public void paint( Graphics g){
setBackground(Color.black);
g.setColor(Color.red);
for (int i = 0; i < max; i++) {
int[] coordEnd = getCoordinates(i);
int[] coordStart = getCoordinates(i - 1);
g.drawLine(centerPosition + coordStart[0],
centerPosition + coordStart[1],
centerPosition + coordEnd[0],
centerPosition + coordEnd[1]);
}
}
private double getAngle( int inx){
return (inx - 1) * angle;
}
private int[] getCoordinates( int inx){
double angle = getAngle(inx - 1);
int x = (int) Math.round(inx * Math.cos(angle));
int y = (int) Math.round(inx * Math.sin(angle));
return new int[] { x, y };
}
}




