<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Memory Leak</title>
	<atom:link href="http://aarendar.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://aarendar.wordpress.com</link>
	<description>Create</description>
	<lastBuildDate>Fri, 25 Nov 2011 18:16:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='aarendar.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/4cb4e2d9e3ae4cf62da84e3e263736e5?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Memory Leak</title>
		<link>http://aarendar.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://aarendar.wordpress.com/osd.xml" title="Memory Leak" />
	<atom:link rel='hub' href='http://aarendar.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Modelling Bacteria Growth and Reproduction</title>
		<link>http://aarendar.wordpress.com/2011/04/12/modelling-bacteria-growth-and-reproduction/</link>
		<comments>http://aarendar.wordpress.com/2011/04/12/modelling-bacteria-growth-and-reproduction/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 11:58:21 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[bacteria]]></category>
		<category><![CDATA[growth]]></category>
		<category><![CDATA[modelling]]></category>
		<category><![CDATA[reproduction]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=431</guid>
		<description><![CDATA[Look here the first video showing part of a new thing I am working on at the moment. It shows the visualization of bacteria growth and reproduction in certain conditions.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=431&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Look <a href="http://mem0ry-leak.blogspot.com/2011/04/modelling-bacteria-growth-and.html">here</a> the first video showing part of a new thing I am working on at the moment.</p>
<p>It shows the visualization of bacteria growth and reproduction in certain conditions.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/431/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/431/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/431/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=431&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2011/04/12/modelling-bacteria-growth-and-reproduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>
	</item>
		<item>
		<title>Adobe AIR: Transparent Application Window with Flex 4</title>
		<link>http://aarendar.wordpress.com/2011/03/19/adobe-air-transparent-application-window-with-flex-4/</link>
		<comments>http://aarendar.wordpress.com/2011/03/19/adobe-air-transparent-application-window-with-flex-4/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 14:35:59 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[Transparent]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=429</guid>
		<description><![CDATA[If you are looking for information on how to make your AIR app window transparent please click here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=429&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you are looking for information on how to make your AIR app window transparent please click <a href="http://mem0ry-leak.blogspot.com/2011/03/adobe-air-transparent-application.html">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/429/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/429/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/429/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=429&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2011/03/19/adobe-air-transparent-application-window-with-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>
	</item>
		<item>
		<title>Scraping Large Volumes of Data</title>
		<link>http://aarendar.wordpress.com/2011/01/03/scraping-large-volumes-of-data/</link>
		<comments>http://aarendar.wordpress.com/2011/01/03/scraping-large-volumes-of-data/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 14:54:46 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asynchronous iterating]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[large volumes]]></category>
		<category><![CDATA[web scraper]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=427</guid>
		<description><![CDATA[Suppose there is a website that provides people with some useful service. Let&#8217;s say I want to open a credit and I need to assess multitude of offers that different banks can propose for me. I can fill a form on that website, telling how old they are, where they live, what&#8217;s their occupation, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=427&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Suppose there is a website that provides people with some useful  service. Let&#8217;s say I want to open a credit and I need to assess  multitude of offers that different banks can propose for me. I can fill a  form on that website, telling how old they are, where they live, what&#8217;s  their occupation, and other data and the site provides me with a list  of banks in my location and their credit products that might be fitting  my. You can imagine a plenty of such services and I suppose many of you  have used such things at least once.<br />
Now suppose I am building a new  system or website and I know it would be great to provide similar  service on it. I have only 2 possible ways to go: <a title="Read the full article here" href="http://mem0ry-leak.blogspot.com/2011/01/scraping-large-volumes-of-data.html">read the full article here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/427/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=427&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2011/01/03/scraping-large-volumes-of-data/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>
	</item>
		<item>
		<title>multipart/form-data with ActionScript and Google App Engine</title>
		<link>http://aarendar.wordpress.com/2010/08/16/multipartform-data-with-actionscript-and-google-app-engine/</link>
		<comments>http://aarendar.wordpress.com/2010/08/16/multipartform-data-with-actionscript-and-google-app-engine/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 15:30:32 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=425</guid>
		<description><![CDATA[How to upload forms with image and other files from Flex/Flash/ActionScript to Java: http://mem0ry-leak.blogspot.com/2010/08/multipartform-data-with-action-script.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=425&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to upload forms with image and other files from Flex/Flash/ActionScript to Java: <a href="http://mem0ry-leak.blogspot.com/2010/08/multipartform-data-with-action-script.html" target="_blank">http://mem0ry-leak.blogspot.com/2010/08/multipartform-data-with-action-script.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/425/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/425/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/425/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=425&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2010/08/16/multipartform-data-with-actionscript-and-google-app-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>
	</item>
		<item>
		<title>Google AdSense and Flash</title>
		<link>http://aarendar.wordpress.com/2010/08/12/google-adsense-and-flash/</link>
		<comments>http://aarendar.wordpress.com/2010/08/12/google-adsense-and-flash/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 11:58:36 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=422</guid>
		<description><![CDATA[Recently I had to cope with evaluation of possibility to embed Google AdSense into the flash content, for example .swf. Summary of my evaluation is here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=422&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I had to cope with evaluation of possibility to embed Google AdSense into the flash content, for example .swf.</p>
<p>Summary of my evaluation is <a href="http://mem0ry-leak.blogspot.com/2010/08/google-adsense-and-flash.html">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/422/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=422&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2010/08/12/google-adsense-and-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex vs GWT: Comparison Part 1</title>
		<link>http://aarendar.wordpress.com/2010/03/03/flex-vs-gwt-comparison-part-1/</link>
		<comments>http://aarendar.wordpress.com/2010/03/03/flex-vs-gwt-comparison-part-1/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 16:47:59 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[gwt]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=404</guid>
		<description><![CDATA[This article opens a series of posts dedicated to Flex and GWT comparison. Both are meant to help developers in construction of reach interface applications. Both achieve this goal in very different ways. I will compare GWT and Flex because people who are familiar only with one of them have different thoughts on why they [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=404&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This article opens a series of posts dedicated to Flex and GWT comparison.<br />
Both are meant to help developers in construction of reach interface applications. Both achieve this goal in very different ways.<br />
I will compare GWT and Flex because people who are familiar only with one of them have different thoughts on why they should/shouldn&#8217;t learn the other technology. They are asking questions like &#8220;I heard that Flex can be used in enterprise apps for UI with large amount of data. Can&#8217;t I do the same with GWT?&#8221; or &#8220;GWT allows me to have very responsive AJAX applications which are cross-browser compliant. Seems like Flex promises the same, is it worse to learn it?&#8221;.</p>
<p>I am writing this just for such developers to share my impression.<br />
So let&#8217;s start from some history.</p>
<h2>History</h2>
<p>The next time-line shows how both teams where roughly releasing:<br />
<a href="http://aarendar.files.wordpress.com/2010/03/history.png"><img class="alignnone size-full wp-image-406" title="history" src="http://aarendar.files.wordpress.com/2010/03/history.png?w=510&#038;h=53" alt="" width="510" height="53" /></a></p>
<p>As you can see Flex team started ~ 2 years ahead of GWT team. Not surprisingly Flex is more mature technology at the current moment. The proper analysis maybe would be to compare then GWT 2.0 with Flex 2.x but no one is interesting in this <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Out of the Box</h2>
<p>Let&#8217;s see now what developers have out of the box when they start to work with both technologies.</p>
<h3>SDK</h3>
<p>Both have open source free SDK.</p>
<h3>IDE</h3>
<p><span style="text-decoration:underline;">GWT</span>: All you need  is Eclipse with J2EE plugins + download and install free GWT Eclipse plugin.<br />
It perfectly works even with latest Galileo (3.5) Eclipse.<br />
<span style="text-decoration:underline;">Flex</span>: Though basic tools to work in command line (compiler, etc.) are provided it will not be very convenient to do some real project given just that. Adobe Flex Builder 3 plugin for Eclipse is not free and costs some fair money but it is worth of its price, no matter what the people say.</p>
<h3>Programming Language</h3>
<p>You develop GWT projects on Java.<br />
For Flex you need to code in Action Script.<br />
Action Script provides majority of the OOP features and for a normal developer the learning curve should be very short.<br />
Off course Java is richer language but Action Script provides you with all means to create a nice OOP code. Also consider that for the classes that represent your UI components and thus will be compiled to Java Script code by GWT you can use only part, though quite large part, of the Java Runtime Library. For example you can&#8217;t use threads or java.io classes.</p>
<h3>UI Markup Language</h3>
<p><span style="text-decoration:underline;">GWT</span>: Before the 2.0 release GWT has no embedded markup language. All structuring and layouting of your UI should have been done in Java code similarly as it is done in Java Swing.<br />
As of the GWT 2.0 there is a UiBinder feature which allows you to layout/style your UI in xml files. I described basics of this <a href="http://aarendar.wordpress.com/2010/03/01/learning-gwt-uibinder-part-1/">here</a>.<br />
<span style="text-decoration:underline;">Flex</span>: there is MXML markup language which also allows you to layout and style your applications/components in xml-way. But MXML is much more mature, allowing you to do additional things which you will not be able to achieve with UiBinder. For example you can insert plane Actions Script code there, so MXML&#8217;s flavor resembles here JSPs <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Theoretically you can write the whole Flex application in MXML while UiBinder only allows you to control layout and assign some event handlers + other minor stuff.<br />
Also it&#8217;s worthy to note that MXML has much stronger support in IDE: better autocompletion, ability to debug MXML, etc.</p>
<h3>Standard Components</h3>
<p><span style="text-decoration:underline;">GWT</span>: comes with 18 widgets and  10 layout panels which are described <a href="http://code.google.com/webtoolkit/doc/1.6/RefWidgetGallery.html">here</a>.<br />
<span style="text-decoration:underline;">Flex</span>: has 30 controls, 17 Layouts, 8 Navigators and 10 charts. Though some useful enterprise-scale components are not coming in the standard free package and you should pay additionally for them, e.g. Advanced Data Grid or OLAPDataCube.</p>
<p>So here Flex and GWT hardly can be compared. Also upcoming (in 2010) Flex 4 release promise to deliver even more components.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/404/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/404/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/404/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=404&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2010/03/03/flex-vs-gwt-comparison-part-1/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>

		<media:content url="http://aarendar.files.wordpress.com/2010/03/history.png" medium="image">
			<media:title type="html">history</media:title>
		</media:content>
	</item>
		<item>
		<title>Learning GWT UiBinder &#8211; Part 2 (Styles and Instantiation)</title>
		<link>http://aarendar.wordpress.com/2010/03/02/learning-gwt-uibinder-part-2-styles-and-annotations/</link>
		<comments>http://aarendar.wordpress.com/2010/03/02/learning-gwt-uibinder-part-2-styles-and-annotations/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 14:52:07 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[UiBinder]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=387</guid>
		<description><![CDATA[Part 1 of this short tutorial explained how to layout a component UI with help of UiBinder. This part will show how to style already layouted structure. To begin with we create a CSS file with needed styles: @CHARSET "UTF-8"; .name{     font-weight: bold; } .label{     color: #0000FF;     font-style: italic; } .bio{     [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=387&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://aarendar.wordpress.com/2010/03/01/learning-gwt-uibinder-part-1/">Part 1</a> of this short tutorial explained how to layout a component UI with help of UiBinder.<br />
This part will show how to style already layouted structure.<br />
To begin with we create a CSS file with needed styles:</p>
<pre>@CHARSET "UTF-8";
.name{
    font-weight: bold;
}

.label{
    color: #0000FF;
    font-style: italic;
}

.bio{
    color: #666666;
}
.photo{
    margin-right: 5px;
}</pre>
<p>Then we register this CSS in the UiBinder xml template:<br />
<a href="http://aarendar.files.wordpress.com/2010/03/embedding.png"><img class="alignnone size-full wp-image-389" title="embedding" src="http://aarendar.files.wordpress.com/2010/03/embedding.png?w=510&#038;h=259" alt="" width="510" height="259" /></a></p>
<p>Then we assign to widgets required styles with help of <em><span style="color:#993366;">addStyleNames</span></em> attributes.<br />
That&#8217;s it about simple styling.</p>
<p>I also decided to have &#8220;bio&#8221; part of the user profile to be rendered inside a disclosure panel so the users can expand/collapse it as needed.<br />
The first though is to do it like this:</p>
<pre>&lt;g:DiclosurePanel&gt;
&lt;g:Label ui:field="bio" addStyleNames="{style.bio}"/&gt;
&lt;/g:DisclosurePanel&gt;</pre>
<p>But this way will not allow me to set the header of the disclosure panel. <span style="color:#008000;">DisclosurePanel</span> has method <span style="color:#0000ff;"><em>setHeader(Widget)</em></span> but I don&#8217;t know how to nicely construct and reference a widget inside the xml attribute.<br />
Also the mostly useful constructor of the <span style="color:#008000;">DisclosurePanel</span> class it the <em><span style="color:#0000ff;">public DisclosurePanel(ImageResource openImage, ImageResource closedImage,<br />
String headerText)</span><span style="color:#000000;"> </span></em><span style="color:#000000;">which allows setting of open/close icons as well as the string header. I don&#8217;t know why GWT guys have constructor with <span style="color:#339966;">String</span> parameter but setter only with <span style="color:#339966;">Widget</span> parameter, but this is the different story. Our task is to be able to instantiate the <span style="color:#339966;">DisclosurePanel</span> with help of that mentioned constructor.</span><br />
For being able to delegate instantiation of UI components from the GWT framework to the developer&#8217;s code GWT provides <span style="color:#808080;">@UiFactory</span> annotation.<br />
I just add the following method to my UserProfile.java:</p>
<pre>@UiFactory
    protected DisclosurePanel createPanel(String label)
    {
        Resources res = GWT.create(Resources.class);
        DisclosurePanel result = new DisclosurePanel(res.getCloseIcon(), res.getOpenIcon(), label);
        return result;
    }</pre>
<p>Now each time I will write in my .ui.xml</p>
<pre>&lt;g:DisclosurePanel label="Details"&gt;
            &lt;g:Label ui:field="bio" addStyleNames="{style.bio}"/&gt;
 &lt;/g:DisclosurePanel&gt;</pre>
<p>for example it will call the createPanel(String label) method to get the instance of the DisclosurePanel with specified textual header and open/close icons.<br />
In result we will have this:<br />
<a href="http://aarendar.files.wordpress.com/2010/03/final.png"><img class="alignnone size-full wp-image-392" title="final" src="http://aarendar.files.wordpress.com/2010/03/final.png?w=494&#038;h=312" alt="" width="494" height="312" /></a></p>
<p>There are some more annotations available with UiBinder but this little example actually shown the essence of it.</p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:0;width:1px;height:1px;">@CHARSET &#8220;UTF-8&#8243;;<br />
.name{<br />
font-weight: bold;<br />
}.label{<br />
color: #0000FF;<br />
font-style: italic;<br />
}</p>
<p>.bio{<br />
color: #666666;<br />
}</p>
<p>.photo{<br />
margin-right: 5px;<br />
}</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/387/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/387/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/387/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=387&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2010/03/02/learning-gwt-uibinder-part-2-styles-and-annotations/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>

		<media:content url="http://aarendar.files.wordpress.com/2010/03/embedding.png" medium="image">
			<media:title type="html">embedding</media:title>
		</media:content>

		<media:content url="http://aarendar.files.wordpress.com/2010/03/final.png" medium="image">
			<media:title type="html">final</media:title>
		</media:content>
	</item>
		<item>
		<title>Learning GWT UiBinder &#8211; Part 1 (Layouting)</title>
		<link>http://aarendar.wordpress.com/2010/03/01/learning-gwt-uibinder-part-1/</link>
		<comments>http://aarendar.wordpress.com/2010/03/01/learning-gwt-uibinder-part-1/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 17:37:53 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[UiBinder]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=374</guid>
		<description><![CDATA[Today I decided to look inside UiBinder and learn some basics of how to work with it. Frankly speaking it was not that hard to get it, especially after being familiar with Flex MXML which serves the same purpose: separation of your UI markup from your business logic. In flex developers even have a special [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=374&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I decided to look inside UiBinder and learn some basics of how to work with it.<br />
Frankly speaking it was not that hard to get it, especially after being familiar with Flex MXML which serves the same purpose: separation of your UI markup from your business logic.<br />
In flex developers even have a special name for this approach. They call it Code Behind.</p>
<p>The plan was to see how much work would I save using UiBinder for designing a simple UserProfile widget.<br />
Something like this was on my mind:<br />
<a href="http://aarendar.files.wordpress.com/2010/03/userprofile.png"><img class="alignnone size-full wp-image-376" title="userProfile" src="http://aarendar.files.wordpress.com/2010/03/userprofile.png?w=410&#038;h=194" alt="" width="410" height="194" /></a></p>
<p>To implement this widget we will create 4 files:</p>
<ul>
<li>UserProfile.java &#8211; widget class</li>
<li>UserProfile.ui.xml &#8211; xml file with interface markup</li>
<li>UserProfileDO &#8211; data object to hold the user profile&#8217;s data. Will serve as a data provider for UserProfile widget</li>
<li>entry point class to instantiate the widget and show it on the screen</li>
</ul>
<p>Here is how it looks in my Eclipse:<br />
<a href="http://aarendar.files.wordpress.com/2010/03/packages.png"><img class="alignnone size-full wp-image-378" title="packages" src="http://aarendar.files.wordpress.com/2010/03/packages.png?w=349&#038;h=456" alt="" width="349" height="456" /></a></p>
<p>We should start from the .ui.xml file, it&#8217;s like if we were developing an  HTML page and will start from the HTML itself and only after that do some javascripting, CSS-ing, etc. :</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
    xmlns:g='urn:import:com.google.gwt.user.client.ui'&gt;
    &lt;g:FlowPanel&gt;
        &lt;g:HorizontalPanel&gt;
            &lt;g:Image ui:field="photo"/&gt;
            &lt;g:FlowPanel&gt;
                &lt;g:Label ui:field="name"/&gt;
                &lt;g:HorizontalPanel&gt;
                    &lt;g:Label text="mobile: "/&gt;
                    &lt;g:Label ui:field="mobile"/&gt;
                &lt;/g:HorizontalPanel&gt;
                &lt;g:HorizontalPanel&gt;
                    &lt;g:Label text="email: "/&gt;
                    &lt;g:Label ui:field="email"/&gt;
                &lt;/g:HorizontalPanel&gt;
                &lt;g:HorizontalPanel&gt;
                    &lt;g:Label text="web: "/&gt;
                    &lt;g:Label ui:field="web"/&gt;
                &lt;/g:HorizontalPanel&gt;
            &lt;/g:FlowPanel&gt;
        &lt;/g:HorizontalPanel&gt;
        &lt;g:Label ui:field="bio"/&gt;
    &lt;/g:FlowPanel&gt;
&lt;/ui:UiBinder&gt;</pre>
<p>Very nice thing here is that in Eclipse you&#8217;ll get all the autosuggestion help from the IDE regarding the component names and attribute values. So this does help to write the code easy and quick.<br />
If we where composing this UI directly in the java code it would be far from being that nice and accurate.<br />
Notice that we marked few fields which we should be able to operate on programmatic with <span style="color:#ff6600;">ui:field</span> attribute.<br />
So, this represent the UI we want to see for the component on the screen.</p>
<p>Now goes the data object to represent the raw data of some user profile:</p>
<pre>public class UserProfileDO {
  private String imageURL;
  private String name;
  private String mobile;
  private String email;
  private String web;
  private String bio;

...getters and setters here....

  public UserProfileDO(String bio, String email, String imageURL,
 String mobile, String name, String web) {
   super();
   this.bio = bio;
   this.email = email;
   this.imageURL = imageURL;
   this.mobile = mobile;
   this.name = name;
   this.web = web;
  }
}</pre>
<p>The last part of the puzzle is the code of the <span style="color:#3366ff;"><em>UserProfile</em></span> widget:</p>
<pre>public class UserProfile extends Composite {

    interface UserProfileUiBinder extends UiBinder&lt;FlowPanel, UserProfile&gt;{};
    private static UserProfileUiBinder uiBinder = GWT.create(UserProfileUiBinder.class);

    @UiField Image photo;
    @UiField Label name;
    @UiField Label mobile;
    @UiField Label email;
    @UiField Label web;
    @UiField Label bio;

    public UserProfile(UserProfileDO data)
    {
        super();
        initWidget(uiBinder.createAndBindUi(this));
        photo.setUrl(data.getImageURL());
        name.setText(data.getName());
        email.setText(data.getEmail());
        mobile.setText(data.getMobile());
        web.setText(data.getMobile());
        bio.setText(data.getBio());
    }

}</pre>
<p>The first 2 lines will be similar for any widget which UI you want to keep in xml. Like the GWT docs says you declare an interface parametrized with 2 types: first one is the type of the topmost container you have in the widget&#8217;s xml (which is the <em><span style="color:#3366ff;">FlowPanel</span></em> in our case) and the second one is the widget&#8217;s class itself.<br />
Then we have a constructor which takes a data object as only input parameter. The linkage of the UiBinder XML to the widget happens in the <em><span style="color:#3366ff;">initWidget()</span></em> method call.<br />
Everything is very simple.</p>
<p>The last part is the entry point class which shows how easy it is to instantiate and show the <em><span style="color:#3366ff;">UserProfile</span></em> widget:</p>
<pre>public class UiBinderLearning implements EntryPoint {

    public void onModuleLoad() {
        UserProfileDO upDO = new UserProfileDO("Project manager at Epam Systems.", "alexander.arendar@gmail.com",
                "/images/me.jpg", "+380952600399", "Alexander Arendar", "aarendar.wordpress.com");
        UserProfile userProfile= new UserProfile(upDO);
        RootPanel.get().add(userProfile);
    }
}</pre>
<p>What we have in the browser is:<br />
<a href="http://aarendar.files.wordpress.com/2010/03/profile.png"><img class="alignnone size-full wp-image-382" title="profile" src="http://aarendar.files.wordpress.com/2010/03/profile.png?w=428&#038;h=360" alt="" width="428" height="360" /></a></p>
<p>What we still miss is some styling for labels. I&#8217;ll show in the <a href="http://aarendar.wordpress.com/2010/03/02/learning-gwt-uibinder-part-2-styles-and-annotations/">next post</a> how to do it.<br />
Conclusion: UiBinder really separates UI from business logic and all the middle-code stuff. I really liked it and will use it a lot.</p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:873px;width:1px;height:1px;">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;ui:UiBinder xmlns:ui=&#8217;urn:ui:com.google.gwt.uibinder&#8217;<br />
xmlns:g=&#8217;urn:import:com.google.gwt.user.client.ui&#8217;&gt;<br />
&lt;g:FlowPanel&gt;<br />
&lt;g:HorizontalPanel&gt;<br />
&lt;g:Image ui:field=&#8221;photo&#8221;/&gt;<br />
&lt;g:FlowPanel&gt;<br />
&lt;g:Label ui:field=&#8221;name&#8221;/&gt;<br />
&lt;g:HorizontalPanel&gt;<br />
&lt;g:Label text=&#8221;mobile: &#8220;/&gt;<br />
&lt;g:Label ui:field=&#8221;mobile&#8221;/&gt;<br />
&lt;/g:HorizontalPanel&gt;<br />
&lt;g:HorizontalPanel&gt;<br />
&lt;g:Label text=&#8221;email: &#8220;/&gt;<br />
&lt;g:Label ui:field=&#8221;email&#8221;/&gt;<br />
&lt;/g:HorizontalPanel&gt;<br />
&lt;g:HorizontalPanel&gt;<br />
&lt;g:Label text=&#8221;web: &#8220;/&gt;<br />
&lt;g:Label ui:field=&#8221;web&#8221;/&gt;<br />
&lt;/g:HorizontalPanel&gt;<br />
&lt;/g:FlowPanel&gt;<br />
&lt;/g:HorizontalPanel&gt;<br />
&lt;g:Label ui:field=&#8221;bio&#8221;/&gt;<br />
&lt;/g:FlowPanel&gt;<br />
&lt;/ui:UiBinder&gt;</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/374/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/374/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/374/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=374&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2010/03/01/learning-gwt-uibinder-part-1/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>

		<media:content url="http://aarendar.files.wordpress.com/2010/03/userprofile.png" medium="image">
			<media:title type="html">userProfile</media:title>
		</media:content>

		<media:content url="http://aarendar.files.wordpress.com/2010/03/packages.png" medium="image">
			<media:title type="html">packages</media:title>
		</media:content>

		<media:content url="http://aarendar.files.wordpress.com/2010/03/profile.png" medium="image">
			<media:title type="html">profile</media:title>
		</media:content>
	</item>
		<item>
		<title>GWT Simple Form Navigation</title>
		<link>http://aarendar.wordpress.com/2010/02/22/gwt-simple-form-navigation/</link>
		<comments>http://aarendar.wordpress.com/2010/02/22/gwt-simple-form-navigation/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 17:17:50 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=361</guid>
		<description><![CDATA[I already mentioned the simple site I am developing while learning GWT. There is a simple comment submission form with 2 fields: user name, comment text. When I&#8217;ve been implementing it the first time I was not thinking about validations of any kind. Soon I saw that empty comments added on the site are not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=361&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I already <a href="http://aarendar.wordpress.com/2010/02/15/gwt-gae-jdo-tagsoup-xalan-funny-little-site/">mentioned</a> the simple site I am developing while learning GWT.<br />
There is a simple comment submission form with 2 fields: user name, comment text. When I&#8217;ve been implementing it the first time I was not thinking about validations of any kind. Soon I saw that empty comments added on the site are not looking very nice in my DB.<br />
So I decided to add some nice (looking in UI) validation in some nice (from code perspective) manner.</p>
<p>My plan was to have something like this:<br />
<a href="http://aarendar.files.wordpress.com/2010/02/form.png"><img class="alignnone size-full wp-image-364" title="Form" src="http://aarendar.files.wordpress.com/2010/02/form.png?w=510&#038;h=270" alt="" width="510" height="270" /></a></p>
<p>Goals:</p>
<ul>
<li>Simple but extensible validation framework</li>
<li>required fields validation for start</li>
<li>Validation fires when user clicks &#8220;Submit&#8221; button</li>
</ul>
<p>I started with 2 interfaces:</p>
<pre>public interface IValidatable {

 public void setIsRequired(boolean value);
 public boolean getIsRequired();
 public void setErrorMessage(String value);
 public String getErrorMessage();
 public ValidationResult validate();
 public void indicateValidity(boolean valid);

}
</pre>
<p>This one should be implemented in any UI component that should behave like a validatable form field.<br />
Further we should have an interface which any form containing such validatable fields should implement:</p>
<pre>import java.util.List;
 public interface IValidatableForm {
 public void registerField(IValidatable field);
 public void unregisterField(IValidatable field);
 public List&lt;ValidationResult&gt; validate();
 public boolean indicateValidity(List&lt;ValidationResult&gt; validationResult);
}</pre>
<p>The idea is that the form can be anything and we don&#8217;t know exactly how it layouts its fields. It can also contain some fields (elements) that should not be validatable. So whoever composes the form should do it in normal way and when all children (fields) are added to the form it is needed to call for each of them <span style="color:#3366ff;"><em>registerField(field)</em></span> method.<br />
Whenever a validation should be performed it is needed to call <span style="color:#3366ff;"><em>validate()</em></span> method of the form which will internally call<span style="color:#3366ff;"><em> validate()</em></span> method of each registered field. Then aggregated validation result is passed to the <span style="color:#3366ff;"><em>indicateValidity()</em></span> method of the <em><span style="color:#3366ff;">IAggregatableForm</span></em> which again delegates it to <em><span style="color:#3366ff;">indicateValidity()</span></em> of each particular field. So it is nothing else but the Composite design pattern.<br />
Fields in my initial &#8220;rude&#8221; form where represented by the <span style="color:#3366ff;"><em>TextBox</em></span> and <em><span style="color:#3366ff;">TextArea</span></em> components.<br />
Next step is to enhance them for the sake of validation support.<br />
Here is how to make the<em> <span style="color:#3366ff;">TextBox</span></em> enhancement:</p>
<pre>public class VTextBox extends Composite implements IValidatable {
 private String errorMessage = "";
 private boolean isRequired = false;
 private HorizontalPanel container;
 private Image validityIcon;
 private Image requiredIcon;
 private TextBox textBox;

 @Override
 public String getErrorMessage() {
  return errorMessage;
 }

 @Override
 public boolean getIsRequired() {
  return isRequired;
 }

 @Override
 public void indicateValidity(boolean valid) {
  if (valid)
  {
   validityIcon.setUrl("/images/icons/noerror.png");
  }
  else
  {
   validityIcon.setUrl("/images/icons/error.png")
  }
 }

 @Override
 public void setErrorMessage(String value) {
  this.errorMessage = value;
 }

 @Override
 public void setIsRequired(boolean value) {
  this.isRequired = value;
  container.remove(requiredIcon);
  if (value)
  {
   requiredIcon = new Image("/images/icons/required.png");
  }
  else
  {
   requiredIcon = new Image("/images/icons/isrequiredclear.png");
  }
  container.insert(requiredIcon, 0);
 }

 @Override
 public ValidationResult validate() {
  ValidationResult result = new ValidationResult();
  result.setValidatedObject(this);
  result.setValid(true);
  if (isRequired)
  {
   if (textBox.getText()== null || textBox.getText().length()== 0)
   {
    result.setValid(false);
   }
  }
  return result;
 }

 public VTextBox()
 {
  super();
  container = new HorizontalPanel();
  requiredIcon = new Image("/images/icons/isrequiredclear.png");
  container.add(requiredIcon);
  textBox = new TextBox();
  container.add(textBox);
  validityIcon = new Image("/images/icons/clearerror.png");
  container.add(validityIcon);
  initWidget(container);
 }

 public String getText()
 {
  return textBox.getText();
 }

 public void setText(String value)
 {
  textBox.setText(value);
 }

 @Override
 public void setWidth(String value)
 {
  textBox.setWidth(value);
 }
}</pre>
<p><span style="color:#ff0000;"><span style="color:#000000;">The same goes for the <span style="color:#3366ff;"><em>VTextArea </em></span>class implementation so I omit it here. You can also analogically create V-classes from virtually any widget that should be validatable.</span></span></p>
<p><span style="color:#ff0000;"><span style="color:#000000;">Here is the implementation of the form:</span></span></p>
<pre>public class NewCommentForm extends Composite implements IValidatableForm {
 private List&lt;IValidatable&gt; validatableFields = new ArrayList&lt;IValidatable&gt;();
 private FlowPanel container;
 private HorizontalPanel userNameHolder;
 private Label userNameLable;
 private VTextBox userNameField;
 private HorizontalPanel commentBodyHolder;
 private Label commentBodyLable;
 private VTextArea commentBodyField;
 private Button submitButton;

 public NewCommentForm()
 {
  super();
  container = new FlowPanel();
  userNameHolder = new HorizontalPanel();
  commentBodyHolder = new HorizontalPanel();
  userNameLable = new Label("Name");
  userNameField = new VTextBox();
  userNameField.setIsRequired(true);
  userNameField.setWidth("200px");
  registerField(userNameField);
  commentBodyLable = new Label("Comment");
  commentBodyField = new VTextArea();
  commentBodyField.setIsRequired(true);
  commentBodyField.setWidth("400px");
  commentBodyField.setHeight("200px");
  registerField(commentBodyField);
  userNameHolder.add(userNameField);
  userNameHolder.add(userNameLable);
  commentBodyHolder.add(commentBodyField);
  commentBodyHolder.add(commentBodyLable);
  container.add(userNameHolder);
  container.add(commentBodyHolder);
  submitButton = new Button("Submit");
  container.add(submitButton);
  initWidget(container);
 }

 public void setSubmitHandler(ClickHandler handler)
 {
  submitButton.addClickHandler(handler);
 }

 public String getUserName()
 {
  return userNameField.getText();
 }

 public String getCommentBody()
 {
  return commentBodyField.getText();
 }

 public void reset()
 {
  userNameField.setText("");
  commentBodyField.setText("");
 }

 @Override
 public boolean indicateValidity(List&lt;ValidationResult&gt; validationResult) {
  boolean result = true;
  if (validationResult != null)
  {
   for (ValidationResult fieldValidity: validationResult)
   {
    fieldValidity.getValidatedObject().indicateValidity(fieldValidity.isValid());
    if (! fieldValidity.isValid())
    {
     result = false;
    }
   }
  }
  return result;
 }

 @Override
 public void registerField(IValidatable field) {
  validatableFields.add(field);
 }

 @Override
 public void unregisterField(IValidatable field) {
  int index = validatableFields.indexOf(field);
  if (index != -1)
  {
   validatableFields.remove(index);
  }
 }

 @Override
 public List&lt;ValidationResult&gt; validate() {
  List&lt;ValidationResult&gt; result = new ArrayList&lt;ValidationResult&gt;();
  for (IValidatable field: validatableFields)
  {
   result.add(field.validate());
  }
  return result;
 }
}
</pre>
<p>So the form and its constituents are ready.<br />
Now is the time to compose everything together. I am doing this in a PopupPanel:</p>
<pre>public class NewPopupComment extends PopupPanel {

 private CommentItem parentCommentItem;
 private HorizontalPanel container;
 private NewCommentForm newCommentForm;

 public NewPopupComment(CommentItem commentItem)
 {
  super(false, true);
  this.parentCommentItem = commentItem;
  container = new HorizontalPanel();
  newCommentForm = new NewCommentForm();
  newCommentForm.setSubmitHandler(new ClickHandler(){
  @Override
  public void onClick(ClickEvent event) {
   List&lt;ValidationResult&gt; validationResult = newCommentForm.validate();
   if (newCommentForm.indicateValidity(validationResult))
   {
    //here validation is passed and here should go the corresponding code.
   }
  }
  container.add(newCommentForm);
  Image closeIcon = new Image("/images/buttons/close.png");
  closeIcon.addClickHandler(new ClickHandler()
  {
   @Override
   public void onClick(ClickEvent event) {
    NewPopupComment.this.hide();
    NewPopupComment.this.clear();
   }
  });
  container.add(closeIcon);
  add(container);
  center();
 }
}
</pre>
<p>As you can see the form is instantiated, placed into the popup and the submit button handler is setup which is actually doing the validation job among others.</p>
<pre>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/361/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/361/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/361/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=361&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2010/02/22/gwt-simple-form-navigation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>

		<media:content url="http://aarendar.files.wordpress.com/2010/02/form.png" medium="image">
			<media:title type="html">Form</media:title>
		</media:content>
	</item>
		<item>
		<title>GWT + GAE + JDO + TagSoup + Xalan = Funny Little Site</title>
		<link>http://aarendar.wordpress.com/2010/02/15/gwt-gae-jdo-tagsoup-xalan-funny-little-site/</link>
		<comments>http://aarendar.wordpress.com/2010/02/15/gwt-gae-jdo-tagsoup-xalan-funny-little-site/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 11:05:37 +0000</pubDate>
		<dc:creator>Alexander Arendar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GAE]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[jdo]]></category>
		<category><![CDATA[tagsoup]]></category>
		<category><![CDATA[xalan]]></category>

		<guid isPermaLink="false">http://aarendar.wordpress.com/?p=353</guid>
		<description><![CDATA[In one of my previous posts I started my adventures with GWT technology. The best way of learning new technology is implementation of some real idea that you have in your head. Many of you should know the Artemiy Lebedev&#8217;s design studio site. Sometimes when I have a spare minute I like to visit their [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=353&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://aarendar.wordpress.com/2010/01/11/custom-integration-of-gwt-widgets-into-jsps/">one</a> of my previous posts I started my adventures with GWT technology.</p>
<p>The best way of learning new technology is implementation of some real idea that you have in your head.</p>
<p>Many of you should know the Artemiy Lebedev&#8217;s design studio <a href="http://www.artlebedev.ru/">site</a>. Sometimes when I have a spare minute I like to visit their <a href="http://www.artlebedev.ru/kovodstvo/business-lynch/2010/02/15/">Business Lynch</a> block. Their idea is very funny: people sends examples of their own design pieces and ask professionals from Lebedev art studio to evaluate and comment them. Most often they comment the work in a &#8220;It sucks&#8221; fashion.<br />
I always wished there was a possibility for site visitors to leave comments there as well, that would be funny. But authors of the site did not provide such possibility.</p>
<p>So my idea was to create a small site that will cut from the ArtLebedev portal only Business Lynch block and allow visitors posting their comments. And I wanted this to be done on GAE and with help of GWT.</p>
<p>I did it quite fast, in few days of work. The result is here: <a href="http://art-lebedev-mirror.appspot.com/">art-lebedev-mirror</a>.</p>
<p>Now I will briefly describe how it is done and what I used and learned for doing it.</p>
<p>The first thing was to get the raw HTML content of the original site and extracting the Business Lynch block out of there. So I needed a parser. My brain already tried earlier the convenient way of working with XML in Flex so I was about to work with DOM instead of some SAX parsers.</p>
<p>Most of SAX parsers expect y0u feed them with well formed XML documents. As you might already suggest the HTML source code of the ArtLebedev site was not strict and well-formed <strong>enough</strong>. So good well-known SAX parsers just thrown me some errors and refused to dig further.</p>
<p>Then I found in the internet the <a href="http://home.ccil.org/~cowan/XML/tagsoup/">TagSoup</a> parser which was designed specifically to be able to parse even very crappy documents. Also I found out the <a href="http://xml.apache.org/xalan-j/">Apache Xalan </a>processor. I feed the SAX-source produced by TagSoup to Xalan and it gave me a nice DOM representation of the HTML source code. So I was able to cut out the pieces I need.</p>
<p>The next thing was to add commenting facility. I decided to use GAE JDO for persistence and GWT for the overall UI.</p>
<p>There was one surprise with JDO here. As far as comment can be replied to other comments I decided to model the data entities recursively, i.e. allowing Comment entity to contain list of other Comment entities. I wasted the whole day on this trying to understand why the simple thing is not working and finally good people shown me this known DataNucleus <a href="http://code.google.com/p/datanucleus-appengine/issues/detail?id=80">issue</a>.  So I needed to redevelop the relationship as unowned <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In the process I learned also a log of different small things in GWT that you will not feel until you start building real things.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aarendar.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aarendar.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aarendar.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aarendar.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aarendar.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aarendar.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aarendar.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aarendar.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aarendar.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aarendar.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aarendar.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aarendar.wordpress.com/353/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aarendar.wordpress.com/353/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aarendar.wordpress.com/353/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aarendar.wordpress.com&amp;blog=3877007&amp;post=353&amp;subd=aarendar&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aarendar.wordpress.com/2010/02/15/gwt-gae-jdo-tagsoup-xalan-funny-little-site/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ad86d780fec0e2069c8f375b27755933?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">memory leak</media:title>
		</media:content>
	</item>
	</channel>
</rss>
