<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-36748513461946508</id><updated>2012-02-15T23:09:14.158-08:00</updated><category term='javafx'/><category term='phys2d'/><title type='text'>Frank's Veranda</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>49</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-5649755488415797554</id><published>2010-08-15T07:20:00.003-07:00</published><updated>2010-08-15T07:35:57.549-07:00</updated><title type='text'>The D language</title><content type='html'>I'm reading &lt;a href="http://www.amazon.com/D-Programming-Language-Andrei-Alexandrescu/dp/0321635361"&gt;The D Programming Language&lt;/a&gt; by Andrei Alexandrescu.&lt;br /&gt;&lt;br /&gt;It's very easy to setup the environment in Ubuntu:&lt;br /&gt;&lt;br /&gt;1. From the &lt;a href="http://www.digitalmars.com/d/download.html"&gt;downloads&lt;/a&gt; page, get version 2 of the deb package and install.&lt;br /&gt;2. Install Geany editor. It already supports D out of the box. You can compile and build from within the editor.&lt;br /&gt;3. Happy compiling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-5649755488415797554?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/5649755488415797554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=5649755488415797554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/5649755488415797554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/5649755488415797554'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2010/08/d-language.html' title='The D language'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-6541054585679357219</id><published>2010-07-01T14:15:00.000-07:00</published><updated>2010-07-01T14:51:48.164-07:00</updated><title type='text'>inotify + StringTemplate</title><content type='html'>I was looking for the equivalent of Dreamweaver templates on Ubuntu. I couldn't find anything that met my needs so I decided to create a workflow that came close.&lt;br /&gt;&lt;br /&gt;I have potentially many files that contain xhtml fragments which need to be inserted into one or more templates. That is, I edit a file which when saved results in the creation of a completed html document in some other directory.&lt;br /&gt;&lt;br /&gt;I used &lt;a href="http://en.wikipedia.org/wiki/Inotify"&gt;inotify&lt;/a&gt; and &lt;a href="http://wiki.github.com/rvoicilas/inotify-tools/"&gt;inotify-tools&lt;/a&gt; to notify when files in my source directory are modified, and &lt;a href="http://www.stringtemplate.org/"&gt;StringTemplate&lt;/a&gt; for the template engine.&lt;br /&gt;&lt;br /&gt;inotify should already exist on Linux. But, you'll need to install inotify-tools:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo apt-get install inotify-tools&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This script runs in a terminal waiting for edits to happen in the source directory, then calling the groovy script when it does:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;inotifywait -m -e modify /path/to/src/directory | while read line;&lt;br /&gt;do &lt;br /&gt;   echo "updating file: $line"&lt;br /&gt;   groovy /path/to/monitor.groovy&lt;br /&gt;done&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The groovy script finds the file with the latest modified timestamp and uses StringTemplate to insert the contents into the template. It ends with writing the new file to the target directory.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;def srcDir = new File("/path/to/src")&lt;br /&gt;def targetDir = "/path/to/target/"&lt;br /&gt;def lastModifiedFile = srcDir.listFiles().max{ it.lastModified() }&lt;br /&gt;&lt;br /&gt;StringTemplateGroup group = new StringTemplateGroup("myGroup", "/path/to/templates")&lt;br /&gt;StringTemplate query = group.getInstanceOf("template-1")&lt;br /&gt;&lt;br /&gt;query.setAttribute "content", lastModifiedFile.text&lt;br /&gt;&lt;br /&gt;outFile = new File(targetDir + lastModifiedFile.name)&lt;br /&gt;outFile.write query.toString()&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;So with two small script files, I end up with a neat workflow that maintains the separation of content and template.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-6541054585679357219?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/6541054585679357219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=6541054585679357219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6541054585679357219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6541054585679357219'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2010/07/inotify-stringtemplate.html' title='inotify + StringTemplate'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-850994933086342339</id><published>2010-06-27T09:50:00.000-07:00</published><updated>2010-06-27T10:37:05.008-07:00</updated><title type='text'>XHMTL to PDF: wkhtmltopdf</title><content type='html'>I was looking for a way to create a resume in PDF format without having to use a word processor.&lt;br /&gt;&lt;br /&gt;I looked at Latex but I didn't want to learn a new language.&lt;br /&gt;&lt;br /&gt;XHTML as the primary document would be ideal; a simple markup language that can be styled with CSS.&lt;br /&gt;&lt;br /&gt;I played around with &lt;a href="http://www.princexml.com/features/"&gt;Prince&lt;/a&gt;, but it's not free or cheap. Also, with the non-commercial license, Prince will put a logo on the first page of the document.&lt;br /&gt;&lt;br /&gt;While trying to find an alternative, I stumbled upon &lt;a href="http://code.google.com/p/wkhtmltopdf/"&gt;wkhtmltopdf&lt;/a&gt;. Wkhtmltopdf uses the QT WebKit widget as the rendering engine to generate PDFs. So, the PDF will look very much like what appears in Chrome or Safari.&lt;br /&gt;&lt;br /&gt;I'm using Ubuntu 10.04 and was pleasantly surprised to see wkhtmltopdf in the repositories. However, that version is not the patched version. That is, you won't be able to set header and footer options.&lt;br /&gt;&lt;br /&gt;The good news is they provide static binaries of the latest versions. Download, extract and copy the binary into /usr/local/bin/ and you're good to go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-850994933086342339?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/850994933086342339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=850994933086342339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/850994933086342339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/850994933086342339'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2010/06/xhmtl-to-pdf-wkhtmltopdf.html' title='XHMTL to PDF: wkhtmltopdf'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-20333364420762721</id><published>2010-03-17T13:27:00.000-07:00</published><updated>2010-03-17T13:38:08.531-07:00</updated><title type='text'>Android</title><content type='html'>So I got an android dev environment setup on Ubuntu 9.10 x64. Very straightforward and no missing packages to install.&lt;br /&gt;&lt;br /&gt;The emulator takes awhile to startup. But once it's up, you can deploy/redeploy your apps quickly.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://developer.android.com/guide/index.html"&gt;developer's guide&lt;/a&gt; is a good reference. Also reading &lt;a href="http://www.amazon.com/Hello-Android-Introducing-Development-Progrmmers/dp/1934356492/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1268857979&amp;sr=8-1"&gt;Hello, Android&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The plan is to eventually get to using &lt;a href="http://developer.android.com/sdk/ndk/index.html"&gt;Android NDK&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-20333364420762721?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/20333364420762721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=20333364420762721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/20333364420762721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/20333364420762721'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2010/03/android.html' title='Android'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-2782701689307833066</id><published>2009-12-30T16:03:00.000-08:00</published><updated>2009-12-30T16:04:43.720-08:00</updated><title type='text'>GWT MVP article</title><content type='html'>Here's a good article explaining MVP in GWT applications: &lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/webtoolkit/doc/latest/tutorial/mvp-architecture.html"&gt;Large scale application development and MVP&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-2782701689307833066?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/2782701689307833066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=2782701689307833066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/2782701689307833066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/2782701689307833066'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/12/gwt-mvp-article.html' title='GWT MVP article'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-5451777023594959565</id><published>2009-12-26T16:41:00.000-08:00</published><updated>2009-12-26T17:06:54.761-08:00</updated><title type='text'>Netbeans 6.8 missing beans.xml</title><content type='html'>If you want to create a JSF 2 web app using Netbeans 6.8, you'll have to manually create a beans.xml under WEB-INF.&lt;br /&gt;&lt;br /&gt;A file with empty tags will do:&lt;br /&gt;&lt;code&gt;&amp;lt;beans&amp;gt;&amp;lt;/beans&amp;gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-5451777023594959565?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/5451777023594959565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=5451777023594959565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/5451777023594959565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/5451777023594959565'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/12/netbeans-68-missing-beansxml.html' title='Netbeans 6.8 missing beans.xml'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-1988242783581510141</id><published>2009-11-29T09:02:00.000-08:00</published><updated>2009-11-30T05:08:17.617-08:00</updated><title type='text'>Installing Flex Builder 3 with Flex 4 beta in Eclipse 3.5 on Linux</title><content type='html'>I was curious to see what Flex 4 has to offer so I decided to try installing a development environment on Ubuntu 9.10. &lt;ol&gt;&lt;br /&gt;&lt;li&gt;Install Eclipse 3.5 Galileo and &lt;a href="http://labs.adobe.com/downloads/flexbuilder_linux.html"&gt;Flex Builder for Linux alpha 5&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;There's &lt;a href="http://greylurk.com/index.php/2009/07/more-eclipse-3-5-and-flex-builder-for-linux/"&gt;an issue with Eclipse Galileo&lt;/a&gt;. Just prepend "path=" to [ECLIPSE_HOME]/links/com.adobe.flexbuilder.feature.core.link.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Apply &lt;a href="http://www.jamesward.com/2009/09/29/flex-builder-3-on-eclipse-3-5/"&gt;James Ward's patch&lt;/a&gt; (steps 2,3,4,5).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Apply &lt;a href="http://blog.danyul.id.au/?p=68"&gt;another patch&lt;/a&gt; (Stage 2: steps 5,6,7).&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;At this stage you will have a working Flex 3.x environment and of course without the design view.&lt;br /&gt;&lt;br /&gt;To use Flex 4 SDK:&lt;ol start="5"&gt;&lt;br /&gt;&lt;li&gt;Install Flash Player 10.x.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Download the &lt;a href="http://labs.adobe.com/downloads/flex4sdk.html"&gt;Flex 4 SDK&lt;/a&gt;.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Extract contents to [Linux Flex Builder install directory]/sdks/4.0.0 folder.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In Eclipse, [Window &gt; Preferences &gt; Flex &gt; Installed Flex SDKs] and add 4.0.0 to the list.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In Eclipse, right-click your project, then Properties. Under Flex Compilers, select the Flex 4 SDK and also enter "10.0.0" for "Require Flash Player version".&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;Almost there. Things will compile but the template file will not be generated under "html-template". &lt;ol start="10"&gt;&lt;br /&gt;&lt;li&gt;From [Linux Flex Builder install directory]/sdks/4.0.0/templates/swfobject folder, copy /history, index.template.html and swfobject.js files to your project's "html-template" folder.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;When running, Flex Builder complains about Flash player 9. Just click through the alerts and the browser will run displaying your app.&lt;br /&gt;&lt;br /&gt;Phew!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-1988242783581510141?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/1988242783581510141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=1988242783581510141' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/1988242783581510141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/1988242783581510141'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/11/installing-flex-builder-3-with-flex-4.html' title='Installing Flex Builder 3 with Flex 4 beta in Eclipse 3.5 on Linux'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-324613052336449636</id><published>2009-09-27T08:12:00.000-07:00</published><updated>2009-09-27T09:04:07.367-07:00</updated><title type='text'>Sitebricks babysteps</title><content type='html'>I just finished playing with &lt;a href="http://code.google.com/p/google-sitebricks/"&gt;Google Sitebricks&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Setting it up was straightforward: checkout and compile the sources, then add the sitebricks library to your web project. You'll also need a few dependencies: aopalliance, google-collect, guice and guice-servlet. These were the bare minimum libraries I used that didn't cause errors.&lt;br /&gt;&lt;br /&gt;Each template is backed by a java object of the same name. I suppose it's like .NET's code-behind. You can define the url mapping to your object with @At("/path/to/object"). Handling get and post requests is done by, you guessed it, annotating methods with @Get or @Post.&lt;br /&gt;&lt;br /&gt;I like how you can define a component/widget and inject it into an xhtml template with an annotation. Adding a component/widget is as simple as adding @MyDataGrid or whatever you called it.&lt;br /&gt;&lt;br /&gt;From my little sitebricks baby steps, I feel like I will need to learn Guice. I will start reading &lt;a href="http://manning.com/prasanna/"&gt;Dependency Injection&lt;/a&gt;, written by Mr. Sitebricks himself &lt;a href="http://twitter.com/dhanji"&gt;Dhanji R. Prasanna&lt;/a&gt;. This will probably help with understanding Guice's GWT cousin, &lt;a href="http://code.google.com/p/google-gin/"&gt;GIN&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-324613052336449636?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/324613052336449636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=324613052336449636' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/324613052336449636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/324613052336449636'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/09/sitebricks-babysteps.html' title='Sitebricks babysteps'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-6241247700379311300</id><published>2009-08-12T15:30:00.000-07:00</published><updated>2009-08-12T16:00:55.307-07:00</updated><title type='text'>GWT - Thoughts</title><content type='html'>Here are some thoughts about GWT after creating a simple Ebay browsing/bookmarking application.&lt;br /&gt;&lt;br /&gt;I looked at using SmartGWT or GXT but I didn't like having code with too many dependencies. Using pure GWT feels like you're coding to the metal. More widgets would be nice but it's not the end of the world.&lt;br /&gt;&lt;br /&gt;I found the lack of an MVC framework to be more critical. If you want to organize your code properly you'll quickly find yourself creating an MVC framework or googling for one. I was using &lt;a href="http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/event/shared/HandlerManager.html"&gt;HandlerManager&lt;/a&gt; to handle events fired from components. &lt;br /&gt;&lt;br /&gt;I think GWT has a very good future. &lt;a href="http://code.google.com/p/sfeir/wiki/UIBinderEN"&gt;UiBinder&lt;/a&gt; looks interesting: declarative widgets. GWT 2.0 should be a good release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-6241247700379311300?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/6241247700379311300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=6241247700379311300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6241247700379311300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6241247700379311300'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/08/gwt-thoughts.html' title='GWT - Thoughts'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-396707068224032255</id><published>2009-06-09T15:30:00.000-07:00</published><updated>2009-06-09T15:43:46.968-07:00</updated><title type='text'>Google Sitebricks</title><content type='html'>It seems Google is working on a RESTful web framework called Sitebricks.&lt;br /&gt;&lt;br /&gt;The slides are from the presentation &lt;a href="http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-4062&amp;yr=2009&amp;track=javaee"&gt;Building Enterprise Java Technology-Based Web Apps with Google Open-Source Technology&lt;/a&gt; at JavaOne.&lt;br /&gt;&lt;br /&gt;According to the slides, Sitebricks pages are template + POJO couples.&lt;br /&gt;&lt;br /&gt;Compile time warnings, dynamic RESTful URLs, annotated templates, reusable page widgets.&lt;br /&gt;&lt;br /&gt;I guess one can use any AJAX framework and wrap it up as a Sitebricks widget? And then use it in GWT?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-396707068224032255?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/396707068224032255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=396707068224032255' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/396707068224032255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/396707068224032255'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/06/google-sitebricks.html' title='Google Sitebricks'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-8572885994793194050</id><published>2009-06-07T15:21:00.000-07:00</published><updated>2009-06-07T15:45:51.355-07:00</updated><title type='text'>GWT Overlay Types</title><content type='html'>I read an interesting blog post about GWT Overlay Types: &lt;a href="http://googlewebtoolkit.blogspot.com/2008/08/getting-to-really-know-gwt-part-2.html"&gt;Getting to really know GWT, Part 2: JavaScript Overlay Types&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I was manipulating JavaScriptObjects to get at the json properties. With overlay types, custom POJOs can be used instead. Very nice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-8572885994793194050?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/8572885994793194050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=8572885994793194050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8572885994793194050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8572885994793194050'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/06/gwt-overlay-types.html' title='GWT Overlay Types'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-8785963863192664122</id><published>2009-05-10T14:37:00.000-07:00</published><updated>2009-05-10T14:59:15.072-07:00</updated><title type='text'>GWT, SmartGWT and Flex</title><content type='html'>I used a GWT widget library called &lt;a href="http://code.google.com/p/smartgwt/"&gt;SmartGWT&lt;/a&gt; to create a nicer looking version of my simple Ebay search application.&lt;br /&gt;&lt;br /&gt;I didn't realize how big libraries like these are. 3 MB of javascript and CSS files are required to render a simple grid in 4 seconds.&lt;br /&gt;&lt;br /&gt;The same app using stock GWT is only 100 KB and took 2 seconds to render.&lt;br /&gt;&lt;br /&gt;For Flex, the swf file is 573 KB and takes under 1 second to render.&lt;br /&gt;&lt;br /&gt;I'm starting to lean a little towards using Flex over GWT. But I will continue investigating stock GWT.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-8785963863192664122?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/8785963863192664122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=8785963863192664122' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8785963863192664122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8785963863192664122'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/05/gwt-smartgwt-and-flex.html' title='GWT, SmartGWT and Flex'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-466010245535531872</id><published>2009-05-03T09:18:00.000-07:00</published><updated>2009-05-03T12:43:53.279-07:00</updated><title type='text'>GWT and Flex</title><content type='html'>I was curious to see the differences between a very simple GWT application versus the same app using Flex.&lt;br /&gt;&lt;br /&gt;The app returns ten items from Ebay and displays a thumbnail image and a couple of properties, like title and end time, in a grid.&lt;br /&gt;&lt;br /&gt;I was using Ebay's &lt;a href="http://developer.ebay.com/products/shopping/"&gt;Shopping API&lt;/a&gt; using REST and JSON as a return format.&lt;br /&gt;&lt;br /&gt;For Flex, making the RESTful call is straightforward:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;div style='font-family: Courier New;'&gt;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;mx:HTTPService&lt;/span&gt;&amp;nbsp;&lt;span style=' color: Red;'&gt;url&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;{URL}&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;id&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;service&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;result&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;onJSONComplete(event)&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;fault&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;jsonFault(event)&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;resultFormat&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;text&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;method&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;GET&lt;/span&gt;"&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;mx:request&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;appid&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;{APPID}&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;appid&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;ResponseEncoding&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;JSON&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;ResponseEncoding&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;MaxEntries&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;10&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;MaxEntries&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;CallName&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;FindItemsAdvanced&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;CallName&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;SortOrder&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;Descending&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;SortOrder&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;ItemSort&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;BestMatchPlusPrice&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;ItemSort&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;IncludeSelector&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;Details,ItemSpecifics&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;IncludeSelector&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;DescriptionSearch&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;true&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;DescriptionSearch&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;version&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;517&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;version&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;siteid&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;0&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;siteid&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;QueryKeywords&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;{searchString}&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;QueryKeywords&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;mx:request&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;mx:HTTPService&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The Flex datagrid component doesn't support nested properties. So I had to use a Nested Data Grid from &lt;a href="http://natescodevault.com/?p=61"&gt;Nate's Code Vault&lt;/a&gt;. For simplicity, I removed some code:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;div style='font-family: Courier New;'&gt;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;nross:NestedDataGrid&lt;/span&gt;&amp;nbsp;&lt;span style=' color: Red;'&gt;id&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;grid&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;rowCount&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;10&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;variableRowHeight&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;true&lt;/span&gt;"&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;nross:columns&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;mx:DataGridColumn&lt;/span&gt;&amp;nbsp;&lt;span style=' color: Red;'&gt;headerText&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;#&lt;/span&gt;"&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;mx:itemRenderer&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;mx:Component&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;mx:Image&lt;/span&gt;&amp;nbsp;&lt;span style=' color: Red;'&gt;source&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;{data.GalleryURL}&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;scaleContent&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;false&lt;/span&gt;"&amp;nbsp;/&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;mx:Component&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;mx:itemRenderer&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;mx:DataGridColumn&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;mx:DataGridColumn&lt;/span&gt;&amp;nbsp;&lt;span style=' color: Red;'&gt;headerText&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;Title&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;dataField&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;Title&lt;/span&gt;"/&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;&lt;span style=' color: Maroon;'&gt;mx:DataGridColumn&lt;/span&gt;&amp;nbsp;&lt;span style=' color: Red;'&gt;headerText&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;End&lt;/span&gt;"&amp;nbsp;&lt;span style=' color: Red;'&gt;dataField&lt;/span&gt;="&lt;span style=' color: Blue;'&gt;EndTime&lt;/span&gt;"&amp;nbsp;&amp;nbsp;/&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;nross:columns&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt; &lt;BR /&gt;&lt;span style=' color: Blue;'&gt;&amp;lt;&lt;/span&gt;/&lt;span style=' color: Maroon;'&gt;nross:NestedDataGrid&lt;/span&gt;&lt;span style=' color: Blue;'&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;For GWT, you will come across the &lt;a href="http://en.wikipedia.org/wiki/Same_origin_policy"&gt;same origin policy&lt;/a&gt;. A &lt;a href="http://eggsylife.blogspot.com/2008/10/gwt-and-cross-site-jsonp-in-j2ee.html"&gt;work around&lt;/a&gt; requires writing a few utility classes. Here's the code to call and populate a grid:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;div style='font-family: Courier New;'&gt;JSONRequest.get(ebay_search_url,&amp;nbsp;&lt;span style=' color: Blue;'&gt;new&lt;/span&gt;&amp;nbsp;JSONRequestHandler(){ &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;@Override &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=' color: Blue;'&gt;void&lt;/span&gt;&amp;nbsp;onRequestComplete(JavaScriptObject&amp;nbsp;jso)&amp;nbsp;{ &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Map&amp;lt;String,&amp;nbsp;String&amp;gt;[]&amp;nbsp;results&amp;nbsp;=&amp;nbsp;JSONEbayParser.parseToArray(jso); &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=' color: Blue;'&gt;for&lt;/span&gt;(&lt;span style=' color: Blue;'&gt;int&lt;/span&gt;&amp;nbsp;row=&lt;span style=' color: Maroon;'&gt;0&lt;/span&gt;;&amp;nbsp;row&amp;nbsp;&amp;lt;&amp;nbsp;results.length;&amp;nbsp;row++){ &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;g.setWidget(row,&amp;nbsp;&lt;span style=' color: Maroon;'&gt;0&lt;/span&gt;,&amp;nbsp;&lt;span style=' color: Blue;'&gt;new&lt;/span&gt;&amp;nbsp;Image(results[row].get(&lt;span style=' color: Maroon;'&gt;"GalleryURL"&lt;/span&gt;))); &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;g.setText(row,&amp;nbsp;&lt;span style=' color: Maroon;'&gt;1&lt;/span&gt;,&amp;nbsp;results[row].get(&lt;span style=' color: Maroon;'&gt;"Title"&lt;/span&gt;)); &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;g.setText(row,&amp;nbsp;&lt;span style=' color: Maroon;'&gt;2&lt;/span&gt;,&amp;nbsp;results[row].get(&lt;span style=' color: Maroon;'&gt;"EndTime"&lt;/span&gt;)); &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;g.setVisible(&lt;span style=' color: Maroon;'&gt;true&lt;/span&gt;); &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;});&lt;/div&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Using &lt;a href="http://getfirebug.com/"&gt;Firefug&lt;/a&gt;, the REST call takes between 500ms to 1 second to complete. No framework is necessarily quicker. For this example, rendering times are minimal compared to network calls.&lt;br /&gt;&lt;br /&gt;The GWT code is more concise. It required some utility classes to work around the same origin policy. I'm surprised this functionality isn't builtin. Also, to interact with Ebay, I would need to manipulate the URL string. Not a big deal, but it's just another step to worry about. But I like that GWT outputs pure HTML.&lt;br /&gt;&lt;br /&gt;The Flex code is more readable and coding is intuitive. Also, Flex provides functionality out of the box.&lt;br /&gt;&lt;br /&gt;I'm not sure which version I prefer. Neither are bad nor perfect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-466010245535531872?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/466010245535531872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=466010245535531872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/466010245535531872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/466010245535531872'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/05/gwt-and-flex.html' title='GWT and Flex'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-4642700563885363511</id><published>2009-04-26T08:46:00.000-07:00</published><updated>2009-04-26T09:05:32.627-07:00</updated><title type='text'>Eclipse 3.4.2 crashes on Ubuntu 9.04 with Firefox 3.5</title><content type='html'>After installing Ubuntu 9.04 I installed the latest jdk and eclipse 3.4.2.&lt;br /&gt;&lt;br /&gt;Eclipse was crashing after the splash window.&lt;br /&gt;&lt;br /&gt;It turns out that xulrunner 1.9.1 in Firefox 3.5 is the cause: &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=268651"&gt;Bug 268651&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;I installed Firefox 3.5 because I didn't like the version that came with Ubuntu. Going back to the default Firefox 3.0.9 fixed things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-4642700563885363511?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/4642700563885363511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=4642700563885363511' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/4642700563885363511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/4642700563885363511'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/04/eclipse-342-crashes-on-ubuntu-904-with.html' title='Eclipse 3.4.2 crashes on Ubuntu 9.04 with Firefox 3.5'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-6523663501422969341</id><published>2009-04-08T15:37:00.000-07:00</published><updated>2009-04-08T16:04:38.148-07:00</updated><title type='text'>Google App Engine for Java</title><content type='html'>I just got my account for &lt;a href="http://code.google.com/appengine/docs/java/overview.html"&gt;Google App Engine for Java&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To verify the account, you have to supply a mobile phone number where a text message is sent with a code.&lt;br /&gt;&lt;br /&gt;So, now I have a new toy to play with :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-6523663501422969341?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/6523663501422969341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=6523663501422969341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6523663501422969341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6523663501422969341'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/04/google-app-engine-for-java.html' title='Google App Engine for Java'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-5949451933105744847</id><published>2009-04-04T12:45:00.000-07:00</published><updated>2009-04-04T12:53:56.707-07:00</updated><title type='text'>Ext GWT 1.2.3 - missing images</title><content type='html'>It seems that there are missing images in &lt;a href="http://extjs.com/products/gxt/"&gt;Ext GWT 1.2.3 SDK&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You can find the missing images in &lt;a href="http://extjs.com/products/extjs/download.php"&gt;Ext JS 2.2.1 SDK&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-5949451933105744847?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/5949451933105744847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=5949451933105744847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/5949451933105744847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/5949451933105744847'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/04/ext-gwt-123-missing-images.html' title='Ext GWT 1.2.3 - missing images'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-22690775544417183</id><published>2009-03-12T17:56:00.000-07:00</published><updated>2009-03-12T18:11:34.052-07:00</updated><title type='text'>GWT: persistence?</title><content type='html'>With validation covered, the next piece of the GWT puzzle is how to handle persistence.&lt;br /&gt;&lt;br /&gt;I read that it's possible to use &lt;a href="http://www.grails.org/GORM"&gt;GORM&lt;/a&gt; &lt;a href="http://www.grails.org/GORM+-+StandAlone+Gorm"&gt;outside of Grails&lt;/a&gt;. With the pace of development around GWT, I expect a gwt-gorm library to pop up online.&lt;br /&gt;&lt;br /&gt;However, this library is probably more relevant: &lt;a href="http://noon.gilead.free.fr/gilead/"&gt;Gilead&lt;/a&gt;. This library "allows you to directly call your Spring services from the GWT client side".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-22690775544417183?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/22690775544417183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=22690775544417183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/22690775544417183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/22690775544417183'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/03/gwt-persistence.html' title='GWT: persistence?'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-3329942915415880011</id><published>2009-03-11T16:24:00.001-07:00</published><updated>2009-03-11T16:31:12.111-07:00</updated><title type='text'>GWT: no builtin validation?</title><content type='html'>I'm surprised that it doesn't have validation out of the box.&lt;br /&gt;&lt;br /&gt;I found &lt;a href="http://code.google.com/p/gwt-validation/"&gt;gwt-validation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And, it appears that the development team is working on adding validation: &lt;a href="http://groups.google.com/group/Google-Web-Toolkit-Contributors/msg/4f3f9a51dc1da74e"&gt;http://groups.google.com/group/Google-Web-Toolkit-Contributors/msg/4f3f9a51dc1da74e&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-3329942915415880011?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/3329942915415880011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=3329942915415880011' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/3329942915415880011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/3329942915415880011'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/03/gwt-no-builtin-validation.html' title='GWT: no builtin validation?'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7751680279776218973</id><published>2009-03-09T13:45:00.001-07:00</published><updated>2009-03-09T14:07:25.697-07:00</updated><title type='text'>GWT</title><content type='html'>I think I may have finally settled on which web frameworks to learn: GWT, Grails, JSF 2. &lt;br /&gt;&lt;br /&gt;So, I'm looking at Google Web Toolkit while waiting for JSF 2 final to be released and for JavaFX to release their JWebPane component.&lt;br /&gt;&lt;br /&gt;I'm reading &lt;a href="http://www.amazon.ca/Beginning-Google-Web-Toolkit-Professional/dp/1430210311"&gt;Beginning Google Web Toolkit: From Novice to Professional&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;It might be getting obsolete already since an example in the book is generating depecration warnings.&lt;br /&gt;&lt;br /&gt;I'm using &lt;a href="http://code.google.com/p/google-web-toolkit/downloads/list?can=1&amp;amp;q=1.6+Milestone+2"&gt;GWT 1.6 M2&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;From:&lt;code&gt;&lt;br /&gt;button.addClickListener(new ClickListener() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void onClick(Widget sender) {}&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To:&lt;code&gt;&lt;br /&gt;button.addClickHandler(new ClickHandler(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void onClick(ClickEvent event){}&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Regardless, I find it to be a good introductory book. I'm also looking forward to using the 3rd party UI library &lt;a href="http://extjs.com/products/gxt/"&gt;Ext GWT&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7751680279776218973?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7751680279776218973/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7751680279776218973' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7751680279776218973'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7751680279776218973'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/03/gwt.html' title='GWT'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7824456755811616255</id><published>2009-03-02T19:06:00.000-08:00</published><updated>2009-03-02T19:47:50.563-08:00</updated><title type='text'>JavaFX - Particles in a box</title><content type='html'>I wanted to model a classic black body using JavaFX. I ended up creating a box with many particles to see how the velocity distribution evolves over time.&lt;br /&gt;&lt;br /&gt;Ideally, the more particles the better. But JavaFX becomes really choppy with more particles.&lt;br /&gt;&lt;br /&gt;Anyway, here's a rough draft. Black is low velocity, pink is high velocity.&lt;br /&gt;&lt;br /&gt;Phys2d is picky. High initial velocities will cause particles to fly through the boundaries. So, I had to use low velocities. There are no frictional losses and the coefficient of restitution of all collisions is purely elastic.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_OskJl8dj1LE/SayoBdWdavI/AAAAAAAAADc/c4jn30a0Fl4/s1600-h/blackbox.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 299px; height: 300px;" src="http://1.bp.blogspot.com/_OskJl8dj1LE/SayoBdWdavI/AAAAAAAAADc/c4jn30a0Fl4/s400/blackbox.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5308802803775138546" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://frank.bruni.googlepages.com/BlackBox.jnlp"&gt;Box with particles with no energy loss&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7824456755811616255?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7824456755811616255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7824456755811616255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7824456755811616255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7824456755811616255'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/03/javafx-black-body.html' title='JavaFX - Particles in a box'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_OskJl8dj1LE/SayoBdWdavI/AAAAAAAAADc/c4jn30a0Fl4/s72-c/blackbox.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7198496827169188401</id><published>2009-02-22T15:37:00.001-08:00</published><updated>2009-02-22T15:50:40.433-08:00</updated><title type='text'>JWebPane?</title><content type='html'>I was looking to embed Google Maps in JavaFX but discovered that JWebPane has still to make its appearance.&lt;br /&gt;&lt;br /&gt;JWebPane is a WebKit based browser component for Java. It was supposed to be available "soon". But that was months ago. This &lt;a href="http://weblogs.java.net/blog/alex2d/archive/2008/12/jwebpane_projec_1.html"&gt;blog post&lt;/a&gt; has some details.&lt;br /&gt;&lt;br /&gt;With this component, JavaFX becomes more like Adobe Air: a runtime that encapsulates a browser.&lt;br /&gt;&lt;br /&gt;Also, it looks like Webkit is the browser of choice for mobile OSes. We have the iPhone/iTouch, Android and now JavaFX.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7198496827169188401?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7198496827169188401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7198496827169188401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7198496827169188401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7198496827169188401'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/02/jwebpane.html' title='JWebPane?'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-111090711721498461</id><published>2009-02-04T17:03:00.000-08:00</published><updated>2009-02-04T17:12:01.146-08:00</updated><title type='text'>Genetic Algorithms</title><content type='html'>Over the last two weeks, I got sidetracked by articles about neural networks. This led to genetic algorithms. Which led me to read &lt;a href="http://www.amazon.com/Introduction-Genetic-Algorithms-Complex-Adaptive/dp/0262631857"&gt;An Introduction to Genetic Algorithms&lt;/a&gt;. Interesting stuff. &lt;br /&gt;&lt;br /&gt;Out of curiosity, I'm coding a basic algorithm. When I'm done, I'm hoping to have an idea where I can use genetic algorithms with JavaFX.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-111090711721498461?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/111090711721498461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=111090711721498461' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/111090711721498461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/111090711721498461'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/02/genetic-algorithms.html' title='Genetic Algorithms'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-4783118517688856244</id><published>2009-01-22T16:02:00.000-08:00</published><updated>2009-01-22T16:16:57.482-08:00</updated><title type='text'>Swing Explorer and JavaFX</title><content type='html'>I wanted to see what was being rendered which caused the choppiness issue with a test JavaFX app.&lt;br /&gt;&lt;br /&gt;This is the code I used to run swing explorer:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;javafx -cp PATH_TO_PROJECT_JAR;%CLASSPATH% org.swingexplorer.Launcher javafx1.Physics&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And this is the result:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_OskJl8dj1LE/SXkKKsSfxVI/AAAAAAAAACs/zJNLoN7uULM/s1600-h/swingexplorer1.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 221px;" src="http://1.bp.blogspot.com/_OskJl8dj1LE/SXkKKsSfxVI/AAAAAAAAACs/zJNLoN7uULM/s320/swingexplorer1.JPG" alt="" id="BLOGGER_PHOTO_ID_5294274015754437970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Swing explorer can only go down as far as the content pane, JSGPanelImpl.&lt;br /&gt;&lt;br /&gt;Still investigating.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-4783118517688856244?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/4783118517688856244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=4783118517688856244' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/4783118517688856244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/4783118517688856244'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/01/swing-explorer-and-javafx.html' title='Swing Explorer and JavaFX'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_OskJl8dj1LE/SXkKKsSfxVI/AAAAAAAAACs/zJNLoN7uULM/s72-c/swingexplorer1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-8768115574600517496</id><published>2009-01-10T14:26:00.002-08:00</published><updated>2009-01-10T16:23:21.613-08:00</updated><title type='text'>Swinging chain in JavaFX</title><content type='html'>Simulating a chain using Phys2d is a simple extension of a single pendulum.&lt;br /&gt;&lt;br /&gt;I used an array of positions instead of working with individual positions.&lt;br /&gt;&lt;br /&gt;I tried using 100 links but JavaFX was very choppy. I settled on 60 links.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://frank.bruni.googlepages.com/Chain.jnlp"&gt;JavaFX swinging chain webstart application&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://frank.bruni.googlepages.com/srcChain.rar"&gt;Source files&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To isolate the choppiness issue, I tried using &lt;a href="https://swingexplorer.dev.java.net/"&gt;swing explorer&lt;/a&gt;. But I couldn't get it to work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-8768115574600517496?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/8768115574600517496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=8768115574600517496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8768115574600517496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8768115574600517496'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2009/01/swinging-rope-and-javafx.html' title='Swinging chain in JavaFX'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-3480323372652465477</id><published>2008-12-25T08:30:00.000-08:00</published><updated>2008-12-25T08:44:57.647-08:00</updated><title type='text'>JavaFX - line tracing path</title><content type='html'>I wanted to trace the motion of one of the pendulums from the previous post's example.&lt;br /&gt;&lt;br /&gt;I added the following code in the &lt;code&gt;Timeline&lt;/code&gt; to plot each point of the motion. After a minute, the animation became very choppy and I was forced to close the window.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;insert LineTo{ x: x + translateX   y: y + translateY } into path.elements;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I guess adding a line segment every 16ms eventually overwhelms it. After 60s, that's 1000 LineTos. Big, but not crazy.&lt;br /&gt;&lt;br /&gt;I will investigate further.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-3480323372652465477?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/3480323372652465477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=3480323372652465477' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/3480323372652465477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/3480323372652465477'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/12/javafx-line-tracing-path.html' title='JavaFX - line tracing path'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-2906153939955400281</id><published>2008-12-23T18:38:00.001-08:00</published><updated>2009-01-08T15:34:27.597-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='phys2d'/><category scheme='http://www.blogger.com/atom/ns#' term='javafx'/><title type='text'>JavaFX and  Phys2d</title><content type='html'>I started investigating JavaFX. Support in Netbeans 6.5 is good.&lt;br /&gt;&lt;br /&gt;As a learning exercise, I wanted to create a double pendulum example. I used &lt;a href="http://www.cokeandcode.com/phys2d/"&gt;Phy2d&lt;/a&gt; to model the system.&lt;br /&gt;&lt;br /&gt;The issue I had at first was initializing the world in the incorrect sequence. You should add your bodies to the world as soon as you create them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First, I modeled the pendulums:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;//gravity set to 10g&lt;br /&gt;World w = new World(new Vector2f(0.0f, 100.0f), 20);&lt;br /&gt;&lt;br /&gt;//create a static object that holds the pendulums&lt;br /&gt;StaticBody anchor = new StaticBody("anchor", new Box(2.0f, 2.0f));&lt;br /&gt;anchor.setPosition(0.0f, 0.0f);&lt;br /&gt;w.add(anchor);&lt;br /&gt;&lt;br /&gt;//create the 1st ball&lt;br /&gt;Body ball1 = new Body("ball1", new Circle(0.10f), 300.0f);&lt;br /&gt;ball1.setPosition(100.0f, 100.0f);&lt;br /&gt;w.add(ball1);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//create the 2nd ball&lt;br /&gt;Body ball2 = new Body("ball2", new Circle(0.10f), 25.0f);&lt;br /&gt;ball2.setPosition(150.0f, 250.0f);&lt;br /&gt;ball2.adjustVelocity(new Vector2f(-120.0f, 0.0f));&lt;br /&gt;w.add(ball2);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//create the spring between the anchor and the 1st ball&lt;br /&gt;SpringJoint joint1 = new SpringJoint(anchor, ball1, new Vector2f(0.0f, 0.0f), new Vector2f(100.0f, 100.0f));&lt;br /&gt;joint1.setCompressedSpringConst(300.0f);&lt;br /&gt;joint1.setStretchedSpringConst(300.0f);&lt;br /&gt;joint1.setSpringSize(50.0f);&lt;br /&gt;w.add(joint1);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//create the connection between the 1st and 2nd ball&lt;br /&gt;BasicJoint joint2 = new BasicJoint(ball1, ball2, new Vector2f(ball1.getPosition().getX(), ball1.getPosition().getY()));&lt;br /&gt;w.add(joint2);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can add friction, damping and even wind to the system. Calling World.step() will incrementally step through the states of the system. According to the documentation, the steps occur at 1/60 seconds.&lt;br /&gt;&lt;br /&gt;To do animation in JavaFX, you need to create a Timeline:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;var timer = Timeline {&lt;br /&gt;    repeatCount: Timeline.INDEFINITE&lt;br /&gt;    keyFrames: KeyFrame {&lt;br /&gt;        time: 0.01667s // this is the default time step of phys2d&lt;br /&gt;        action: function(){&lt;br /&gt;            x = p.getBall().getPosition().getX();&lt;br /&gt;            y = p.getBall().getPosition().getY();&lt;br /&gt;&lt;br /&gt;            x2 = p.getBall2().getPosition().getX();&lt;br /&gt;            y2 = p.getBall2().getPosition().getY();&lt;br /&gt;&lt;br /&gt;            p.doStep(); // get the next state after getting the body positions&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Drawing the pendulums is easy:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Rectangle{&lt;br /&gt;   width: 100&lt;br /&gt;   height: 5&lt;br /&gt;   translateX: translateX - 50&lt;br /&gt;   translateY: translateY&lt;br /&gt;},&lt;br /&gt;&lt;br /&gt;Line {&lt;br /&gt;   startX: translateX  startY: translateY&lt;br /&gt;   endX: bind x + translateX&lt;br /&gt;   endY: bind y + translateY&lt;br /&gt;},&lt;br /&gt;&lt;br /&gt;Circle {&lt;br /&gt;   centerX: bind x + translateX&lt;br /&gt;   centerY: bind y + translateY&lt;br /&gt;   radius: 5&lt;br /&gt;   fill: Color.BLACK&lt;br /&gt;},&lt;br /&gt;&lt;br /&gt;Line {&lt;br /&gt;   startX: bind x + translateX&lt;br /&gt;   startY: bind y + translateY&lt;br /&gt;   endX: bind x2 + translateX&lt;br /&gt;   endY: bind y2 + translateY&lt;br /&gt;},&lt;br /&gt;            &lt;br /&gt;Circle {&lt;br /&gt;   centerX: bind x2 + translateX&lt;br /&gt;   centerY: bind y2 + translateY&lt;br /&gt;   radius: 5&lt;br /&gt;   fill: Color.BLACK&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Creating scenes is simple and intuitive. Being able to use existing java libraries is huge. I think JavaFX has the advantage over Flex or Silverlight because of this. I can't wait to see what JavaFX 2.0 has to offer.&lt;br /&gt;&lt;br /&gt;Here's the webstart demo of what I have so far. The app with the Phys2d library is 37KB using Pack200 Compression.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://frank.bruni.googlepages.com/Physics.jnlp"&gt;JavaFX double pendulum webstart application&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;UPDATE: Jan 08, 2009&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;Here's the Netbeans 6.5 src: &lt;a href="http://frank.bruni.googlepages.com/src.rar"&gt;src.rar&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Just 2 files. The code can be cleaned up significantly. Also, you'll need to include the Phys2d jar in your project.&lt;br /&gt;&lt;br /&gt;I decided to code the simulation in Java because the Phys2d libraries uses floats everywhere.  JavaFX doesn't recognize the floats directly. I didn't want to worry with casting floats to Number and vice versa.&lt;br /&gt;&lt;br /&gt;Also, Phys2d uses a method called step(). It's also a keyword in JavaFX. Netbeans complains if you try to run the simulation, world.step(), in JavaFX.&lt;br /&gt;&lt;br /&gt;However, separating the simulation and the presentation is good practice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-2906153939955400281?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/2906153939955400281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=2906153939955400281' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/2906153939955400281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/2906153939955400281'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/12/javafx-and-phys2d.html' title='JavaFX and  Phys2d'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-1775402714631213181</id><published>2008-11-30T05:16:00.001-08:00</published><updated>2008-11-30T05:16:44.433-08:00</updated><title type='text'>Grails + JPA</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Getting Grails to use existing EJB3 entity beans is not as difficult as I thought it would be.&lt;br /&gt;&lt;br /&gt;I have entity beans, created months ago, modeled on Northwind database. After reading the article &lt;a href='http://www.infoq.com/articles/grails-ejb-tutorial'&gt;Grails + EJB Domain Models Step-by-Step&lt;/a&gt;, it was just a matter of dropping the existing source under src/java, editing a config file, then creating the controllers and views with &lt;strong&gt;grails generate-controller&lt;/strong&gt; and &lt;strong&gt;grails generate-views&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;I still need to tweak the code to get the gsps to display the entity relationships properly and to get the blobs to render as images.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-1775402714631213181?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/1775402714631213181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=1775402714631213181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/1775402714631213181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/1775402714631213181'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/11/grails-jpa.html' title='Grails + JPA'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7769913513582636747</id><published>2008-11-24T18:08:00.000-08:00</published><updated>2008-11-24T18:53:34.731-08:00</updated><title type='text'>Ubuntu 8.10 on Dell E1705</title><content type='html'>I decided to install Ubuntu 8.10 on my Dell Inspiron E1705.&lt;br /&gt;&lt;br /&gt;However, compiz fusion caused the screen to go crazy. So, no fancy effects.&lt;br /&gt;&lt;br /&gt;One of the first apps I installed is &lt;a href="http://checkgmail.sourceforge.net/"&gt;CheckGmail&lt;/a&gt;. It does what you think it does. It sits in the panel and alerts you of new email. But by mousing over the icon, you can open, mark as read, archive, and delete emails. I don't think there's a Windows equivalent.&lt;br /&gt;&lt;br /&gt;I also decided to start playing with grails while waiting for JavaFX 1.0 to be released. &lt;i&gt;Beginning Groovy and Grails From Novice to Professional&lt;/i&gt; is a nice accompaniment.&lt;br /&gt;&lt;br /&gt;Incidently, Netbeans 6.5 is really nice. It has awesome grails support.&lt;br /&gt;&lt;br /&gt;Btw, does anyone know of a sample database that I can use? I'd like some data to work with while playing with grails.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7769913513582636747?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7769913513582636747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7769913513582636747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7769913513582636747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7769913513582636747'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/11/i-installed-ubuntu-810-on-dell-e1705.html' title='Ubuntu 8.10 on Dell E1705'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7516267652281529571</id><published>2008-10-25T15:49:00.000-07:00</published><updated>2008-11-15T04:11:01.370-08:00</updated><title type='text'>Java and E4X</title><content type='html'>I needed to modify an xml document. So, I decided to use E4X.&lt;br /&gt;&lt;br /&gt;I had to install the latest Rhino 1.7 R1 release since the version which ships with the JDK doesn't support E4X.&lt;br /&gt;&lt;br /&gt;I also downloaded the &lt;a href="http://www.ecma-international.org/publications/standards/Ecma-357.htm"&gt;ECMAScript for XML (E4X) Specification&lt;/a&gt;. A very helpful document.&lt;br /&gt;&lt;br /&gt;Rather than run the shell from the command line, I created a simple class which runs the shell from Eclipse. This way the shell runs in the console with its user friendly input, such as copy/paste.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Running the shell from Eclipse&lt;/strong&gt;&lt;br /&gt;In your main method:&lt;br /&gt;&lt;code&gt;org.mozilla.javascript.tools.shell.Main.main(new String[0]);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The shell is very cool. You can mix Javascript with Java classes.&lt;br /&gt;&lt;br /&gt;The following code will return the current date and time:&lt;code&gt;&lt;br /&gt;js &gt; importPackage(java.util);&lt;br /&gt;js &gt; new Date();&lt;br /&gt;Sat Oct 25 2008 15:36:16 GMT-0400 (EDT)&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can also use collections. This will add some strings to a list then print them out:&lt;code&gt;&lt;br /&gt;js &gt; importPackage(java.util);&lt;br /&gt;js &gt; var list = new ArraysList();&lt;br /&gt;js &gt; list.add("one"); list.add("two"); list.add("three"); &lt;br /&gt;js &gt; list; &lt;br /&gt;[one, two, three]&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can also use maps:&lt;code&gt;&lt;br /&gt;js &gt; importPackage(java.util);&lt;br /&gt;js &gt; var map = new HashMap();&lt;br /&gt;js &gt; map.put("one", 1); map.put("two", 2); map.put("three", 3);  &lt;br /&gt;js &gt; map; &lt;br /&gt;{two=2.0, one=1.0, three=3.0}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;E4X&lt;/strong&gt;&lt;br /&gt;To load an xml document I first load the file into a string then convert the string to xml:&lt;code&gt;&lt;br /&gt;var doc = readFile("C:/path/to/document/file.xml");&lt;br /&gt;var xml = new XML(doc);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Mozilla &lt;a href="http://www.mozilla.org/rhino/perf.html"&gt;recommends&lt;/a&gt; using &lt;code&gt;var&lt;/code&gt; statements when declaring variables as it can speed up the code.&lt;br /&gt;&lt;code&gt;&lt;br /&gt; &amp;lt;world&amp;gt;&lt;br /&gt;  &amp;lt;continent id="europe" name="Europe"&amp;gt;&lt;br /&gt; &lt;br /&gt;  &amp;lt;continent id="asia" name="Asia"&amp;gt;&lt;br /&gt; &lt;br /&gt;  &amp;lt;continent id="northAmerica" name="North America"&amp;gt;&lt;br /&gt; &lt;br /&gt;  &amp;lt;continent id="australia" name="Australia/Oceania"&amp;gt;&lt;br /&gt; &lt;br /&gt;  &amp;lt;continent id="southAmerica" name="South America"&amp;gt;&lt;br /&gt; &lt;br /&gt;  &amp;lt;continent id="africa" name="Africa"&amp;gt;&lt;br /&gt; &amp;lt;/world&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This will return the "continent" nodes:&lt;code&gt;&lt;br /&gt;js &gt; xml.continent;&lt;br /&gt;&amp;lt;continent id="europe" name="Europe"/&amp;gt;&lt;br /&gt;&amp;lt;continent id="asia" name="Asia"/&amp;gt;&lt;br /&gt;&amp;lt;continent id="northAmerica" name="North America"/&amp;gt;&lt;br /&gt;&amp;lt;continent id="australia" name="Australia/Oceania"/&amp;gt;&lt;br /&gt;&amp;lt;continent id="southAmerica" name="South America"/&amp;gt;&lt;br /&gt;&amp;lt;continent id="africa" name="Africa"/&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can query the xml document:&lt;code&gt;&lt;br /&gt;js &gt; xml.continent.(@id == "africa").@name;&lt;br /&gt;Africa&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You can also edit the nodes:&lt;code&gt;&lt;br /&gt;js &gt; xml.continent.(@id == "africa").@name = "AFRICA RENAMED";&lt;br /&gt;js &gt; xml.continent.(@id == "africa").@name;&lt;br /&gt;AFRICA RENAMED&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To write to a file:&lt;code&gt;&lt;br /&gt;js &gt; importPackage(java.io);&lt;br /&gt;js &gt; var f = new File("C:/path/to/file.xml");&lt;br /&gt;js &gt; var w = new BufferedWriter(new FileWriter(f));&lt;br /&gt;js &gt; w.write(xml.continent);&lt;br /&gt;js &gt; w.flush();&lt;br /&gt;js &gt; w.close();&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I find E4X more intuitive than xslt for manipulating xml documents. I wonder when the JDK will ship with a full javascript engine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7516267652281529571?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7516267652281529571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7516267652281529571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7516267652281529571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7516267652281529571'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/10/java-and-e4x.html' title='Java and E4X'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-8742568407157412930</id><published>2008-10-18T07:39:00.000-07:00</published><updated>2008-10-18T15:10:40.683-07:00</updated><title type='text'>Browser benchmark - Webkit wins</title><content type='html'>I was curious to see which browser is the fastest.&lt;br /&gt;&lt;br /&gt;I used &lt;a href="http://dromaeo.com/"&gt;Dromaeo&lt;/a&gt; since it covers DOM manipulation instead of just pure Javascript performance.&lt;br /&gt;&lt;br /&gt;I tried testing IE7 but the annoying "script is running too long" alerts kept popping up. And I couldn't find the Opera nightlies. Opera 9.60 doesn't pass the Acid 3 test. For Firefox, I enabled Tracemonkey.&lt;br /&gt;&lt;br /&gt;Webkit kills the competition. And it passes the Acid 3 test.&lt;br /&gt;&lt;br /&gt;Running on Windows XP SP2, Intel Core Duo 1.66 GHz.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_OskJl8dj1LE/SPn45GGsovI/AAAAAAAAACI/yeAKBdElEws/s1600-h/Dromaeo_Benchmarks.JPG"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_OskJl8dj1LE/SPn45GGsovI/AAAAAAAAACI/yeAKBdElEws/s400/Dromaeo_Benchmarks.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5258507699706700530" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-8742568407157412930?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/8742568407157412930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=8742568407157412930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8742568407157412930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8742568407157412930'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/10/browser-benchmarks.html' title='Browser benchmark - Webkit wins'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_OskJl8dj1LE/SPn45GGsovI/AAAAAAAAACI/yeAKBdElEws/s72-c/Dromaeo_Benchmarks.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-5138888126111847864</id><published>2008-10-15T17:14:00.000-07:00</published><updated>2008-10-15T17:25:57.120-07:00</updated><title type='text'>Adobe Air, JavaFX and Lucene</title><content type='html'>I'm starting to look at JavaFX because of the huge number of libraries written in Java.&lt;br /&gt;&lt;br /&gt;The reason is because I couldn't find an Actionscript library that can read Lucene indexes. Use Lucene to index whatever on the desktop and then have Adobe Air as the front end. Oh well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-5138888126111847864?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/5138888126111847864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=5138888126111847864' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/5138888126111847864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/5138888126111847864'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/10/adobe-air-javafx-and-lucene.html' title='Adobe Air, JavaFX and Lucene'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-6824912291511974036</id><published>2008-10-14T15:22:00.000-07:00</published><updated>2008-10-14T15:37:20.666-07:00</updated><title type='text'>ID3 Java library</title><content type='html'>I'm planning on indexing thousands of Mp3 files using Lucene. I needed a library that could read ID3 tags from Mp3 files.&lt;br /&gt;&lt;br /&gt;After trying out a handful of libraries, I settled on &lt;a href="http://www.jthink.net/jaudiotagger/"&gt;Jaudiotagger&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It has the simplest API of all the libraries I tested. Light it isn't: it's 589 KB. But it also supports Mp4, Ogg Vorbis and Flac.&lt;br /&gt;&lt;br /&gt;With some of the other libraries, the programmer would need to worry about ID3 versions etc. &lt;br /&gt;&lt;br /&gt;Here's the self explanatory code to read the information:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;AudioFile af = AudioFileIO.read(new File("path/to/file"));&lt;br /&gt;AudioHeader ah = af.getAudioHeader();&lt;br /&gt;Tag tag = af.getTag();&lt;br /&gt;   &lt;br /&gt;//ah.getBitRateAsNumber()&lt;br /&gt;//ah.getTrackLength()&lt;br /&gt;//ah.getSampleRateAsNumber()&lt;br /&gt;//ah.getChannels()&lt;br /&gt;   &lt;br /&gt;//tag.getFirstAlbum()&lt;br /&gt;//tag.getFirstArtist()&lt;br /&gt;//tag.getFirstTitle()&lt;br /&gt;//tag.getFirstTrack()&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Nice and simple.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-6824912291511974036?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/6824912291511974036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=6824912291511974036' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6824912291511974036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6824912291511974036'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/10/id3-java-library.html' title='ID3 Java library'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7031205010860095132</id><published>2008-09-21T08:14:00.000-07:00</published><updated>2008-09-21T08:35:19.379-07:00</updated><title type='text'>Spring maintenance policy != good</title><content type='html'>SpringSource has announced a &lt;a href="http://www.springsource.com/node/558"&gt;new maintenance policy&lt;/a&gt; for Spring. Subscription users will receive timely updates. While the community will receive the same updates after a major release.&lt;br /&gt;&lt;br /&gt;The question is: Why would the community bother fixing bugs knowing SpringSource and the subscribers would be the ones to benefit?&lt;br /&gt;&lt;br /&gt;I don't believe the community can be dismissed so easily. Either let them all in or shut them all out. There is no half-open policy.&lt;br /&gt;&lt;br /&gt;The community will move to more open alternatives. Those alternatives will benefit and grow as the supporting community grows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7031205010860095132?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7031205010860095132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7031205010860095132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7031205010860095132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7031205010860095132'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/09/spring-maintenance-policy-good.html' title='Spring maintenance policy != good'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-1866833764111536816</id><published>2008-09-12T17:42:00.000-07:00</published><updated>2008-09-14T08:45:12.551-07:00</updated><title type='text'>A couple of books</title><content type='html'>I've just started reading &lt;em&gt;Effective Java&lt;/em&gt; 2nd Edition. A few blogs have recommended this book. I'm up to Chapter 2. So far, so good.&lt;br /&gt;&lt;br /&gt;I'm also looking at &lt;em&gt;Design Patterns Explained - A New Perspective On Object-Oriented Design&lt;/em&gt;, but I'm not committed to it yet.&lt;br /&gt;&lt;br /&gt;Can anyone recommend a good OOP book?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br /&gt;I've read up to Ch 7 of &lt;em&gt;Design Patterns Explained - A New Perspective On Object-Oriented Design&lt;/em&gt;. It begins with a problem and a first attempt at a solution. The following chapters describe design patterns and their use in the original problem. Actually, an interesting book with short chapters to keep you from losing focus.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-1866833764111536816?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/1866833764111536816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=1866833764111536816' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/1866833764111536816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/1866833764111536816'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/09/couple-of-books.html' title='A couple of books'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-3814490780914566670</id><published>2008-09-06T04:35:00.000-07:00</published><updated>2008-09-06T04:48:34.873-07:00</updated><title type='text'>Chrome + Privoxy</title><content type='html'>I've been using Chrome exclusively now since its debut.&lt;br /&gt;&lt;br /&gt;It's noticeably more responsive than Firefox 3.01, even with pre-fetching disabled.&lt;br /&gt;&lt;br /&gt;The keyboard shortcuts I use are the same, too. Flash just worked.&lt;br /&gt;&lt;br /&gt;But I got used to AdBlock silently doing its thing in the background. Alas, Chrome doesn't have ad blocking yet.&lt;br /&gt;&lt;br /&gt;Fortunately, you can get similar abilities with &lt;a href="http://www.privoxy.org/"&gt;Privoxy&lt;/a&gt;. It's a web proxy than runs locally. Just set the proxy settings in the browser you use.&lt;br /&gt;&lt;br /&gt;Here's how to setup Chrome with Privoxy: &lt;a href="http://www.fritscher.ch/blog/2008/09/03/google-chrome-adblock-with-privoxy/"&gt;Google Chrome AdBlock with Privoxy&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-3814490780914566670?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/3814490780914566670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=3814490780914566670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/3814490780914566670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/3814490780914566670'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/09/chrome-privoxy.html' title='Chrome + Privoxy'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-6091563792769211212</id><published>2008-08-12T16:18:00.000-07:00</published><updated>2008-08-12T16:58:10.201-07:00</updated><title type='text'>Mapping java objects to actionscript value objects</title><content type='html'>I was getting my java objects from the event.result and manually populating my value object property by property:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;var p : Object = event.result;&lt;br /&gt;model.product.id = p.id;&lt;br /&gt;model.product.name = p.name;&lt;br /&gt;model.product.unitPrice = p.unitPrice;&lt;br /&gt;model.product.unitsInStock = p.unitsInStock;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I tried casting the event.result object to my value object but that returned null.&lt;br /&gt;&lt;br /&gt;What I forgot to do was specify the RemoteClass metadata tag:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;[Bindable]&lt;br /&gt;[RemoteClass(alias="domain.Product")]&lt;br /&gt;public class Product&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now I'm able to assign the java object to my value object like:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;model.product = event.result as Product;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-6091563792769211212?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/6091563792769211212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=6091563792769211212' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6091563792769211212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/6091563792769211212'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/08/mapping-java-objects-to-actionscript.html' title='Mapping java objects to actionscript value objects'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-178171451522048685</id><published>2008-05-24T07:39:00.000-07:00</published><updated>2008-05-24T07:42:34.722-07:00</updated><title type='text'>xSQL Profiler</title><content type='html'>I just came across a SQL Server profiler called &lt;a href="http://www.xsqlsoftware.com/Product/xSQL_Profiler.aspx"&gt;xSQL Profiler&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This could be useful to see what Hibernate is doing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-178171451522048685?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/178171451522048685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=178171451522048685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/178171451522048685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/178171451522048685'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/05/xsql-profiler.html' title='xSQL Profiler'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-8468755400037084864</id><published>2008-05-19T13:49:00.000-07:00</published><updated>2008-05-19T13:52:51.178-07:00</updated><title type='text'>Session closed! error</title><content type='html'>I finished testing the data access layer and tried populating a mx:datagrid.&lt;br /&gt;&lt;br /&gt;Flex was throwing an error with this message:&lt;br /&gt;&lt;br /&gt;org.springframework.orm.hibernate3.HibernateSystemException : Session is closed!&lt;br /&gt;&lt;br /&gt;It turns out I forgot to add @Transactional to my data access code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-8468755400037084864?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/8468755400037084864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=8468755400037084864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8468755400037084864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/8468755400037084864'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/05/session-closed-error.html' title='Session closed! error'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-586558989744497416</id><published>2008-05-17T09:32:00.000-07:00</published><updated>2008-05-17T09:36:45.560-07:00</updated><title type='text'>Table names with spaces</title><content type='html'>I was tripped up by spaces in a table name.&lt;br /&gt;&lt;br /&gt;Using square brackets fixed my issue:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@Entity&lt;br /&gt;@Table(name="[Order Details]")&lt;br /&gt;public class OrderDetail implements Serializable&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-586558989744497416?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/586558989744497416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=586558989744497416' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/586558989744497416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/586558989744497416'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/05/table-names-with-spaces.html' title='Table names with spaces'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7500649774815406750</id><published>2008-05-10T09:15:00.000-07:00</published><updated>2008-05-10T09:36:02.144-07:00</updated><title type='text'>JUnit 4 - test suites: use ClasspathSuite</title><content type='html'>I wanted to create a test suite for all the tests.&lt;br /&gt;&lt;br /&gt;With JUnit 4, you create an empty class like:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;@RunWith(Suite.class)&lt;br /&gt;@SuiteClasses( { Test1.class, Test2.class })&lt;br /&gt;&lt;/code&gt;&lt;code&gt;public class AllTests {}&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;But if you have many tests, it becomes cumbersome to list all tests here.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.johanneslink.net/cpsuite.html"&gt;ClasspathSuite&lt;/a&gt; can execute all JUnit 4 tests in the project's classpath.&lt;br /&gt;&lt;br /&gt;This will execute all JUnit 4 tests:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;@RunWith(ClasspathSuite.class)&lt;br /&gt;&lt;/code&gt;&lt;code&gt;public class AllTests {}&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can also restrict tests by package or class. Good stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7500649774815406750?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7500649774815406750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7500649774815406750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7500649774815406750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7500649774815406750'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/05/junit-4-use-classpathsuite.html' title='JUnit 4 - test suites: use ClasspathSuite'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-2244889797254850111</id><published>2008-05-09T14:48:00.001-07:00</published><updated>2008-05-10T09:33:57.537-07:00</updated><title type='text'>Northwind employees table - photo field</title><content type='html'>The Employees table in Northwind database in Sql Server 2005 has a Photo column of type image. I mapped this column to a byte array like so&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@Lob&lt;br /&gt;private byte[] photo;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To test if the data was being read properly, I tried writing the bytes to a file with no luck. According to this &lt;a href="http://www.rp2c.com/blogofbob/NorthwindDatabaseEmployeePhotoInfo.aspx"&gt;blog&lt;/a&gt; the first 78 bytes should be ignored.&lt;br /&gt;&lt;br /&gt;Lucky finding it on google so quick :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-2244889797254850111?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/2244889797254850111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=2244889797254850111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/2244889797254850111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/2244889797254850111'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/05/northwind-employees-table-photo-field.html' title='Northwind employees table - photo field'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-4058597492518695491</id><published>2008-05-05T16:31:00.000-07:00</published><updated>2008-05-10T09:34:40.185-07:00</updated><title type='text'>JUnit 4 and subclasses</title><content type='html'>With Junit4, subclasses inherit the parent's behaviour.&lt;br /&gt;&lt;br /&gt;I have many tests each with the same boiler code annotations for configuration. So instead of repeating these everywhere, I created  base test class:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@RunWith(value=SpringJUnit4ClassRunner.class)&lt;br /&gt;@Transactional&lt;br /&gt;@TransactionConfiguration(transactionManager="txManager")&lt;br /&gt;@ContextConfiguration(locations={"/applicationContext.xml"})&lt;br /&gt;public class BaseTest&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Each test extends this base test:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;public Test1 extends BaseClass&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-4058597492518695491?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/4058597492518695491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=4058597492518695491' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/4058597492518695491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/4058597492518695491'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/05/junit-4-and-subclasses.html' title='JUnit 4 and subclasses'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-832340770441001658</id><published>2008-05-05T16:28:00.000-07:00</published><updated>2008-05-07T16:17:11.420-07:00</updated><title type='text'>Good OSGi introduction</title><content type='html'>OSGi interest seems to be gaining interest.&lt;br /&gt;&lt;br /&gt;There's a good introduction &lt;a href="http://neilbartlett.name/blog/osgi-articles/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://java.dzone.com/articles/simple-osgi-service"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-832340770441001658?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/832340770441001658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=832340770441001658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/832340770441001658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/832340770441001658'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/05/good-osgi-introduction.html' title='Good OSGi introduction'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-9013312404968794363</id><published>2008-05-03T13:42:00.000-07:00</published><updated>2008-05-03T13:52:55.877-07:00</updated><title type='text'>Detached entity passed to persist</title><content type='html'>I was getting a "detached entity passed to persist" error when trying to run some unit tests.&lt;br /&gt;&lt;br /&gt;This was caused by how I created my test objects. I was explicitly setting the ID property. Removing ID assignment fixed it.&lt;br /&gt;&lt;br /&gt;I've also switched to using JUnit4 with annotations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-9013312404968794363?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/9013312404968794363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=9013312404968794363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/9013312404968794363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/9013312404968794363'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/05/detached-entity-passed-to-persist.html' title='Detached entity passed to persist'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-2795919821712292450</id><published>2008-04-28T04:46:00.000-07:00</published><updated>2008-04-28T04:57:56.939-07:00</updated><title type='text'>Lucene - indexing anything</title><content type='html'>I took some time off of flexifying northwind to look at &lt;a href="http://lucene.apache.org/java/docs/index.html"&gt;Lucene&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Using PDFBox and POI, indexing PDFs and Word docs is very simple. A recursive method is all that's needed to index an entire directory.&lt;br /&gt;&lt;br /&gt;I also indexed a database table. I think a Lucene indexed database can be used as a cache for ecommerce websites. Just index the database with a cron job and you have a super fast search that bypasses db connections.&lt;br /&gt;&lt;br /&gt;I have an idea for an Adobe AIR app and indexing gigabytes of mp3s and videos. But I believe there are limitations to what AIR has access to on the local filesystem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-2795919821712292450?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/2795919821712292450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=2795919821712292450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/2795919821712292450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/2795919821712292450'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/04/lucene-indexing-anything.html' title='Lucene - indexing anything'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7885809600733465783</id><published>2008-04-21T12:25:00.000-07:00</published><updated>2008-05-07T16:18:27.090-07:00</updated><title type='text'>MySql - Transactional tests and auto_increment</title><content type='html'>I'm using Spring to manage my JPA/Hibernate objects with MySql as the database.&lt;br /&gt;&lt;br /&gt;When running tests, I insert some test data in onSetUpInTransaction().&lt;br /&gt;&lt;br /&gt;It seems that the auto_increment values for my test data are not sequential. After each test, the auto_increment values begin after the last id for each test I run. For example, in test A, id = 11, 12, 13. Test B id = 14, 15, 16 instead of 11, 12, etc. Something is maintaining a handle on the ID between tests.&lt;br /&gt;&lt;br /&gt;It might be caused by org.hibernate.dialect.MySQL5Dialect.&lt;br /&gt;&lt;br /&gt;UPDATE:&lt;br /&gt;The same behaviour using Toplink Essentials,&lt;br /&gt;&lt;br /&gt;UPDATE 2:&lt;br /&gt;The same behaviour using Hibernate and MS Sql Server 2005.&lt;br /&gt;&lt;br /&gt;Does anyone know how to force the database back to it's original state after each test?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7885809600733465783?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7885809600733465783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7885809600733465783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7885809600733465783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7885809600733465783'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/04/mysql-transactional-tests-and.html' title='MySql - Transactional tests and auto_increment'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7424513537433497527</id><published>2008-04-16T12:13:00.000-07:00</published><updated>2008-04-16T12:30:15.403-07:00</updated><title type='text'>Northwind - JPA/Hibernate, Spring, Flex, BlazeDS and Cairngorm</title><content type='html'>After getting something basic working with one table, I decided to flexify the Northwind database using JPA/Hibernate, Spring, BlazeDS and Cairngorm deployed to Tomcat 6.x.&lt;br /&gt;&lt;br /&gt;It seems BlazeDS doesn't handle lazy loading, but GraniteDS does. I'll investigate GraniteDS eventually.&lt;br /&gt;&lt;br /&gt;I'm using mysql  since I found a mysql data dump of Northwind.&lt;br /&gt;&lt;br /&gt;The first step is to create the data model and the unit tests.&lt;br /&gt;&lt;br /&gt;I'll keep this blog updated of my progress.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7424513537433497527?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7424513537433497527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7424513537433497527' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7424513537433497527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7424513537433497527'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/04/northwind-jpahibernate-spring-flex.html' title='Northwind - JPA/Hibernate, Spring, Flex, BlazeDS and Cairngorm'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-3233032106620051900</id><published>2008-04-15T13:17:00.000-07:00</published><updated>2008-04-15T13:39:04.572-07:00</updated><title type='text'>Spring 2.5 and Toplink Essentials error</title><content type='html'>I'm using BlazeDs with Spring and Toplink Essentials for the backend.&lt;br /&gt;&lt;br /&gt;I was getting an error when trying to call findById(Product.class, id)...&lt;br /&gt;&lt;br /&gt;org.springframework.dao.InvalidDataAccessApiUsageException: Unknown entity bean class: class domain.Product, please verify that this class has been marked with the @Entity annotation.; nested exception is java.lang.IllegalArgumentException: Unknown entity bean class: class domain.Product, please verify that this class has been marked with the @Entity annotation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I was able to populate a mx:dataGrid using a List&amp;lt;Product&amp;gt; without problems. The problem is probably related to &lt;a href="http://weblogs.java.net/blog/cayhorstmann/archive/2006/06/the_innermost_s.html"&gt;this&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Using Hibernate makes the code work. The only downside is the 10 jar files needed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-3233032106620051900?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/3233032106620051900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=3233032106620051900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/3233032106620051900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/3233032106620051900'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/04/spring-25-and-toplink-essentials-error.html' title='Spring 2.5 and Toplink Essentials error'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-36748513461946508.post-7655892961692969891</id><published>2008-04-11T09:30:00.000-07:00</published><updated>2008-04-11T09:46:50.832-07:00</updated><title type='text'>mx:RemoteObject method with arguments</title><content type='html'>When you need to pass some arguments to a remote object, you can pass them directly like ro.getProducts(10, 20) or use ro.getProducts() with the remoteobject defined below.&lt;br /&gt;&lt;br /&gt;It seems the hardcoded arguments &lt;mx:arguments&gt; can be treated like default values since they can be overridden. You get an overloaded method for free.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;mx:remoteobject id="ro" destination="productDao"&amp;gt;&lt;br /&gt;&amp;lt;mx:method name="getProducts" result="resultHandler(event)"&amp;gt;&lt;br /&gt;   &amp;lt;mx:arguments&amp;gt;&lt;br /&gt;       &amp;lt;firstItem&amp;gt;5&amp;lt;/firstItem&amp;gt;&lt;br /&gt;       &amp;lt;batchsize&amp;gt;20&amp;lt;/batchsize&amp;gt;&lt;br /&gt;   &amp;lt;/mx:arguments&amp;gt;&lt;br /&gt;&amp;lt;/mx:method&amp;gt;&lt;br /&gt;&amp;lt;/mx:remoteobject&amp;gt;&lt;/mx:arguments&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/36748513461946508-7655892961692969891?l=franksveranda.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://franksveranda.blogspot.com/feeds/7655892961692969891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=36748513461946508&amp;postID=7655892961692969891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7655892961692969891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/36748513461946508/posts/default/7655892961692969891'/><link rel='alternate' type='text/html' href='http://franksveranda.blogspot.com/2008/04/mxremoteobject-method-with-arguments.html' title='mx:RemoteObject method with arguments'/><author><name>Frank</name><uri>http://www.blogger.com/profile/01552718502878103037</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
