<?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>Tristan&#039;s Blog</title>
	<atom:link href="http://www.tristanburch.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tristanburch.com/blog</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 05 Apr 2012 19:10:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Automatic Entity registration with ObjectifyFactory using a Spring FactoryBean</title>
		<link>http://www.tristanburch.com/blog/automatic-entity-registration-with-objectifyfactory-using-a-spring-factorybean/</link>
		<comments>http://www.tristanburch.com/blog/automatic-entity-registration-with-objectifyfactory-using-a-spring-factorybean/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 04:52:57 +0000</pubDate>
		<dc:creator>tristan</dc:creator>
				<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Objectify]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://www.tristanburch.com/blog/?p=14</guid>
		<description><![CDATA[I&#8217;ve been doing a lot of work lately with Google App Engine/Objectify on a Spring project and found it was becoming cumbersome to always create an ObjectifyFactory whenever I need to interact with the datastore. My first solution was to create a static method that registered the Objectify Translators that I needed and looked something like this: [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a lot of work lately with Google App Engine/<a title="Objectify" href="http://code.google.com/p/objectify-appengine/" target="_blank">Objectify</a> on a Spring project and found it was becoming cumbersome to always create an ObjectifyFactory whenever I need to interact with the datastore. <span id="more-14"></span></p>
<p>My first solution was to create a static method that registered the Objectify Translators that I needed and looked something like this:<br />
<script type="text/javascript" src="https://gist.github.com/2312133.js?file=ObjectifyFactoryService.java"></script><br />
The downside to this solution was that I still had to manually register all of my Entities on the ObjectifyFactory after it was instantiated.</p>
<p>Since I&#8217;m using Spring, I realized that I could take advantage of Spring&#8217;s class path scanning to register my Entities automatically. To accomplish this I created a <a href="http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/beans/factory/FactoryBean.html" target="_blank">FactoryBean</a> that returns an ObjectifyFactory singleton:<br />
<script type="text/javascript" src="https://gist.github.com/2312133.js?file=ObjectifyFactoryFactoryBean.java"></script></p>
<p>Configuring the bean is simple:<br />
<script src="https://gist.github.com/2312133.js?file=applicationContext.xml"></script></p>
<p>This will scan all classes under the basePackage property and automatically register them with the ObjectifyFactory singleton upon app initialization. </p>
<p>At this point you can use the <a href="https://gist.github.com/2312133#file_objectify_factory_factory_bean.java" target="_blank">ObjectifyFactoryFactoryBean</a> (how&#8217;s that for a class name!) to inject an ObjectifyFactory wherever you need to use it.</p>
<p>This implementation is for Objectify 4 (still in development), but should be more or less the same for Objectify 3 as long as you change the annotations that are scanned for (you&#8217;d probably want to scan for javax.persistence.Entity).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tristanburch.com/blog/automatic-entity-registration-with-objectifyfactory-using-a-spring-factorybean/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first open source contribution</title>
		<link>http://www.tristanburch.com/blog/my-first-open-source-contribution-spring-scalate-view-resolver/</link>
		<comments>http://www.tristanburch.com/blog/my-first-open-source-contribution-spring-scalate-view-resolver/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 05:23:25 +0000</pubDate>
		<dc:creator>tristan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scala]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://www.tristanburch.com/blog/?p=4</guid>
		<description><![CDATA[I&#8217;ve intended to contribute to an open source project for a quite a while, but had never made the effort to find a project to work on. Recently at work we&#8217;ve started using the Scalate templating engine with Spring MVC. Up until my change, the Spring MVC support in Scalate was very rudimentary, however the ScalateViewResolver [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve intended to contribute to an open source project for a quite a while, but had never made the effort to find a project to work on. Recently at work we&#8217;ve started using the <a href="http://scalate.fusesource.org/">Scalate</a> templating engine with Spring MVC. Up until <a href="https://github.com/scalate/scalate/pull/3">my change</a>, the Spring MVC support in Scalate was very rudimentary, however the ScalateViewResolver now supports the order, prefix and suffix properties similarly to the InternalResourceViewResolver.</p>
<p><span id="more-4"></span><br />
The updated ScalateViewResolver will be available starting with Scalate 1.4.0 and will be documented <a href="http://scalate.fusesource.org/documentation/spring-mvc.html">here</a>.</p>
<p>A sample Spring configuration that supports both Scalate (jade) and JSP views looks like this:<br />
<script src="https://gist.github.com/768211.js?file=springConfig.xml"></script></p>
<p>With this configuration you can now return the view name and view resolver chaining will take care of rendering the correct template. The ScalateViewResolver will be called first and if it can&#8217;t find the appropriate jade template, the InternalResourceViewResolver will attempt to render the appropriate JSP template. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tristanburch.com/blog/my-first-open-source-contribution-spring-scalate-view-resolver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great Customer Service Emails</title>
		<link>http://www.tristanburch.com/blog/great-customer-service-emails/</link>
		<comments>http://www.tristanburch.com/blog/great-customer-service-emails/#comments</comments>
		<pubDate>Wed, 29 Dec 2010 17:58:10 +0000</pubDate>
		<dc:creator>tristan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tristanburch.com/blog/?p=7</guid>
		<description><![CDATA[A few days ago I ordered a Trackpad Slip from Waterfield Designs for the Magic Trackpad I received for Christmas. The order confirmation I got from them had a nice human touch: Hi Tristan, Thanks very much. I just want to let you know that your order (#XXXXXX) will ship fresh from our San Francisco [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I ordered a <a href="http://www.sfbags.com/products/keyboard-cases/trackpad-socket.php">Trackpad Slip</a> from Waterfield Designs for the <a href="http://www.apple.com/magictrackpad/">Magic Trackpad</a> I received for Christmas. The order confirmation I got from them had a nice human touch:</p>
<blockquote><p>
Hi Tristan,</p>
<p>Thanks very much.  I just want to let you know that your order (#XXXXXX) will ship fresh from our San Francisco factory on the evening of 27-Dec-2010 via US First Class Mail.</p>
<p>Thanks for tracking us down and giving us a shot. I hope we meet your expectations.</p>
<p>If there&#8217;s anything else I can do for you, just let me know.</p>
<p>Best regards,<br />
Gary</p>
<p>PS:  By the way, this is what we&#8217;re sending you:</p>
<p>1  -Trackpad Socket  $12.00</p>
<p>Product Total: $12.00<br />
Sales Tax: $0.00<br />
Shipping: $2.00<br />
Grand Total: $14.00
</p></blockquote>
<p>Even though this is probably automatically generated, it increased the chance that I&#8217;ll buy another product form them because it feels like there is a human connection to the purchaser. I wish more companies would send simple confirmation emails like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tristanburch.com/blog/great-customer-service-emails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

