<?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/"
	>

<channel>
	<title>Shaun Abram &#187; OpenSource</title>
	<atom:link href="http://www.shaunabram.com/category/opensource/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shaunabram.com</link>
	<description>Java and Technology weblog</description>
	<lastBuildDate>Tue, 27 Jul 2010 23:14:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>OSCON Day4: WebSockets</title>
		<link>http://www.shaunabram.com/oscon-day4-websockets/</link>
		<comments>http://www.shaunabram.com/oscon-day4-websockets/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 01:03:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[comet]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[oscon]]></category>
		<category><![CDATA[websockets]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=882</guid>
		<description><![CDATA[The first talk of the day I attended at Day 4 of OSCON was from Sean Sullivan (Aravo), who gave a talk on &#8220;Programming WebSockets&#8220;. Intro WebSockets is a technology that enables bidirectional communication between web browsers and server side processes. It provides a persistent connection between client &#038; Server, hence enabling &#8216;push&#8217; abilities where [...]]]></description>
			<content:encoded><![CDATA[<p>The first talk of the day I attended at Day 4 of <a href="http://www.oscon.com/oscon2010">OSCON</a> was from Sean Sullivan (<a href="http://www.aravo.com/">Aravo</a>), who  gave a talk on &#8220;<a href="http://www.oscon.com/oscon2010/public/schedule/detail/13805">Programming WebSockets</a>&#8220;.</p>
<h3>Intro</h3>
<p><a href="http://en.wikipedia.org/wiki/WebSockets">WebSockets</a> is a technology that enables bidirectional communication between web browsers and server side processes. It provides a persistent connection between client &#038; Server, hence enabling &#8216;push&#8217; abilities where you can push data/notification to browsers from the client. Other client communication options to compare it with would be <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29">Ajax</a><br />
and <a href="http://en.wikipedia.org/wiki/Comet_%28programming%29">Comet</a> (basically Ajax with long polling).</p>
<p><span id="more-882"></span> </p>
<h3>Specifications</h3>
<ul>
<li><a href="http://dev.w3.org/html5/websockets/">WebSockets API</a> &#8211; This focuses on the client side programming model.</li>
<li><a href="http://www.whatwg.org/specs/web-socket-protocol/">WebSockets protocol</a> &#8211; Describes the client/server communication in more detail. More complicated and 51 pages long. The WebSockets protocol is still actively being changed.</li>
</ul>
<h3>Browser Support</h3>
<ul>
<li>Google Chrome 4.0.249.0 and higher (v5 has WebSockets enabled by default)</li>
<li>Safari 5.0</li>
<li>FireFox 4.0 beta 1</li>
<li>
IE 9: TBD</li>
</ul>
<p>There was a suggestion that Apple have decided to disable WebSockets in iOS4 but this is unconfirmed and the speaker suspects Apple will support WebSockets in the future.</p>
<h3>Server side support</h3>
<ul>
<li>Apache Server &#8211; not supported yet</li>
<li><a href="http://code.google.com/p/pywebsocket/">Py WebSocket</a> &#8211; designed for use with Apache Server (actually implemented by Google Chromium team.)</li>
<li>There is also a DJango solution: <a href="http://pypi.python.org/pypi/django-websocket/">django-websocket</a></li>
<li><a href="http://blogs.webtide.com/gregw/entry/jetty_websocket_server">Jetty WebSocket Server</a> &#8211; Jetty has supported WebSockets since last September. This seems to be a good option.</li>
</ul>
<p>However, note that there is no standard service side Java API. Each Java container has it&#8217;s own API. Therefore it will likely be difficult to write WebSockets for one app server and do a straight port to another app server.</p>
<h3>Projects</h3>
<p>Other Java Projects supporting WebSockets:</p>
<ul>
<li>GlassFish/Grizzly (see a DZone posting on it <a href="http://www.dzone.com/links/glassfish_web_sockets_sample.html?ref=rs">here</a>)</li>
<li><a href="http://jwebsocket.org/">jWebSocket</a></li>
<li><a href="http://jboss.org/netty">JBoss Netty</a> (see patch <a href="https://jira.jboss.org/browse/NETTY-264">here</a>)</li>
<li><a href="http://www.caucho.com/resin/examples/websocket-java/index.xtp">Caucho Resin</a></li>
</ul>
<p>Sean finished by showing the <a href="http://code.google.com/p/quake2-gwt-port/">Google Quake demo</a> (also reported <a href="http://www.bit-tech.net/news/2010/04/05/google-ports-quake-2-to-html5/1">here</a>).</p>
<p>The conclusion of the talk was on how to gracefully handle browsers that don&#8217;t support WebSockets (e.g. IE8). The main option here seems to be &#8220;<a href="http://code.google.com/p/jquery-graceful-websocket/">The Graceful WebSocket</a>&#8220;. This resorts back to using AJAX long pulling if WebSockets isn&#8217;t supported in the browser.</p>
<h3>My Thoughts</h3>
<p>WebSockets looks like one of the most interesting technologies that fall under the HTML5 umbrella. If it gets wide browser support (e.g. IE9), and perhaps some standardization on the server side, it could really take off and even potentially over take Ajax. Definitely one to watch&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/oscon-day4-websockets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open Source Convention in Portland, Oregon</title>
		<link>http://www.shaunabram.com/attending-oscon/</link>
		<comments>http://www.shaunabram.com/attending-oscon/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 18:18:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[OpenSource]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=863</guid>
		<description><![CDATA[I will be attending the week long Open Source Convention (OSCON) next week in Portland, Oregon. Looking forward to it as there is a huge variety of talks, including databases, Android, Scala, Spring, HTML5 and a bunch of Google technologies. Get in touch with me at Shaun at Abram dot com if you happen to [...]]]></description>
			<content:encoded><![CDATA[<p>I will be attending the week long Open Source Convention (<a href="http://www.oscon.com">OSCON</a>) next week in Portland, Oregon. Looking forward to it as there is a huge <a href="http://www.oscon.com/oscon2010/public/schedule/grid">variety of talks</a>, including databases, Android, Scala, Spring, HTML5 and a bunch of Google technologies. Get in touch with me at Shaun at Abram dot com if you happen to be going along&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/attending-oscon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selenium talk at SF JUG</title>
		<link>http://www.shaunabram.com/sfjug-selenium/</link>
		<comments>http://www.shaunabram.com/sfjug-selenium/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 07:26:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[q]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[sfjug]]></category>
		<category><![CDATA[unittesting]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=749</guid>
		<description><![CDATA[I attended another great San Francisco JUG meeting tonight, this time on How to use Selenium with Maven/Ant to automate testing of web apps. The talk was given by Chris Bedford, from Build Lackey Labs &#8211; &#8220;Automating the Monkey Work Out and the Quality In!&#8221;. Overall, I thought this was a great talk by Chris. [...]]]></description>
			<content:encoded><![CDATA[<p>I attended another great <a href="http://www.sfjava.org/calendar/10674274/">San Francisco JUG</a> meeting tonight, this time on <a href="http://www.sfjava.org/calendar/11982857/">How to use Selenium with Maven/Ant to automate testing of web apps</a>.</p>
<p>The talk was given by Chris Bedford, from <a href="http://buildlackey.com/">Build Lackey Labs</a> &#8211; &#8220;Automating the Monkey Work Out and the Quality In!&#8221;. Overall, I thought this was a great talk by Chris. He clearly has a huge amount of experience creating automated tests and integrating them with build tools and he gave a well structured, interesting, well delivered presentation. I have posted a copy of <a href="http://www.shaunabram.com/attachments/testing-java-web-apps-with-selenium5.ppt">Chris&#8217;s slides</a> and I think the video will be posted on the SF JUG site at some point, but I have also posted my notes from the presentation below&#8230;<br />
<span id="more-749"></span></p>
<h3>Selenium Overview</h3>
<p>Chris started off with an overview of <a href="http://seleniumhq.org/">Selenium</a> &#8211; a tool for automating tests for web based applications. He then introduced us to the Selenium IDE &#8211; a Firefox add-on that allows you to set up tests by recording clicks on a web page, or by manually entering commands. The tests can then be played back as part of your automated test suite.</p>
<h3>Creating Selenium Tests</h3>
<p>Chris showed us the process by both executing an existing test he had already setup, and by walking us through the creation of a new test, which loaded a page, waited for text to be present, clicked on a link, and confirmed that text was present. The test was a html file, but he showed how to export it as <a href="http://testng.org/doc/index.html">TestNG</a> and <a href="http://www.junit.org/">JUnit</a> tests  (although both exports resulted in kind of ugly java code!)</p>
<h3>Possible hiccups with Selenium</h3>
<p>One of the things I thought Chris did well was, in addition to pointing out all the many great things about Selenium, he also pointed out some of the slight issues with Selenium that he has encountered during his time using it, such as</p>
<ul>
<li>Difficulties getting the initial Open page to work</li>
<li>Issues with where the test files get saved</li>
<li>Making sure you have the tests run slow to start with (to avoid timing/loading issues)</li>
<li>The Selenium IDE may be difficult to get working with IE (Firefox is fine)</li>
</ul>
<h3>Selenium Components</h3>
<p>The main Selenium section then finished up with a quick over of the various Selenium Components:</p>
<ul>
<li>Selenium IDE</li>
<li>Selenese Commands</li>
<li>Selenium RC (Remote Control)</li>
</ul>
<p>Chris also had a section on the &#8216;<a href="http://en.wikipedia.org/wiki/Same_origin_policy">same origin</a>&#8216; JavaScript  policy that Selenium manages to circumvent by using the Selenium RC Server. He managed to explain the issue in simple terms.</p>
<h3>Other functional test alternatives</h3>
<p>Chris discussed other functional test alternatives by comparing <a href="http://webtest.canoo.com/webtest/manual/WebTestHome.html">Canoo</a> to Selenium (Canoo is also an automated web app testing framework).</p>
<p>Chris also mentionted <a href="http://code.google.com/p/umangite/">Umangite</a>, Chris Richardson&#8217;s open source testing framework that makes Selenium tests easier to write. I have used this before, and agree it is worth checking out&#8230;</p>
<h3>Using Selenium with Build Tools</h3>
<p>He then discussed using Maven with Selenium, including using <a href="http://cargo.codehaus.org/">Cargo</a> (e.g. using the <a href="http://cargo.codehaus.org/Maven2+plugin">cargo maven2 plugin</a>). Cargo is a set of APIs that assists in</p>
<ul>
<li>installing web containers, such as Tomcat, JBoss</li>
<li>booting and shutting them down</li>
<li>deploying web apps (.wars, .ears)</li>
</ul>
<p>Chris finished the Selenium &#038; build tools section with a quick run through of using Selenium with <a href="http://ant.apache.org/">Ant</a>.</p>
<h4>Continuous Integration</h4>
<p>The final section of the presentation was a talk on Continuous Integration (CI). Chris described CI as: </p>
<ul>
<li>A dedicated box (see my follow up question below!) that runs regular full builds (including tests) of your software</li>
<li>Build triggers when any developer checks into SCM</li>
<li>Team is notified of any issues</li>
</ul>
<p>And talked about how Selenium can be used with <a href="http://hudson-ci.org/">Hudson</a> &#8211; a very cool CI tool from Sun. This leads well into <a href="http://www.sfjava.org/calendar/12296161/">next month&#8217;s SF JUG talk</a>!</p>
<h3>Q&#038;A</h3>
<p>Q: Do you have any info on WebDriver merging with Selenium?<br />
A: No, but sounds interesting!</p>
<p>Q: How closely do test writers work with marketing people?<br />
A: Chris suggested checking out the <a href="http://www.easyb.org/">easyb</a> framework, a behavior driven development framework that allows you to write conditions in a very abstract level, using a DSL that marketers can use and understand. He also suggested looking at the <a href="http://www.fitnesse.org/">fitnesse</a> framework.</p>
<p>Q: I asked Chris via email after the talk what he meant by needing &#8216;dedicated&#8217; box/server for Continuous Integration.<br />
A: He clarified that by &#8216;dedicated&#8217;, he just meant that the build box  should not be a box that you are doing development on, and that there isn&#8217;t anything wrong with having a mix of services on one machine. e.g. having a qa box that has the CI server and maybe hosts the bug tracking system as well&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/sfjug-selenium/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Data binding in Spring MVC</title>
		<link>http://www.shaunabram.com/data-binding-in-spring-mvc/</link>
		<comments>http://www.shaunabram.com/data-binding-in-spring-mvc/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 08:35:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=667</guid>
		<description><![CDATA[Two of the most important tasks carried out by Spring MVC when you submit a form are Data binding and validation. The following article discusses data binding, including the use of custom PropertyEditors, and some of the options available for registering such editors. Most of the information discussed applies to Spring in general, but its [...]]]></description>
			<content:encoded><![CDATA[<p>Two of the most important tasks carried out by Spring MVC when you submit a form are Data binding and validation.<br />
The following article discusses data binding, including the use of custom PropertyEditors, and some of the options available for registering such editors. Most of the information discussed applies to Spring in general, but its application in Spring MVC is my primary interest.</p>
<p>In a future article I would like to discuss validation including the use of custom error messages.</p>
<p>Note that these notes relate to version 2.5.6 of Spring, the latest production code at time of writing, and depend heavily on the corresponding <a href="http://static.springsource.org/spring/docs/2.5.x/reference/">Spring reference docs</a>.</p>
<h2>Data Binding</h2>
<p>Spring MVC allows the use of command objects (aka form backing objects, model attributes, domain model objects &#8211; basically the objects used to transport data between your view and your controller) using just about any type. However, the Servlet API deals with form parameters as Strings. Spring uses a technique called data binding to covert between the String representation and the real underlying type. This enables user input to be bound to the objects you use to process user input. In other words, the values entered by a user in a form can be used to set the property values on a chosen object.<br />
As well as binding the values, Spring includes support for validation and binding result analysis. </p>
<p>The binding functionality is provided by Spring&#8217;s <a href="http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/validation/DataBinder.html">org.springframework.validation.DataBinder</a> class.<br />
And when converting a String to some arbitrary type, DataBinders make use of ProperEditors. PropertyEditors are not Spring specific, but rather part of the <a href="http://java.sun.com/javase/7/docs/api/java/beans/PropertyEditor.html">JavaBeans API</a>.</p>
<h3>Using PropertyEditors</h3>
<p>Spring heavily uses the concept of PropertyEditors to effect the conversion between an Object and a String.<br />
Spring has a number of built-in PropertyEditors to make life easy (for a complete list, see <a href="http://static.springsource.org/spring/docs/2.5.x/reference/validation.html#beans-beans-conversion">here</a>).<br />
If you are using a custom type that Spring is unable to convert to and from a String, you will likely receive a lovely error such as this:</p>
<blockquote><p>org.springframework.web.bind.ServletRequestBindingException: Errors binding onto object &#8216;dependsOnExoticType&#8217;; nested exception is org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors<br />
Field error in object &#8216;dependsOnExoticType&#8217; on field &#8216;type&#8217;: rejected value [test]; codes [typeMismatch.dependsOnExoticType.type,typeMismatch.type,typeMismatch.example.ExoticType,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [dependsOnExoticType.type,type]; arguments []; default message [type]]; default message [Failed to convert property value of type [java.lang.String] to required type [example.ExoticType] for property &#8216;type&#8217;; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [example.ExoticType] for property &#8216;type&#8217;: no matching editors or conversion strategy found]</p></blockquote>
<p>The solution is to create your own custom editor.</p>
<h4>Creating a custom property editor</h4>
<p>A custom property editor should be of type java.beans.PropertyEditor. It tells Spring how to convert to a String and back again. As an example, see the ExoticTypeEditor in the Spring reference docs <a href="http://static.springsource.org/spring/docs/2.5.x/reference/validation.html#beans-beans-conversion-customeditor-registration">here</a>. </p>
<p>The question is then how to register the custom editor. </p>
<h4>Registering your custom editor</h4>
<p>There are several ways to ensure you custom editor gets registered.</p>
<h5>1) Put Editor in same package</h5>
<p>The simplest way (by far!) is to put the Editor in the same package as the class it handles. This is because the standard JavaBeans infrastructure will automatically discover PropertyEditor classes (without you having to register them explicitly) if they are in the same package as the class they handle, and have the same name as that class, with&#8217;Editor&#8217; appended;</p>
<p>However, if putting the Editor in the same package as the class it handlers is not possible (If for example, you are using a custom type from a 3rd party library and hence you don&#8217;t have access to the source code), try one of the other options below&#8230;</p>
<h5>2) CustomEditorConfigurer </h5>
<p>Another approach to registering a custom PropertyEditor is to use a special bean factory post-processor called CustomEditorConfigurer.<br />
This is the approach used in the spring reference manual for the &#8216;ExoticType&#8217; example. Again, see<br />
section 5.4.2.1. Registering additional custom PropertyEditors, <a href="http://static.springsource.org/spring/docs/2.5.x/reference/validation.html#beans-beans-conversion-customeditor-registration">here</a>.</p>
<p>The CustomEditorConfigurer is used to register the new PropertyEditor with the ApplicationContext, which will then be able to use it as needed.</p>
<h6>Gotchas</h6>
<p><h7>i) Won&#8217;t work with BeanFactory &#8211; only ApplicationContext</h7><br />
The PropertyEditors defined in the &#8216;customEditorConfigurer&#8217; bean will only be automatically used if you are using an ApplicationContext implementation (i.e. will not work for BeanFactory). This is discussed <a href="http://forum.springsource.org/showthread.php?t=15951">here</a>.<br />
<h7>ii) Only works for ApplicationContext created beans &#8211; not data binding beans such as form objects</h7><br />
This approach only works for beans created by the ApplicationContext. The PropertyEditors that are registered via CustomEditorConfigurer are NOT available for use in the data binding infrastructure (this is discussed <a href="http://forum.springsource.org/showthread.php?t=30759">here</a> and <a href="http://jira.springframework.org/browse/SPR-1210">here</a>).<br />
I think this should be made more clear in the spring framework ref docs (although, in fairness, it is covered in the <a href="http://static.springsource.org/spring/docs/3.0.0.M1/javadoc-api/org/springframework/beans/factory/config/CustomEditorConfigurer.html">CustomEditorConfigure javadocs</a>).</p>
<p>
So, if you are using Spring MVC and dealing with form submission, the next option may be better&#8230;</p>
<h5>3) Explicitly register your editor in initBinder</h5>
<p>So, a better approach, as far as form data binding is concerned, is to explicitly register your editor within initBinder() in the relevant Controller. e.g.</p>
<pre>
<code>@Controller
@RequestMapping("/exoticView.htm")
public class TestController {

	//post and get handling methods etc...

	@InitBinder
	protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) {
		binder.registerCustomEditor(ExoticType.class, new ExoticTypeEditor());
	}

}</code>
</pre>
<h5>4) Use a WebBindingInitializer</h5>
<p>If you find yourself using the above approach (registering your customer editor in initBinder) in many controllers, and you use a annotation based controller (Spring 2.5+), then you can use a WebBindingInitializer to register global property editors. </p>
<p>To do this, create a class that implements the WebBindingInitializer interface, for example</p>
<pre>
<code>public class GlobalBindingInitializer implements WebBindingInitializer {

    public void initBinder(WebDataBinder binder, WebRequest request) {
        binder.registerCustomEditor(ExoticType.class, new ExoticTypeEditor());
    }

}</code>
</pre>
<p>Then update your web application context file to contain:</p>
<pre>
<code>&lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"&gt;
    &lt;property name="webBindingInitializer"&gt;
        &lt;bean class="GlobalBindingInitializer"/&gt;
    &lt;/property&gt;
&lt;/bean&gt;</code>
</pre>
<p>I discovered this approach in a posting on <a href="http://stackoverflow.com/about">StackOverflow </a> about <a href="http://stackoverflow.com/questions/1416423/hidden-features-of-spring-framework">hidden features of Spring </a>. It means you can register an editor once and use it anywhere. <strong><em>This is now my preferred way to register custom property editors.</em></strong></p>
<h5>5) Use PropertyEditorRegistrar</h5>
<p>Another mechanism for registering property editors with the Spring container, and the final one in the Spring reference docs, is to create and use a PropertyEditorRegistrar. See section 5.4.2.1.1 <a href="http://static.springsource.org/spring/docs/2.5.x/reference/validation.html#beans-beans-conversion-customeditor-registration">here</a>. The docs say that this is a good approach &#8220;when you need to use the same set of property editors in several different situations&#8221;. I have used this approach successfully in the past, but to be honest, I don&#8217;t quite see the benefits beyond the GlobalBindingInitializer approach above and it seems to require a few more steps. (I also saw some confusing debate on exactly what steps are mandatory <a href="http://jira.springframework.org/browse/SPR-3512?focusedCommentId=28100&#038;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_28100">here</a>)</p>
<h5>6) BeanInfo</h5>
<p>There is also a BeanInfo mechanism mentioned in the Spring docs which I admit I have never tried &#8211; or fully understood.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/data-binding-in-spring-mvc/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>GTUG Campout Demos</title>
		<link>http://www.shaunabram.com/gtug-camp-out-demos/</link>
		<comments>http://www.shaunabram.com/gtug-camp-out-demos/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 17:15:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[campout]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[gtug]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=545</guid>
		<description><![CDATA[Last night saw the end of the Google Technology Campout weekend, with about 25 or 30 groups giving demos of a lot of cool Wave apps. I particularly liked the robot/gadget that analyzed when it was time for a group of wave participants to leave the wave and meet in real life, supplying a list [...]]]></description>
			<content:encoded><![CDATA[<p>Last night saw the end of the Google Technology Campout weekend, with about 25 or 30 groups giving demos of a lot of cool Wave apps. I particularly liked the robot/gadget that analyzed when it was time for a group of wave participants to leave the wave and meet in real life, supplying a list of possible venues to meet based on the participants&#8217; physical location. A vocabulary analyzer from a group of brothers also looked pretty good. I also liked the h3lp application, kind of like an Onstar four your mobile phone, which pushed out alerts to selected contacts in case of an emergency. In the end, the winner was the video sharing team. </p>
<p>The demo for our BlipWiki project (which I blogged about <a href="http://www.shaunabram.com/gtug-campout-followup/">here</a>) unfortunately had technical difficulties so our presentation didn&#8217;t go so well. One of our 2 browsers couldn&#8217;t seem to connect so we didn&#8217;t get to show our Wiki updating in real time in the way we would have liked. Still, I think we had a great application at the end of the weekend, and I certainly learned a lot, met a lot of great people, and got to know Google Wave much better. A great weekend&#8230;</p>
<p>There are photos and videos from the weekend posted <a href="http://sites.google.com/site/svgtugcampout/video-and-photo">here</a> and a write up in the San Jose <a href="http://www.mercurynews.com/ci_13027427">Mercury News</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/gtug-camp-out-demos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GTUG Campout Follow up</title>
		<link>http://www.shaunabram.com/gtug-campout-followup/</link>
		<comments>http://www.shaunabram.com/gtug-campout-followup/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 10:12:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[campout]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[gtug]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=510</guid>
		<description><![CDATA[I&#8217;m currently at the Google Technology User Group Camp out weekend down at Google&#8217;s offices in Mountain View. The objective of the weekend is to form a team and develop an application, using Google technologies. The demos are Sunday afternoon. I joined the Blip Wiki team. A Blip is simply a single message within a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently at the <a href="http://www.meetup.com/sv-gtug/pages/GTUG_Campout:_Silicon_Valley/">Google Technology User Group Camp out</a> weekend down at Google&#8217;s offices in Mountain View. The objective of the weekend is to form a team and develop an application, using Google technologies. The demos are Sunday afternoon.</p>
<p>I joined the <a href="http://tr.im/blipwiki">Blip Wiki</a> team. A Blip is simply a single message within a &#8216;Wave&#8217; conversation. A Wiki, of course, is a software tool that allows users to easily create, link and collaborate on documents. So, our goal with the &#8216;Blip Wiki&#8217; project was to bring the incredible collaboration capabilities of Google Wave (real time updates, autocorrect context sensitive spelling etc) to the easy document setup and linkability of a Wiki.<br />
Although Wave can certainly be used to collaboratively create documents as it is, Wave is inherently conversation focused. We wanted Blip Wiki to be inherently Document focused.</p>
<p>To do this however, we needed to use our own instance of a Wave server i.e. use the <a href="http://code.google.com/p/wave-protocol/">Google Wave Federation Prototype Server</a> rather than the regular Wave server hosted by Google. We also needed to come up with a new client (something like <a href="http://www.tiddlywiki.com/">tiddlywiki</a>) and, most importantly, ensure our client can communicate with the server. Our project won the award for the most ambitious pitch at the start of the weekend!</p>
<h3>Federation Prototype Server and example client</h3>
<p>We got off to a good start by getting the Wave Prototype Server downloaded, building and running (it runs on top of <a href="http://www.igniterealtime.org/projects/openfire/index.jsp">OpenFire</a>, a real time collaboration server that uses XMPP/Jabber). We then got the <a href="http://code.google.com/p/wave-protocol/wiki/ConsoleClient">demo wave client</a> running and talking to our server. We managed this by late Friday evening.</p>
<h3>Client/Server protocol</h3>
<p>Next, we created our own demo client and tried to get it interacting with our Wave server. That is when we started running into problems. First, the client/server protocol has not yet been formalized, and there don&#8217;t seem to be any definite plans to do that yet either. For example, although this <a href="http://www.waveprotocol.org/whitepapers/internal-client-server-protocol">Client Server Protocol White paper</a> describes a protocol and data model, it does not give any details on the format that should be used, or suggestions on how to use it. There is a lengthy discussion in the <a href="http://groups.google.com/group/wave-protocol/browse_thread/thread/a2de2480e4c3beeb/28e7f75f428ad9f3?lnk=raot">Wave Protocol Google Group</a> about this. For example, someone suggests that the client server protocol is just <a href="http://code.google.com/p/protobuf/">protocol buffers</a> &#8216;over the wire&#8217;.  But a protobuf is really just a simple data format, and while I assume &#8216;over the wire&#8217; means RPC, it is all a bit vague.</p>
<h3>Submitting changes</h3>
<p>The client/server protocol used in the example client (a &#8220;toy&#8217; text client) is for &#8220;illustrative purposes only&#8221;, according to this <a href="http://groups.google.com/group/wave-protocol/browse_thread/thread/618ff4e9ef477e80?tvc=2">doc</a>. We couldn&#8217;t seem to find much documentation for it, perhaps because it is not supposed to serve as a standardized example. As a result, we found it difficult to reverse engineer. So, we ended up resorting to using the Client example code to marshal our data to and from the server. The example client code in effect became a sort of interface to the server for us. A client side stub, if you will. (We had this running in the web tier servlet layer).</p>
<h3>Receiving updates</h3>
<p>So, after we had used the Client example code to submit changes (blip updates) to the server, our next hurdle was understanding the data that gets returned. Ideally, we would like a &#8216;delta&#8217; of the data. That is, after the server has done it <a href="http://www.waveprotocol.org/whitepapers/operational-transform">Operational Transformation</a> magic, we would just like the latest and greatest version of the data to display on the client. However, this proved difficult to get from the server. Instead all I could seem to get was a non-delimited complete history of the blip. I admit that this was done using pretty hacky code. I am sure there must be another, better way!</p>
<p>So, we ended up taking a similar approach to the example client, and just displaying the latest submissions.</p>
<h3>Demo ready &#8211; almost&#8230;</h3>
<p>Right now, we have a working client and server with updates made on one user&#8217;s WikiBlip automatically showing up in another users.</p>
<p>It would have been really nice to be able to deploy our local Wave Server to app engine, but apparently this isn&#8217;t possible since the OpenFire jars required aren&#8217;t on the whitelist of allowed jars.<br />
It also would have been nice to experiment with our local Wave server talking to the real Google Wave server (e.g. to have a regular wave client user be able to interact with a blip wiki), but apparently this is not possible due to authentication issues.</p>
<p>So, we chose a very difficult task for the weekend! But, we have a working version ready to demo and it has been a great weekend all in all.</p>
<h3>Thank you&#8217;s</h3>
<p>A big thank you to
<ul>
<li>Sriram and Sreejith, my BlipWiki teammates </li>
<li>Kevin and Van from the GTUG</li>
<li>Stephanie, Brian, Fred and all the all Googlers who made the weekend possible and great! </li>
</ul>
<p>I will post again later with the results of the demo&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/gtug-campout-followup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google Technology User Group Campout</title>
		<link>http://www.shaunabram.com/gtu-campout/</link>
		<comments>http://www.shaunabram.com/gtu-campout/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 20:13:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[googleAppEngine]]></category>
		<category><![CDATA[gtug]]></category>
		<category><![CDATA[gwt]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=433</guid>
		<description><![CDATA[I have signed up for the Google Technology User Group (GTUG) Campout. It is a weekend (August 7-9, 2009) of designing and coding an application, as part of a team, using Google technologies. As far as I know, Google &#8216;technologies&#8217; can include things like GWT, Android, OpenSocial etc, but there will be a particular emphasis [...]]]></description>
			<content:encoded><![CDATA[<p>I have signed up for the <a href="http://www.meetup.com/sv-gtug/pages/GTUG_Campout:_Silicon_Valley/">Google Technology User Group (GTUG) Campout</a>. It is a weekend (August 7-9, 2009) of designing and coding an application, as part of a team, using Google technologies. As far as I know, Google &#8216;technologies&#8217; can include things like <a href="http://code.google.com/webtoolkit/">GWT</a>, <a href="http://www.android.com/about/">Android</a>, <a href="http://code.google.com/apis/opensocial/">OpenSocial</a> etc, but there will be a particular emphasis on <a href="http://wave.google.com/">Google Wave</a> (due to members of the Wave team being out and about to help), and hence <a href="http://code.google.com/appengine/">Google App Engine</a>.</p>
<p>I am not too familiar with Wave yet, so this should be a great opportunity to get to know it better, meet a bunch of fellow techs, and hopefully produce something cool by the end of the weekend. Looking forward to it&#8230;</p>
<p>Registration is free, so if you are interested you can sign up at <a href="http://gtug-campout-sv.eventbrite.com/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/gtu-campout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SF JUG: Android UIs</title>
		<link>http://www.shaunabram.com/sfjug-android/</link>
		<comments>http://www.shaunabram.com/sfjug-android/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 05:22:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=416</guid>
		<description><![CDATA[There was another great San Francisco JUG meeting tonight down at the Google offices. It was all very well organized as usual by Sasa. The speaker was Romain Guy from Google&#8217;s Android UI team. He gave his talk from Google IO: Turbo-charge your UI: How to Make your Android UI Fast and Efficient. The presentation [...]]]></description>
			<content:encoded><![CDATA[<p>There was another great <a href="http://www.sfjava.org/calendar/10674274/">San Francisco JUG</a> meeting tonight down at the Google offices. It was all very well organized as usual by <a href="http://www.sfandroid.org/members/3329273/">Sasa</a>. The speaker was Romain Guy from Google&#8217;s Android UI team. He gave <a href="http://code.google.com/events/io/sessions/TurboChargeUiAndroidFast.html">his talk</a> from <a href="http://code.google.com/events/io/">Google IO</a>: Turbo-charge your UI: How to Make your Android UI Fast and Efficient.</p>
<p>The presentation slides can be found <a href="http://dl.google.com/io/2009/pres/Th_0230_TurboChargeYourUI-HowtomakeyourAndroidUIfastandefficient.pdf">here</a>.</p>
<p>I thought Romain was an excellent presenter and did a top job of talking on his area of expertise: Android UI development. He covered the issues you need to be aware of when developing Android UIs if you want them to be performant, best practices and work-arounds for the gotchas, as well as useful tools that can be used for development. Personally, I would have benefited from more of a broad overview and introduction to Android, but that is more a reflection of my own lack of knowledge on Android! Maybe the newly created <a href="http://www.sfandroid.org/">Android User Group</a> will provide an &#8216;Intro To&#8217; type talk at some point&#8230;</p>
<p>First, Romain covered the Andriod UI terminology (like Canvas, Drawable, Surfaces and Views) before covering the architecture.</p>
<p>The bulk of his talk covered how to make sure you UI runs fast, including:</p>
<ul>
<li> Avoiding runtime scaling of background images</li>
<li> Avoiding invalidating (i.e. redrawing) the entire screen and instead only invalidate the small part of the screen that has actually changed.</li>
<li> Minimizing the number of views you use (ideally have &lt;100, which seems pretty reasonable for a tiny phone screen!) and talked about some techniques to help with this including using ViewStubs and recycling views</li>
<li> Avoid allocating memory (apparently the Garbage Collector is slow and pretty much stops the world when it is running)</li>
<li> Use SoftReferences (objects that only have soft references to them will be kicked out of memory if the Garbage Collector needs more memory) and WeakReferences (which can help to avoid memory leaks) when possible</li>
</ul>
<p>He also talked about some neat dev and debug tools including <a href="http://android-developers.blogspot.com/2009/02/track-memory-allocations.html">Allocation Tracker</a> (which monitors objects being created, memory being allocated etc) and <a href="http://developer.android.com/guide/developing/tools/hierarchy-viewer.html">Hierarchy Viewer</a> (which shows you all the devices/windows/views you have how long things are taking to render).<br />
He also mentioned the <a href="http://developer.android.com/guide/developing/tools/emulator.html">Android emulator</a> that can be used for testing your apps.</p>
<p>Some of the questions from the Q&amp;A session included:</p>
<p>Q: Will Android support languages other than Java?<br />
A: Romain mentioned that there is a version of Scala and python that work on Android, but currently all APIs are in Java.</p>
<p>Q: Does Flash work on Android?<br />
A: Development is on-going and the Android team is working with Adobe.<br />
(I found more on the web about this topic here: <a href="http://gizmodo.com/5300800/flash-for-android-webos-landing-in-october">http://gizmodo.com/5300800/flash-for-android-webos-landing-in-october</a>)</p>
<p>Q: Can JavaFX be used on Android?<br />
A: Code might be hard to run on the phone and may not be performant.</p>
<p>Q: Apparently, Sony Ericsson are also building an Android phone. How do you plan to avoid fragmentation as other companies start shipping Android phones?<br />
A: CTS &#8211; Compatibility Test Suite<br />
You cant ship a phone as &#8216;Android&#8217; if it doesn&#8217;t pass the CTS.</p>
<p>Other links:<br />
<a href="http://d.andriod.com">http://d.andriod.com</a><br />
<a href="http://source.android.com/">source.android.com</a><br />
<a href="http://android.git.kernel.org/">android.git.kernel.org</a><br />
<a href="http://code.google.com/p/apps-for-android/">code.google.com/p/apps-for-andriod</a><br />
<a href="http://android-developers.blogspot.com/">http://android-developers.blogspot.com/</a><br />
<a href="http://forum.xda-developers.com/">http://forum.xda-developers.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/sfjug-android/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Spring and EJB 3 Integration</title>
		<link>http://www.shaunabram.com/spring_ejb3/</link>
		<comments>http://www.shaunabram.com/spring_ejb3/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 04:46:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[EJBs]]></category>
		<category><![CDATA[JUG]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=318</guid>
		<description><![CDATA[I attended another excellent SF JUG meeting earlier this month. It was a double billing with Talip Ozturk talking about Hazelcast, an opensource clustering and data distribution platform, and Reza Rehman speaking about EJB3 and Spring Integration. Reza is the author of EJB3 in Action and an accomplished speaker whom I had the chance to [...]]]></description>
			<content:encoded><![CDATA[<p>I attended another excellent <a href="http://www.sfjava.org/calendar/10392364/">SF JUG meeting</a> earlier this month. It was a double billing with Talip Ozturk talking about <a href="http://www.hazelcast.com/">Hazelcast</a>, an opensource clustering and data distribution platform, and <a href="http://www.rahmannet.net">Reza Rehman</a> speaking about EJB3 and Spring Integration.</p>
<p>Reza is the author of <a href="http://www.manning.com/panda/">EJB3 in Action</a> and an accomplished speaker whom I had the chance to meet at The Server Side Symposium earlier this year, so I was particularly interested in his talk. </p>
<p>Reza gave some background on EJBs and how they have been completely reinvented as part of the latest (EJB3) release, including using 100% annotations (no xml) and making heavy use intelligent defaulting. He also talked about how Spring became popular as an alternative to the heavyweigth approach of the older EJB releases and has thrived through its focus on integration with standards like JPA, JMS, JDBC and JAX-WS.</p>
<p>He then went on to his main point, which was that EJB3 and Spring can now be viewed as complimentary, rather than competing, technologies and he went on to back this up by discussing the integration strategies that can be used, including</p>
<ul>
<li>Embedding Spring inside a Java EE app server</li>
<li>Embedding an EJB3 embeddable container withing Tomcat with Spring</li>
<li>Enabling Spring @Autowired annotation in EJBs via Interceptors</li>
<li>Using EJB3 natively inside Spring using <a href="http://www.springsource.com/pitchfork">Spring Pitchfork</a></li>
</ul>
<p>Reza finished by reiterating the benefits of using Spring and EJBs together to increase ease of coding and vendor neutrality.</p>
<p>Overall, I thought it was an insightful presentation from Reza. I had studied EJBs back in the v2 release as part of the my SCEA certification, and have used Spring in several projects, but this was the first time I had a chance to hear how they can be used together. </p>
<p>I have made Reza&#8217;s presentation notes available <a href="http://www.shaunabram.com/jug/spring_ejb3_integration.pdf">here</a>, as well as his demo source code available <a href="http://www.shaunabram.com/jug/spring-ejb3-integration-demo.zip">here</a>. You can also follow him on his web site and blog at: <a href="http://www.rahmannet.net">www.rahmannet.net</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/spring_ejb3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TheServerSide Java Symposium &#8211; Day 2</title>
		<link>http://www.shaunabram.com/tss2009_day2/</link>
		<comments>http://www.shaunabram.com/tss2009_day2/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 20:26:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[theserverside]]></category>
		<category><![CDATA[tss]]></category>

		<guid isPermaLink="false">http://www.shaunabram.com/?p=268</guid>
		<description><![CDATA[Day 2 at TSS Java Symposium. The highlights of the second day at TSSJS2009 were a couple of interesting talks from Rod Johnson (Mr Spring) and a talk on Groovy from Scott Davis (Groovy.com). I have included links to some of my (limited) notes below, which includes links to the actual presentation slides (PDFs) where [...]]]></description>
			<content:encoded><![CDATA[<p>Day 2 at TSS Java Symposium.</p>
<p>The highlights of the second day at TSSJS2009 were a couple of interesting talks from Rod Johnson (Mr Spring) and a talk on Groovy from Scott Davis (Groovy.com).</p>
<p>I have included links to some of my (limited) notes below, which includes links to the actual presentation slides (PDFs) where available.</p>
<p><a href="http://www.shaunabram.com/tss2009-spring-keynote">Keynote: How Spring Fits into the Java Landscape</a> &#8211; Rod Johnson</p>
<p><a href="http://www.shaunabram.com/tss2009-advanced-spring">Spring for the advanced developer</a> &#8211; Rod Johnson</p>
<p><a href="http://www.shaunabram.com/tss2009-groovy">The Amazing Grrovy Weight Loss Plan</a> &#8211; Scott Davis</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shaunabram.com/tss2009_day2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
