<?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>Morris &#34;Mojo&#34; Jones &#187; Software and Systems</title>
	<atom:link href="http://mojo.whiteoaks.com/category/software-and-systems/feed/" rel="self" type="application/rss+xml" />
	<link>http://mojo.whiteoaks.com</link>
	<description>Code Monkey, Astronomer, Photographer, Bridge Player</description>
	<lastBuildDate>Mon, 31 Oct 2011 01:03:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Finding the test that corrupts the suite</title>
		<link>http://mojo.whiteoaks.com/2010/04/27/finding-the-test-that-corrupts-the-suite/</link>
		<comments>http://mojo.whiteoaks.com/2010/04/27/finding-the-test-that-corrupts-the-suite/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 16:59:03 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[unit tests]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=424</guid>
		<description><![CDATA[<p>(Finally a tech blog post &#8230;)</p>
<p>Stop me if you&#8217;ve heard this one before!  </p>
<p>The web application has excellent coverage in unit tests and integration tests that run continuously, but some time ago (weeks actually) some number of tests began failing with strange state errors. In our case, out of 138 test classes and 1176 tests, [...]]]></description>
			<content:encoded><![CDATA[<p>(Finally a tech blog post &#8230;)</p>
<p>Stop me if you&#8217;ve heard this one before! <img src='http://mojo.whiteoaks.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The web application has excellent coverage in unit tests and integration tests that run continuously, but some time ago (weeks actually) some number of tests began failing with strange state errors. In our case, out of 138 test classes and 1176 tests, 82 would error out.</p>
<p>The errors were all strange platform related things, like:</p>
<p><code>org.springframework.transaction.IllegalTransactionStateException: Pre-bound JDBC Connection found! JpaTransactionManager does not support running within DataSourceTransactionManager ...</code></p>
<p>Or:</p>
<p><code>java.lang.NoSuchMethodError: org.hibernate.cache.CacheException.</code></p>
<p>Naturally the failing tests all work when they&#8217;re run individually. Heard that one before?</p>
<p>I started out trying different combinations of tests. I could make a list of all the running test classes by grepping for &#8220;^Running &#8221; in the test output log. I started out using the maven option &#8220;-Dtest=TestClassOne,TestClassTwo,&#8230;&#8221; to try tests in different combinations. Most of the time, the erroring tests would work perfectly. When they didn&#8217;t, the errors would occur in different tests or be different errors.</p>
<p>The failure now was non-deterministic! One of the difficulties is that Maven/Surefire would run the tests in whatever order it wanted to. That approach wasn&#8217;t going to work at all.</p>
<p>From studying the Spring references a little, I understood that Spring would cache the application contexts created for unit tests in order to improve the run time of tests. Wiring up a large application is slow when it&#8217;s done once &#8212; multiply that by 138 test classes and a slow test suite becomes glacial.</p>
<p>Clearly some test class being run prior to the error tests was corrupting the cached Spring context, and ruining the downstream environment. Spring provides a <code>@DirtiesContext</code> annotation specifically to label tests that require Spring to reload the application context. The problem is finding the test doing the dirty work!</p>
<p>I needed to make the test runs deterministic &#8212; run the test classes in the same order, and start eliminating classes one at a time from the top of the order. Surefire doesn&#8217;t have a property to exclude a test on the command line, so it required editing the POM file to exclude each test class in order from the top.</p>
<p>It was a tedious task, as many hidden software problems can be. I had to keep careful track of the list of test classes, and change the <code>&lt;exclude&gt;TestClassExample&lt;/exclude&gt;</code> element for each test run. Fortunately each test run only required about two and a half minutes. After each test with one class excluded, I would examine the final result line for any change.</p>
<p>I was pretty confident that the culprit had to be an early test in the sequence, so I should only have to go about halfway through the successful test classes. Finally thirty-four classes into the list, I had my culprit.</p>
<p>Ironically enough, the test class causing all the problems was named <code>TestSpringConfigurations</code>. It had two tests that would simply verify that all of our wiring would successfully produce an application context. Marking the tests with the <code>@DirtiesContext</code> annotation made all of the following error tests run successfully.</p>
<p>Actually the @DirtiesContext annotation wasn&#8217;t necessary: The tests themselves included one fatal line: <code>context.close()</code>. By not closing the contexts after the test load, the cached application context was just fine for all the following tests.</p>
<p>One might argue that this class is pointless when run as part of a large test suite, since earlier tests have already loaded the application context. When Surefire arrives at <code>TestSpringConfigurations</code>, it is only using the already-cached context rather than loading a new one. Good point. But having the test in the suite also gives us a quick way to verify changes made to the application context configuration without running the whole set.</p>
<p>And finally the punch line: When the Spring configuration errors were finally vanquished, four test failures were revealed that were legitimately testing application code. Those test failures were completely masked by the Spring context corruption error.</p>
<p>Oh yes, that <code>TestSpringConfigurations</code> class has been in the suite for many months. Why did we only recently find it causing this corruption? No one here is quite positive, but the only major platform change we can point to is a switch from Java 5 to a Java 6 runtime. Maybe that triggered the original problem, and maybe sometime I&#8217;ll be interested enough to test that proposition.</p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2010/04/27/finding-the-test-that-corrupts-the-suite/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Perfect wallpaper from digital photos using Linux and Netpbm</title>
		<link>http://mojo.whiteoaks.com/2009/10/06/perfect-wallpaper-from-digital-photos-using-linux-and-netpbm/</link>
		<comments>http://mojo.whiteoaks.com/2009/10/06/perfect-wallpaper-from-digital-photos-using-linux-and-netpbm/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 04:13:15 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Photography and Video]]></category>
		<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[digital photo processing]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[netpbm]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[wallpaper]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=307</guid>
		<description><![CDATA[<p>The world is full of wallpaper managers for every operating system out there. I enjoy wallpapers taken from some of my digital photography, such as this trip to Yosemite last year.</p>
<p>On nice modern monitors, you can really enjoy the full resolution of your pictures. Jane and I just replaced our old Viewsonic CRT monitors with some [...]]]></description>
			<content:encoded><![CDATA[<p>The world is full of wallpaper managers for every operating system out there. I enjoy wallpapers taken from some of my digital photography, such as <a title="Yosemite photo album from 2008" href="http://photo.whiteoaks.com/2008-05-10-yosemite/saturday/index.html" target="_blank">this trip to Yosemite</a> last year.</p>
<p>On nice modern monitors, you can really enjoy the full resolution of your pictures. Jane and I just replaced our old Viewsonic CRT monitors with some nice Dell 23-inch LCD models.</p>
<p>Immediately I saw that I needed to regenerate our collection of wallpaper photos to match the aspect ratio and higher resolution of our new monitors. I admit to being a stickler for my wallpaper photo albums. I have these requirements:</p>
<ul>
<li>I want to scale and crop the photos to fill the screen exactly, no tiling or stretching.</li>
<li>I want no black bars, letterboxing, or distorted aspect ratios</li>
<li>I want to dim the maximum brightness of the photos so my desktop icons are still discernable</li>
</ul>
<p>My Canon 20D full-resolution pictures have more than enough pixels to fill the biggest screen, so I cobbled together a shell script some time ago using the PBM (Portable Bitmap) tools that have been around since probably the 80&#8242;s for manipulating images. I don&#8217;t think many of the Linux distros install the toolset by default, but they&#8217;re easily available. On Ubuntu or Debian you can install them with &#8220;apt-get install netpbm&#8221;.</p>
<p>I start by making a work directory (&#8220;wallpaper&#8221; in this instance) and a subdirectory to hold the full-resolution original images, named &#8220;full&#8221;. I collect copies of my full-resolution pictures there in ~/wallpaper/full.</p>
<p>Next I need to work out the transform. My original resolution images are 3504 pixels wide by 2336 pixels vertically. My monitor is 2048 pixels by 1152 pixels.</p>
<p>Rather than work out the math, I just scaled an original picture to the monitor width to see how tall it would be. This command pipeline would scale a picture to 2048 pixels wide:</p>
<pre>jpegtopnm full/IMG_1234.jpg | pnmscale -width 2048 | pnmtojpeg &gt;IMG_1234.jpg</pre>
<p>Opening that scaled image in Gimp told me that it was 2048 x 1365. That tells me that I need to crop some lines from the top and bottom of the image to fit them exactly to my monitor field. 1365 &#8211; 1152 leaves 213 lines to cut from the image. With the pbmtool &#8220;pamcut&#8221; I plan to cut 107 lines from the top of the image and give it a total height of 1152.</p>
<p>So I made this shell script to process all of the photos. The plan is to read all of the files from the &#8220;full&#8221; directory, and write perfectly scaled images to a subdirectory named &#8220;2048&#8243;. I&#8217;m also going to use the &#8220;ppmdim&#8221; utility to reduce the overall brightness of the images just a little. Here is the final script, called &#8220;mkwall2048&#8243;:</p>
<pre>for i in `ls -1 full`
do
echo $i
jpegtopnm full/$i \
 | pnmscale -width 2048 \
 | pamcut -top=107 -height=1152 \
 | ppmdim 0.8 \
 | pnmtojpeg &gt;2048/$i
done</pre>
<p>This loops through every file in the &#8220;full&#8221; directory, putting the filename in variable $i. The rest of the script is a pipeline that feeds the image through five different tools from the Portable Bitmap collection, as follows:</p>
<ol>
<li>jpegtopnm converts the input file to a portable &#8220;any&#8221; map, then feeds it to stdout</li>
<li>pnmscale scales the image to a width of 2048 pixels, preserving the aspect ratio</li>
<li>pamcut slices off the top 107 lines, and preserves the next 1152 lines of the image</li>
<li>ppmdim reduces the brightness of the image by 20% (80% of the existing brightness)</li>
<li>pnmtojpeg converts the portable bitmap image back to a JPEG file</li>
</ol>
<p>I&#8217;ve adjusted this script using the same process to make perfect wallpapers for my laptop monitors and desktops at work. It&#8217;s a real treat having a slideshow of my favorite photography available behind my work.</p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/10/06/perfect-wallpaper-from-digital-photos-using-linux-and-netpbm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Bean Validation&#8221; Emmanuel Bernard</title>
		<link>http://mojo.whiteoaks.com/2009/03/20/bean-validation-emmanuel-bernard/</link>
		<comments>http://mojo.whiteoaks.com/2009/03/20/bean-validation-emmanuel-bernard/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 22:39:15 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[bean validation]]></category>
		<category><![CDATA[TheServerSide]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=128</guid>
		<description><![CDATA[<p class="wp-caption-text">Registration lobby at Caesar&#39;s Palace</p>
<p>Notes from TheServerSide Java Symposium March 2009</p>
<p>What&#8217;s the point of a bean validation framework? I&#8217;ve been wondering that for a while now. Emmanuel points out that it&#8217;s mostly to keep from repeating yourself in code.</p>
<p>Validation itself is obvious &#8230; keep crap out of the database, apply constraints to data fields, give [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_139" class="wp-caption alignright" style="width: 262px"><em><em><img class="size-full wp-image-139" title="img_20431" src="http://mojo.whiteoaks.com/wp-content/uploads/2009/03/img_20431.jpg" alt="Registration lobby at Caesar's Palace" width="252" height="168" /></em></em><p class="wp-caption-text">Registration lobby at Caesar&#39;s Palace</p></div>
<p><em>Notes from TheServerSide Java Symposium March 2009</em></p>
<p>What&#8217;s the point of a bean validation framework? I&#8217;ve been wondering that for a while now. Emmanuel points out that it&#8217;s mostly to keep from repeating yourself in code.</p>
<p>Validation itself is obvious &#8230; keep crap out of the database, apply constraints to data fields, give feedback to users.</p>
<p>Where do we apply validation constraints? Take a typical application stack:</p>
<p>client -&gt; presentation layer -&gt; business layer -&gt; data access layer -&gt; database</p>
<p>He begins by giving several examples of how constraints are applied to day, down to the DDL in the database which might specify a column length and a &#8220;not null&#8221; constraint. These constraints are typically duplicated all the way up the application chain, and really bad when the constraints don&#8217;t agree!</p>
<p>He proposes a uniform way to express a constraint, a standard way to validate constraints, and a bridge for constraints out of Java land, exposing constraints to the outside world.</p>
<p>Annotations are the key, extending the type system, right next to the class definition. Hence JSR 303 for bean validation. Example field annotations for validation:</p>
<pre>@NotNull
@Size(max=30, message="longer than {max} characters")</pre>
<p>The spec also calls for validating subsets of data fields by specifying groups, or partial validation. The spec defines groups by using interfaces. Clumsy, but workable.</p>
<p>Custom constraints can be built out by creating a custom annotation with an expressive name, extending the @Constraint type. You can compose a group of existing validators from the library into a new annotation.</p>
<p>(So far I&#8217;ve only been a consumer of annotations. Maybe soon it will be time for me to start creating them as well. I usually try to avoid meta-programming, even though it can be fun.)</p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/03/20/bean-validation-emmanuel-bernard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Building Next-Generation Web Applications with the Spring 3.0 Web Stack&#8221; Jeremy Grelle</title>
		<link>http://mojo.whiteoaks.com/2009/03/20/building-next-generation-web-applications-with-thespring-30-web-stack-jeremy-grelle/</link>
		<comments>http://mojo.whiteoaks.com/2009/03/20/building-next-generation-web-applications-with-thespring-30-web-stack-jeremy-grelle/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 21:54:07 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[Spring 3.0]]></category>
		<category><![CDATA[TheServerSide]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=110</guid>
		<description><![CDATA[<p>Notes from TheServerSide Java Symposium March 2009</p>
<p>Jeremy is going to help us battle complexity in web applications. (It&#8217;s hard to find a web framework that isn&#8217;t its own layers of complexity.) He&#8217;s the lead for Spring Faces, Spring JavaScript, and a JSF 2.0 expert group member, and he&#8217;s a former &#8220;rock star.&#8221;</p>
<p>The Spring Web stack is [...]]]></description>
			<content:encoded><![CDATA[<p><em>Notes from TheServerSide Java Symposium March 2009</em></p>
<p>Jeremy is going to help us battle complexity in web applications. (It&#8217;s hard to find a web framework that isn&#8217;t its own layers of complexity.) He&#8217;s the lead for Spring Faces, Spring JavaScript, and a JSF 2.0 expert group member, and he&#8217;s a former &#8220;rock star.&#8221;</p>
<p>The Spring Web stack is a collection of open source projects that provide infrastructure for developing and running Java web applications. You can pick and choose the pieces you need, and it works on any server platform.</p>
<p>Spring Framework and Spring MVC are the common foundation. On top are Spring Web Flow, Spring JavaScript(!), Spring Security (formerly Acegi), and on top of that, Spring Faces (JSF integration support) and Spring BlazeDS Integration (brand new, integrates Flex clients with the back end).</p>
<p>Here are some new features being introduced with Spring 3.0.</p>
<h4>Spring Framework and Spring MVC</h4>
<p>The new support that I really like is a URL paradigm that acts more like RESTful web services. URLs become meaningful, and identify a heirarchy right into your domain model.</p>
<p>URL examples:</p>
<ul>
<li>/hotels would render a list of al hotels</li>
<li>/hotels/westindiplomat would give hotel details</li>
<li>/hotels/westindiplomat/bookings a list of bookings</li>
<li>/hotels/westindiplomat/bookings/4325324 a specific booking.</li>
</ul>
<p>Query variables become less significant, and primarily input for algorithms. They tend to get ignored by proxies, and often abused.</p>
<p>The key to these RESTful URLs are URI Templates containing variable names, for example /hotels/{hotelId}. Supported in Spring 3.0 with the @PathVariable annotation, which allows you to use URI templates in MVC.</p>
<p>This is really nice! Controlling URLs nicely is a frequent complaint of mine in typical Java servlet frameworks. Adopting RESTful URL patterns is friendly, readable, and makes a lot of sense. Cut down the use of parameter variables, and put the domain IDs right into the URL path.</p>
<p>He also showed new view features for content negotiation, new views like and RssFeedView, and ways to support all four standard HTTP verbs from the client (PUT and DELETE as well as GET and POST). (Now you can use &lt;spring:form method=&#8221;delete&#8221;/&gt; for instance.)</p>
<h4>Spring JavaScript</h4>
<p>Spring&#8217;s Ajax integration library, builds upon the Dojo toolkit. The &#8220;key value proposition&#8221; builds in usage best practice, makes Dojo easy to use for common Ajax scenarios. (I thought Dojo was already pretty easy to use. Do we need another layer of abstraction?)</p>
<h4>Spring Web Flow</h4>
<p>Web flow is primarily a framework for implementing user dialogs, guiding a user through a business process. Things that  are session-related and stateful. Key feature is a high-level flow definition language using XML and EL. Plugs into Spring MVC. (Not sure I see the value here yet.)</p>
<h4>Spring BlazeDS Integration</h4>
<p>Newest project being introduced with 3.0. Connects Flex client to Spring-managed services using BlazeDS transports. They claim it makes Flex natural in a Spring environment. Integrates Spring Security to secure Flex apps. Provides support for real-time data push using Spring Integration.</p>
<h4>Examples</h4>
<p>He started walking through a new-style @Controller object with the @RequestMapping annotation marking one of their flexible controller methods. The &lt;form&gt; tags in his view are making use of the newly visible http verbs, like DELETE to remove a hotel booking.</p>
<p>Demonstrated some of the Ajax features of the Spring Javascript library. Uses the tiles API to only render the part of the page requested.</p>
<p>The walkthrough of the actual @Controller code with support for new features looked clean, incremental, and going in just the right direction incrementally.</p>
<p>So are we just adding complexity, or making anything simpler and easier? I don&#8217;t think I&#8217;ll know until I try it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/03/20/building-next-generation-web-applications-with-thespring-30-web-stack-jeremy-grelle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Building Server Platforms with OSGi and Equinox&#8221; Rob Harrop</title>
		<link>http://mojo.whiteoaks.com/2009/03/20/building-server-platforms-with-osgi-and-equinox-rob-harrop/</link>
		<comments>http://mojo.whiteoaks.com/2009/03/20/building-server-platforms-with-osgi-and-equinox-rob-harrop/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 18:23:51 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[OSGi]]></category>
		<category><![CDATA[TheServerSide]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=87</guid>
		<description><![CDATA[<p></p>
<p class="wp-caption-text">BIRTExchange at TheServerSide (not related to the talk)</p>
<p>Notes from TheServerSide Java Symposium March 2009</p>
<p>Rob wrote his talk for EclipseCon which is next week, so we get an early peek. He&#8217;s the lead developer from dm Server at SpringSource.</p>
<p>I&#8217;m a complete noob to OSGi, so I&#8217;m not familiar enough to see what&#8217;s really important or significant [...]]]></description>
			<content:encoded><![CDATA[<p><em></em></p>
<div id="attachment_94" class="wp-caption alignright" style="width: 334px"><em><em><img class="size-full wp-image-94" title="img_2055" src="http://mojo.whiteoaks.com/wp-content/uploads/2009/03/img_2055.jpg" alt="BIRTExchange at TheServerSide" width="324" height="216" /></em></em><p class="wp-caption-text">BIRTExchange at TheServerSide (not related to the talk)</p></div>
<p><em>Notes from TheServerSide Java Symposium March 2009</em></p>
<p>Rob wrote his talk for EclipseCon which is next week, so we get an early peek. He&#8217;s the lead developer from dm Server at SpringSource.</p>
<p>I&#8217;m a complete noob to OSGi, so I&#8217;m not familiar enough to see what&#8217;s really important or significant in the talk.</p>
<p>Benefits of OSGi: System Partitioning, Dependency Management, Dynamism</p>
<p>He starts by taking his first simple partitioning of modules, and later breaking, extracting, and rearranging modules as required. Or it&#8217;s possible and desirable to fold modules back together.</p>
<p>I think the cool point of his talk is this <strong>osgi</strong> namespace in the Spring application-context files to import OSGi references and dependencies. The MANIFEST.MF file contains classpath dependencies, which I assume is a standard OSGi practice. But how should the MANIFEST.MF file be maintained?</p>
<p>The dependencies go into the Maven POM file, and the classpath dependencies for the MANIFEST.MF can be maintained automatically by an Eclipse plug-in. This makes the Maven POM file the single canonical source for dependency information.</p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/03/20/building-server-platforms-with-osgi-and-equinox-rob-harrop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;The Keys to Agile Software Development&#8221; Jon Kern</title>
		<link>http://mojo.whiteoaks.com/2009/03/20/the-keys-to-agile-software-development-jon-kern/</link>
		<comments>http://mojo.whiteoaks.com/2009/03/20/the-keys-to-agile-software-development-jon-kern/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 17:09:26 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[TheServerSide]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=78</guid>
		<description><![CDATA[<p></p>
<p class="wp-caption-text">The tech crew enjoys some breakfast before the morning keynote.</p>
<p>Notes from TheServerSide Java Symposium March 2009</p>
<p>Jon&#8217;s a fine fellow, but his talked (to me) seemed mostly to be stating the obvious.  I&#8217;ll just provide his &#8220;Rules to Code By:&#8221;</p>

It&#8217;s the Business, Stupid
Not all shiny new toys should be fondled
A fool with a tool is still [...]]]></description>
			<content:encoded><![CDATA[<p><em></p>
<div id="attachment_98" class="wp-caption alignright" style="width: 370px"><em><img class="size-full wp-image-98" title="img_2054" src="http://mojo.whiteoaks.com/wp-content/uploads/2009/03/img_2054.jpg" alt="The tech crew enjoys some breakfast before the morning keynote." width="360" height="240" /></em><p class="wp-caption-text">The tech crew enjoys some breakfast before the morning keynote.</p></div>
<p>Notes from TheServerSide Java Symposium March 2009</em></p>
<p>Jon&#8217;s a fine fellow, but his talked (to me) seemed mostly to be stating the obvious.  I&#8217;ll just provide his &#8220;Rules to Code By:&#8221;</p>
<ul>
<li>It&#8217;s the Business, Stupid<br />
Not all shiny new toys should be fondled</li>
<li>A fool with a tool is still a fool</li>
<li>Don&#8217;t mistake activity for progress<br />
Hard to get work done when you are always in meetings</li>
<li>Your team should hit a stride<br />
Development should feel cyclical and rhythmic</li>
<li>Be impatient<br />
Don&#8217;t tolerate waiting (for long)</li>
<li>Be lazy<br />
Don&#8217;t do tedious, mediocre chores over and over</li>
<li>Have fun &#8212; or take a break</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/03/20/the-keys-to-agile-software-development-jon-kern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;The Amazing Groovy Weight-Loss Plan&#8221; Scott Davis</title>
		<link>http://mojo.whiteoaks.com/2009/03/19/the-amazing-groovy-weight-loss-plan-scott-davis/</link>
		<comments>http://mojo.whiteoaks.com/2009/03/19/the-amazing-groovy-weight-loss-plan-scott-davis/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 21:26:57 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[TheServerSide]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=68</guid>
		<description><![CDATA[<p>Notes from TheServerSide Java Symposium March 2009</p>
<p>Scott Davis was the perfect presenter for the deadly &#8220;after lunch&#8221; session period. Interesting that his Groovy introduction is in a breakout room rather than the main ballroom, and there is not an empty seat in the house. Everyone is fascinated by these new powerful JVM languages, including me.</p>
<p>Scott started [...]]]></description>
			<content:encoded><![CDATA[<p><em>Notes from TheServerSide Java Symposium March 2009</em></p>
<p>Scott Davis was the perfect presenter for the deadly &#8220;after lunch&#8221; session period. Interesting that his Groovy introduction is in a breakout room rather than the main ballroom, and there is not an empty seat in the house. Everyone is fascinated by these new powerful JVM languages, including me.</p>
<p>Scott started by asking who was a Java programmer in the house, a silly question at a Java symposium. He followed by asking who were Groovy programmers, and two or three hands went up. Followed by &#8220;Aha! Just by adding one JAR file to your classpath, you&#8217;re all Groovy programmers too.&#8221;</p>
<p>He immediately quit using slides, and went directly to live coding. Fabulous for a software talk! He started with a one-line &#8220;Hello, World&#8221; and then moved on to show off Groovy&#8217;s object and dynamic type features.</p>
<p>He&#8217;s using javap to explore groovy-created class files and show how the underpinnings relate directly to the Java infrastructure.</p>
<p>Admittedly, these powerful JVM languages are very seductive. They call them scripting languages, and yes, they&#8217;re great for scripting. But full powerful languages like Groovy, Scala, JRuby, Jython, and even JavaFX have enormous potential. I&#8217;m being torn in about five directions for new projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/03/19/the-amazing-groovy-weight-loss-plan-scott-davis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Spring for the Advanced Java Developer&#8221; Rod Johnson</title>
		<link>http://mojo.whiteoaks.com/2009/03/19/spring-for-the-advanced-java-developer-rod-johnson/</link>
		<comments>http://mojo.whiteoaks.com/2009/03/19/spring-for-the-advanced-java-developer-rod-johnson/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 19:41:20 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[TheServerSide]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=54</guid>
		<description><![CDATA[<p>Notes from a session at TheServerSide Java Symposium March 2009</p>
<p>Rod addressed some emerging best practices based around annotation-based application configuration using Spring 2.5 and later.</p>
<p>The emerging best practice is to use the @Autowired annotation rather than @Resource. He demonstrated how to disambiguate bean references with @Qualifier. He also showed how to create your own custom annotations [...]]]></description>
			<content:encoded><![CDATA[<p><em>Notes from a session at TheServerSide Java Symposium March 2009</em></p>
<p>Rod addressed some emerging best practices based around annotation-based application configuration using Spring 2.5 and later.</p>
<p>The emerging best practice is to use the @Autowired annotation rather than @Resource. He demonstrated how to disambiguate bean references with @Qualifier. He also showed how to create your own custom annotations and use them to disambiguate similar types:</p>
<p><code>@Autowired<br />
public void setOrderServices(@Emea OrderService emea, @Apac OrderService apac) { ... }</code></p>
<p><code>@Emea<br />
public class EmeaOrderService implements OrderService { ... }</code></p>
<p><code>@Apac<br />
public class ApacOrderService implements OrderService { ... }</code></p>
<p>(What was unclear to me at the time is whether or not these custom annotations required some definition elsewhere, but I&#8217;m not entirely conversant on how annotations work.)</p>
<p>He also spent some time on the @Component meta-annotation, and the concept of stereotypes.  Spring comes with several pre-configured stereotypes:</p>
<ul>
<li>@Service</li>
<li>@Repository</li>
<li>@Aspect</li>
<li>@Controller</li>
</ul>
<p>It&#8217;s a powerful concept.</p>
<p>So here&#8217;s the big question for me. Why are we configuring with annotations now? It doesn&#8217;t do away with the need for context XML files. He indeed mentioned the pros and cons for using Spring 2.5 annotations:</p>
<p>Component scanning pros:</p>
<ul>
<li>No need for XML (potentially)</li>
<li>Changes picked up automatically</li>
<li>Works great with annotation driven injection</li>
<li>Highly configurable (whatever that means)</li>
</ul>
<p>Component scanning cons:</p>
<ul>
<li>Not a 100% solution (can&#8217;t do everything with annotations)</li>
<li>Requires classes to be maintained</li>
<li>Need to take care not to scan an excessive number of classes (use filtering)</li>
<li>Don&#8217;t get valuable application blueprints documented in application XML</li>
</ul>
<p>He makes a decent case for mixing and matching XML configuration with annotation configuration.</p>
<p>The emerging best practices (he says) include:</p>
<ul>
<li>Use XML for classes that you can&#8217;t or won&#8217;t annotate, such as third party components (data sources, message queues)</li>
<li>Use annotations and classpath scanning for application objects</li>
<li>Jump into XML for complex injection behavior and per-instance configuration (like injecting lists and maps)</li>
</ul>
<p>He suggests the Spring Web Flow example application for examples.</p>
<p>He recommends moving away from the old Spring MVC inheritance model in favor of the @Controller stereotype. (Need to go back to his slides for other recommendations.)</p>
<p>The rest of the presentation covered features coming up in Spring 3.0. One nice feature is the ability to embed property value injection with a @Value annotation and a new expression language. Example:</p>
<p><code>@Value("#{systemProperties.favoriteColr}")<br />
private String favoriteColor;</code></p>
<p><code>@Autowired<br />
public void init(@Value("{systemProperties.databaseName") String dbName)</code></p>
<p>I was happy to see this presentation, because I&#8217;ve really been resistant to using annotation based configuration and component scanning. I do like the XML blueprint for an application, and I like having one place to look for how my application is configured. (I even try to avoid using multiple application context XML files, which avoids having to hunt through several files to find my bean configuration.)</p>
<p>Things that happen by magic like autowiring make me a little uncomfortable. He pointed out that the Spring IDE is a good practical solution for actually browsing through your app configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/03/19/spring-for-the-advanced-java-developer-rod-johnson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;How Spring Fits into the Java Landscape&#8221; Rod Johnson</title>
		<link>http://mojo.whiteoaks.com/2009/03/19/how-spring-fits-into-the-java-landscape-rod-johnson/</link>
		<comments>http://mojo.whiteoaks.com/2009/03/19/how-spring-fits-into-the-java-landscape-rod-johnson/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 18:28:59 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[TheServerSide]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=50</guid>
		<description><![CDATA[<p>Notes from TheServerSide Java Symposium March 2009</p>
<p>At a keynote talk, you expect sweeping generalizations and &#8220;big picture&#8221; insights.</p>
<p>Rod pointed out some things that I have watched happening over the past two decades, namely the rise and fall of complex monolithic software systems as an expensive luxury that falls in favor of simplicity along with economic cycles.</p>
<p>&#8220;Enterprise [...]]]></description>
			<content:encoded><![CDATA[<p><em>Notes from TheServerSide Java Symposium March 2009</em></p>
<p>At a keynote talk, you expect sweeping generalizations and &#8220;big picture&#8221; insights.</p>
<p>Rod pointed out some things that I have watched happening over the past two decades, namely the rise and fall of complex monolithic software systems as an expensive luxury that falls in favor of simplicity along with economic cycles.</p>
<p>&#8220;Enterprise Java&#8221; has a reputation for complexity, based on the early (failed) J2EE platform, and giant enterprise software systems like those from IBM and BEA. &#8220;Complexity is the single biggest killer of projects,&#8221; he says. I concur.</p>
<p>&#8220;Economic downturns reduce software complexity. Truly bad ideas need a booming economy to survive.&#8221; I never thought of it like that, but it should have been obvious.</p>
<p>Service Oriented Architecture (SOA) is one of those complex frameworks that he claims is doomed at this point.</p>
<p>So the movement now is to &#8220;lean software,&#8221; simpler modular systems that don&#8217;t try to solve every problem but focus on doing one or two things well.</p>
<p>His examples, past giants of complexity: IBM, BEA, Sun. Today&#8217;s leaders: Spring, Hibernate, Ruby on Rails, Django, Grails, Eclipse ecosystem.</p>
<p>In terms of business management, this means that companies move away from the large portfolio software solutions that require huge quantities of support and complexity. The movement is toward point solutions that are smaller and more targeted. This is a pendulum that directly follows the economic cycle.</p>
<p>Nicely done.</p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/03/19/how-spring-fits-into-the-java-landscape-rod-johnson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Leveraging Groovy for building Java applications&#8221; Hans Dockter</title>
		<link>http://mojo.whiteoaks.com/2009/03/19/leveraging-groovy-for-building-java-applications-hans-dockter/</link>
		<comments>http://mojo.whiteoaks.com/2009/03/19/leveraging-groovy-for-building-java-applications-hans-dockter/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 18:12:50 +0000</pubDate>
		<dc:creator>Morris Jones</dc:creator>
				<category><![CDATA[Software and Systems]]></category>
		<category><![CDATA[build system]]></category>
		<category><![CDATA[Gradle]]></category>
		<category><![CDATA[Groovy]]></category>
		<category><![CDATA[TheServerSide]]></category>

		<guid isPermaLink="false">http://mojo.whiteoaks.com/?p=48</guid>
		<description><![CDATA[<p>Notes from a talk at TheServerSide Java Symposium March 2009</p>
<p>Hans is the project lead for a build system called Gradle. He presents it as a step beyond Ant and Maven.</p>
<p>I think he has a point. His system uses Groovy scripts as build scripts instead of XML. The advantages of having a full language available in build [...]]]></description>
			<content:encoded><![CDATA[<p><em>Notes from a talk at TheServerSide Java Symposium March 2009</em></p>
<p>Hans is the project lead for a build system called Gradle. He presents it as a step beyond Ant and Maven.</p>
<p>I think he has a point. His system uses Groovy scripts as build scripts instead of XML. The advantages of having a full language available in build scripts is pretty clear. (Try writing a conditional clause in Ant XML. Ewww!)</p>
<p>Gradle is a build toolkit and collection of small frameworks, rather than one monolithic build framework. It seems to me like this is a step back toward customization and away from &#8220;convention over configuration.&#8221; But the truth is that one build convention can not serve all build situations, and there&#8217;s probably nothing more customized in individual companies than their build, test, production, and deployment environments.</p>
<p>(At MyAds we built a custom version of the Maven Release plug-in just to support our version numbering system. One size does not fit all, especially in building applications.)</p>
<p>Hans says it&#8217;s easier to write and use Ant tasks in Gradle than in Maven. Gradle is using dependency management based on Apache Ivy, which I&#8217;m not familiar with. He recognizes the value of dependency management as introduced by Maven, so I have a feeling Apache Ivy won&#8217;t disappoint. I crave good dependency management, even though it can lead to Maven dependency hell at times. Ivy appears to be leveraging the Maven dependency infrastructure, as well as supporting SVN dependencies.</p>
<p>So I like the concept of using a full dynamic OO language for writing build scripts, especially if the API toolkit is sufficiently intuitive that it doesn&#8217;t have a large learning curve. Gradle is worth investigating.</p>
<p><a href="http://javasymposium.techtarget.com/html/images/HDockter_Gradle.pdf" target="_blank">Link to presentation here.</a></p>
<p><a href="http://www.gradle.org/roadmap">Gradle roadmap here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mojo.whiteoaks.com/2009/03/19/leveraging-groovy-for-building-java-applications-hans-dockter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

