<?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>Jayway Team Blog &#187; Mattias Ask</title>
	<atom:link href="http://blog.jayway.com/author/mattiasask/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Sat, 11 Feb 2012 10:33:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Load-time weaving, Spring and Maven.</title>
		<link>http://blog.jayway.com/2009/12/15/load-time-weaving-spring-and-maven/</link>
		<comments>http://blog.jayway.com/2009/12/15/load-time-weaving-spring-and-maven/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 11:42:58 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[javaagent]]></category>
		<category><![CDATA[load-time weaving]]></category>
		<category><![CDATA[ltw]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=3951</guid>
		<description><![CDATA[As some of you might have read in my earlier post, I'm using load-time weaving in the project that I'm working on. Lately I've run in to some problems with getting the tests to play nice with Maven. So what was the problem? Well, I've been using @Configurable and @Autowired to inject stuff in my [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you might have read in my <a href="http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/">earlier post</a>, I'm using load-time weaving in the project that I'm working on. Lately I've run in to some problems with getting the tests to play nice with Maven. </p>
<p>So what was the problem? Well, I've been using <em>@Configurable</em> and <em>@Autowired</em> to inject stuff in my domain object which I create in code. To get this working when running <em>mvn test</em> you have to pass in spring-agent.jar as javaagent. When you do this, everything worked great! To to this with Maven you have to do the following:</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;plugin<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;groupId<span style="font-weight: bold; color: black;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/groupId<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;artifactId<span style="font-weight: bold; color: black;">&gt;</span></span></span>maven-surefire-plugin<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/artifactId<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;version<span style="font-weight: bold; color: black;">&gt;</span></span></span>2.4<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/version<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;forkMode<span style="font-weight: bold; color: black;">&gt;</span></span></span>once<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/forkMode<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;argLine<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        -javaagent:${settings.localRepository}/org/springframework/spring-agent/${spring.version}/spring-agent-${spring.version}.jar
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/argLine<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;useSystemClassloader<span style="font-weight: bold; color: black;">&gt;</span></span></span>true<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/useSystemClassloader<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/plugin<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p>Now, that's all cool, and it worked like a charm... for a while. When I added <em>@Configurable</em> to another class to autowire in a new dependency, I could not get that specific class to get weaved properly. Believe me, I tried everything I could think of, but nothing worked... until I found a hint on a thread with a related problem. By passing in a second javaagent, aspectjweaver.jar, the problem was solved! To do this in Maven you just add the second javaagent after the first, like this:</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;plugin<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;groupId<span style="font-weight: bold; color: black;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/groupId<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;artifactId<span style="font-weight: bold; color: black;">&gt;</span></span></span>maven-surefire-plugin<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/artifactId<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;version<span style="font-weight: bold; color: black;">&gt;</span></span></span>2.4<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/version<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;forkMode<span style="font-weight: bold; color: black;">&gt;</span></span></span>once<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/forkMode<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;argLine<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        -javaagent:${settings.localRepository}/org/springframework/spring-agent/${spring.version}/spring-agent-${spring.version}.jar -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/1.6.1/aspectjweaver-1.6.1.jar
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/argLine<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;useSystemClassloader<span style="font-weight: bold; color: black;">&gt;</span></span></span>true<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/useSystemClassloader<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/configuration<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/plugin<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p><em><strong>Note:</strong> If you add a line-break between the two javaagents, it doesn't work.</em></p>
<p>What was the problem I had? I have no idea! Why does this solution work? I have no idea! All I know is that I get a green light from my tests, and that I don't need this solution when running live in Tomcat or whatever, since the classloader there has <em>addTransformer(ClassFileTransformer)</em>. </p>
<p>Still, if anyone has any idea of why I, <strong>after everything worked with only spring-agent.jar</strong>, needed to add aspectjweaver I am all ears! Don't get me wrong! I can live with not knowing, but I would get peace of mind from knowing...</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/12/15/load-time-weaving-spring-and-maven/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Spring and load-time weaving of Neo4j-based domain objects</title>
		<link>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/</link>
		<comments>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/#comments</comments>
		<pubDate>Tue, 26 May 2009 07:51:25 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[aop]]></category>
		<category><![CDATA[ddd]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[neo4j]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=1773</guid>
		<description><![CDATA[What do you do when your Spring configuration isn't in charge of creating your objects that needs to be injected with stuff? This became a real problem for me when I tried doing some non-anemic domain object implementations persisted as Neo4j Nodes. I was playing around with creating a Twitter clone, in my opinion the [...]]]></description>
			<content:encoded><![CDATA[<p>What do you do when your Spring configuration isn't in charge of creating your objects that needs to be injected with stuff? This became a real problem for me when I tried doing some non-anemic domain object implementations persisted as <a href="http://www.neo4j.org">Neo4j</a> Nodes. </p>
<p>I was playing around with creating a Twitter clone, in my opinion the "Hello World" of graph databases, and I started out with the following simple service.</p>
<p>Spring configurating:</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;beans</span> ... <span style="font-weight: bold; color: black;">&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;context:annotation-config</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;neo&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.neo4j.api.core.EmbeddedNeo&quot;</span>
		<span style="color: #000066;">destroy-method</span>=<span style="color: #ff0000;">&quot;shutdown&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;constructor-arg<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;value<span style="font-weight: bold; color: black;">&gt;</span></span></span>var/neo<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/value<span style="font-weight: bold; color: black;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/constructor-arg<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/bean<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;indexService&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;org.neo4j.util.index.NeoIndexService&quot;</span>
		<span style="color: #000066;">destroy-method</span>=<span style="color: #ff0000;">&quot;shutdown&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;constructor-arg</span> <span style="color: #000066;">ref</span>=<span style="color: #ff0000;">&quot;neo&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/bean<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;twitterService&quot;</span>
		<span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;com.jayway.twitter.neo.NeoBasedTweetService&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;neo&quot;</span> <span style="color: #000066;">ref</span>=<span style="color: #ff0000;">&quot;neo&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;indexService&quot;</span> <span style="color: #000066;">ref</span>=<span style="color: #ff0000;">&quot;indexService&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/bean<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- Transactions --&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;tx:annotation-driven</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
        ...
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/beans<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p>The service:</p>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NeoBasedTweetService <span style="color: #000000; font-weight: bold;">implements</span> TweetService <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> NeoService neo;
	<span style="color: #000000; font-weight: bold;">protected</span> IndexService indexService;
&nbsp;
	<span style="color: #808080; font-style: italic;">//Setters for neo and indexService</span>
&nbsp;
	@Transactional
	<span style="color: #000000; font-weight: bold;">public</span> Tweet createTweet<span style="color: #66cc66;">&#40;</span>User user, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> tweet<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		UserNode userNode = <span style="color: #000000; font-weight: bold;">new</span> UserNode<span style="color: #66cc66;">&#40;</span>indexService.<span style="color: #006600;">getSingleNode</span><span style="color: #66cc66;">&#40;</span>
				TwitterIndexConstants.<span style="color: #006600;">INDEX_USER</span>, user.<span style="color: #006600;">getUserName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		TweetNode tweetNode = <span style="color: #000000; font-weight: bold;">new</span> TweetNode<span style="color: #66cc66;">&#40;</span>neo.<span style="color: #006600;">createNode</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		tweetNode.<span style="color: #006600;">setKvitt</span><span style="color: #66cc66;">&#40;</span>tweet<span style="color: #66cc66;">&#41;</span>;
		userNode.<span style="color: #006600;">createRelationshipTo</span><span style="color: #66cc66;">&#40;</span>tweetNode, KvittRelationships.<span style="color: #006600;">KVITTRAT</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000000; font-weight: bold;">return</span> tweetNode;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Services to create User and more</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>This doesn't feel very DDD. I would really want to do the User to be responsible for creating the Tweet. Like this:</p>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NeoBasedTweetService <span style="color: #000000; font-weight: bold;">implements</span> TweetService <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> NeoService neo;
	<span style="color: #000000; font-weight: bold;">protected</span> IndexService indexService;
&nbsp;
	<span style="color: #808080; font-style: italic;">//Setters for neo and indexService</span>
&nbsp;
	@Transactional
	<span style="color: #000000; font-weight: bold;">public</span> Tweet createTweet<span style="color: #66cc66;">&#40;</span>User user, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> tweet<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		UserNode userNode = <span style="color: #000000; font-weight: bold;">new</span> UserNode<span style="color: #66cc66;">&#40;</span>indexService.<span style="color: #006600;">getSingleNode</span><span style="color: #66cc66;">&#40;</span>
				TwitterIndexConstants.<span style="color: #006600;">INDEX_USER</span>, user.<span style="color: #006600;">getUserName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000000; font-weight: bold;">return</span> userNode.<span style="color: #006600;">createTweet</span><span style="color: #66cc66;">&#40;</span>tweet<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Services to create User and more</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>The TweetNode and UserNode would look like this:</p>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TweetNode <span style="color: #000000; font-weight: bold;">extends</span> NodeDelegate <span style="color: #000000; font-weight: bold;">implements</span> Tweet <span style="color: #66cc66;">&#123;</span>
&nbsp;
	TweetNode<span style="color: #66cc66;">&#40;</span>Node underlyingNode<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span><span style="color: #66cc66;">&#40;</span>underlyingNode<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Methods for doing Tweet-stuff</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> UserNode <span style="color: #000000; font-weight: bold;">extends</span> NodeDelegate <span style="color: #000000; font-weight: bold;">implements</span> User<span style="color: #66cc66;">&#123;</span>
&nbsp;
	UserNode<span style="color: #66cc66;">&#40;</span>Node underlyingNode<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span><span style="color: #66cc66;">&#40;</span>underlyingNode<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Methods for doing User-stuff</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> Tweet createTweet<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> kvitt<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">//Here comes a problem! I need a new Node</span>
		<span style="color: #808080; font-style: italic;">//from the NeoService to create the TweetNode</span>
		TweetNode tweetNode = <span style="color: #000000; font-weight: bold;">new</span> TweetNode<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>;
		tweetNode.<span style="color: #006600;">setTweet</span><span style="color: #66cc66;">&#40;</span>tweet<span style="color: #66cc66;">&#41;</span>;
		createRelationshipTo<span style="color: #66cc66;">&#40;</span>tweetNode, TwitterRelationships.<span style="color: #006600;">TWEETED</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000000; font-weight: bold;">return</span> tweetNode;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>NodeDelegate, extended by both User- and TweetNode implements the Neo4j interface <code>Node</code> and delegates all the method calls to the underlying node ( for more on this, see my <a href="http://blog.jayway.com/2008/10/06/neo4j-matches-my-mental-model-of-information/">previous post</a>) :</p>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NodeDelegate <span style="color: #000000; font-weight: bold;">implements</span> Node <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> Node delegate;
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> NodeDelegate<span style="color: #66cc66;">&#40;</span>Node underlyingNode<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		delegate = underlyingNode;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Methods for delegating all Node methods to the Node delegate</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>As you see I have a problem here. In the first version my NeoService is injected into NeoBasedTweetService and used when I create the new TweetNode. In the re-made, more DDD-style example I create the new TweetNode in the UserNode, where I don't have access to my NeoService. How do we solve this?</p>
<p>One alternative that I instinctively dislike is to inject the NeoService into the UserNode. The reason for me disliking this is that my UserNode IS a Node, and it feels very tangled if a Node holds a reference to its container. But I came to think of another solution thanks to a talk I did a while back together with Henrik Reinhold on what was new in Spring 2.5. </p>
<p>In Spring 2.5 load-time weaving (LTW) capabillites was introduced, and with LTW you can manipulate objects in load-time, as opposed to runtime weaving that is proxy based. This, combine it with @Configurable and @Autowired, proves to be <em>very</em> helpful when the Spring context is not in charge of creating the objects in question, as in the example above...</p>
<p>To enable LTW we add one tag in the Spring configuration:</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;context:load-time-weaver</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;</pre>
<p>After that we have to inform the Spring container of how we want thing done. To do we edit the TweetNode and NodeDelegate like this:</p>
<pre class="java">&nbsp;
<span style="color: #808080; font-style: italic;">//Annotate the class with @Configurable so that Spring can find it.</span>
@Configurable
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TweetNode <span style="color: #000000; font-weight: bold;">extends</span> NodeDelegate <span style="color: #000000; font-weight: bold;">implements</span> Tweet <span style="color: #66cc66;">&#123;</span>
&nbsp;
	TweetNode<span style="color: #66cc66;">&#40;</span>Node underlyingNode<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span><span style="color: #66cc66;">&#40;</span>underlyingNode<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Add a default constructor both in the TweetNode</span>
	<span style="color: #808080; font-style: italic;">//and the NodeDelegate, it is new:able without a Node.</span>
	<span style="color: #000000; font-weight: bold;">public</span> TweetNode<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Add a setter for the underlaying Node and annotate it with @Autowired.</span>
	@Autowired
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setNode<span style="color: #66cc66;">&#40;</span>Node nodeDelegate<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006600;">setNode</span><span style="color: #66cc66;">&#40;</span>nodeDelegate<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Tweet-methods as before</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NodeDelegate <span style="color: #000000; font-weight: bold;">implements</span> Node <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> Node delegate;
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> NodeDelegate<span style="color: #66cc66;">&#40;</span>Node underlyingNode<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		delegate = underlyingNode;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> NodeDelegate<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #993333;">void</span> setNode<span style="color: #66cc66;">&#40;</span>Node nodeDelegate<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>delegate == <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			delegate = nodeDelegate;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Methods for delegating all Node methods to the Node delegate</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>Now Spring only has to be able to create Nodes. To do that we create a simple NodeFactory, like this:</p>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NodeFactory <span style="color: #000000; font-weight: bold;">implements</span> FactoryBean<span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> NeoService neo = <span style="color: #000000; font-weight: bold;">null</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setNeo<span style="color: #66cc66;">&#40;</span>NeoService neo<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">neo</span> = neo;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	@Transactional
	<span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AObject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> getObject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> neo.<span style="color: #006600;">createNode</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">Class</span> getObjectType<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> Node.<span style="color: #000000; font-weight: bold;">class</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">boolean</span> isSingleton<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>... and add it to the configuration, like this:</p>
<pre class="xml">&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;node&quot;</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;com.jayway.neo.utils.NodeFactory&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;neo&quot;</span> <span style="color: #000066;">ref</span>=<span style="color: #ff0000;">&quot;neo&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/bean<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p>The result of this is that Spring now has a NodeFactory that returns a new node for every request, I have annotated the TweetNode so that Spring knows of it (@Configurable) and what to do with it (@Autowired on setNode) and I've enabled load-time weaving in order to get the a new Node woven into a TweetNode every time a new instance of it is created in the code.</p>
<p>In UserNode I really don't have to make any changes. "setNode(Node)" will get a new Node after the instantiation of a TweetNode, even if the constructor that takes a Node is called. For clarity I still changed the UserNode as follows:</p>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> UserNode <span style="color: #000000; font-weight: bold;">extends</span> NodeDelegate <span style="color: #000000; font-weight: bold;">implements</span> User<span style="color: #66cc66;">&#123;</span>
&nbsp;
	UserNode<span style="color: #66cc66;">&#40;</span>Node underlyingNode<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span><span style="color: #66cc66;">&#40;</span>underlyingNode<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">//Methods for doing User-stuff</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> Tweet createTweet<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> kvitt<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">//This TweetNode will get a Node set by Spring</span>
		TweetNode tweetNode = <span style="color: #000000; font-weight: bold;">new</span> TweetNode<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		tweetNode.<span style="color: #006600;">setTweet</span><span style="color: #66cc66;">&#40;</span>tweet<span style="color: #66cc66;">&#41;</span>;
		createRelationshipTo<span style="color: #66cc66;">&#40;</span>tweetNode, TwitterRelationships.<span style="color: #006600;">TWEETED</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #000000; font-weight: bold;">return</span> tweetNode;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>The problem I had when trying to make the UserNode responsible for creating its TweetNode's was that I needed to inject something that could create Nodes into the UserNodes. By using load-time weaving and instructing Spring of how to wire a TweetNode I don't have to pass my NeoService around to all the UserNodes created in my code. Instead I can rely on Spring to inject what is needed, when it's needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/05/26/spring-and-load-time-weaving-of-neo4j-based-domain-objects/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Questioning &#8220;testable design&#8221;</title>
		<link>http://blog.jayway.com/2009/04/01/questioning-testable-design/</link>
		<comments>http://blog.jayway.com/2009/04/01/questioning-testable-design/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 09:11:14 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[powermock]]></category>
		<category><![CDATA[toos]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=1480</guid>
		<description><![CDATA[After a discussion about PowerMock with @olabini on Twitter I felt I had to write a post on testability. The truth "Autonomous, re-runnable, code-based tests are objectivity good" has created a perceived truth, namely "Testable design is good design". This assumption is incorrect. The phrase "testable design" is dependent of two things; the design of [...]]]></description>
			<content:encoded><![CDATA[<p>After a <a href="http://search.twitter.com/search?max_id=1430211295&page=1&q=olabini+mattiasask">discussion about PowerMock</a> with <a href="http://twitter.com/olabini">@olabini</a> on Twitter I felt I had to write a post on testability.</p>
<p>The truth "<em>Autonomous, re-runnable, code-based tests are objectivity good</em>" has created a perceived truth, namely "<em>Testable design is good design</em>". This assumption is incorrect.</p>
<p>The phrase "testable design" is dependent of two things; the design of the code under test AND the tools used for testing the code. This is a problem when the major tools today in the Java world tells you to not test private methods, final classes<br />
and so on.</p>
<p>Yes, there is a big overlap between testable design and good design, but should the test tools you use govern your design? Conscious and good design choices should govern the structure of your code, and testability should come with that.</p>
<p><a href="http://code.google.com/p/powermock/">PowerMock</a> changes the phrase "Testable design is always good" to what it should be, and that is "Good design is always testable".</p>
<p>And when it comes to the hurt of legacy code, would you rather re-factor the code in order to write tests, or write tests to be able to re-factor the code safely?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/04/01/questioning-testable-design/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>On Twitter&#8230;</title>
		<link>http://blog.jayway.com/2009/03/17/on-twitter/</link>
		<comments>http://blog.jayway.com/2009/03/17/on-twitter/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 14:49:28 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=1161</guid>
		<description><![CDATA[Twitter has actually just recently gotten a lot of traction in Sweden and Scandinavia. Google Trends show this clearly which means that a Swedish blog-post about Twitter is still sort of relevant What is Twitter? Well, it's a micro blog. Users post so called tweets, messages with 140 characters or less. You can tweet, follow [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com">Twitter</a> has actually just recently gotten a lot of traction in Sweden and Scandinavia. <a href="http://www.google.com/trends?q=twitter&geo=swe&sa=N">Google Trends</a> show this clearly which means that a Swedish blog-post about Twitter is still sort of relevant <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>What is Twitter? Well, it's a micro blog. Users post so called tweets, messages with 140 characters or less. You can tweet, follow peoples tweets and search. That's basically it. And this is cool why?</p>
<h3>Keep yourself updated</h3>
<p>For me, one of the key features of Twitter is that there are really interesting people twittering. If you go to <a href="http://wefollow.com">WeFollow</a> you'll find people like <a href="http://twitter.com/kevinrose">Kevin Rose</a>, <a href="http://twitter.com/timoreilly">Tim O'Reilly</a> and <a href="http://twitter.com/guykawasaki">Guy Kawasaki</a> in the tech segment. Since they are active this means that you are able to listen to feeds from some of the, in their fields, most updated people. And Twitter is basically full of fantastic people to follow... like Chris Hughes (http://twitter.com/chews), less followed but equally interesting, who's Twitter Bio says "I was the one of first to hack the iPhone. BOOOM'"... In short, nothing is stopping anyone from evolving their web presence and getting people to follow them.</p>
<p>Before Twitter everyone knew people that where islands of new knowledge; people that seemed to have one ear to the ground and hear the most interesting things. With Twitter, these guys and girls broadcast their nuggets of information to the world, effectively building their personal brand and enabling everyone to listen to them. All of the sudden you have the opportunity to be as updated as these people are. Not only that, since you have the possibility to listen to multiple islands at once you can get a perspective of the entire world of islands... </p>
<p>Ok, there are great people to follow, and they share information, great links and insight, but this all sums up to a lot of information. Yes! In this day and age you have to accept a certain degree of white noise if you want to hear interesting signals... deal with it. Luckily there are plenty of tools to help you deal with it. I use <a href="http://www.tweetdeck.com/">TweetDeck</a> on my Mac, but there are tons of tools out there...</p>
<h3>The Twitter API</h3>
<p>The Twitter API is in my opinion is one of the most obvious reasons for Twitter success. It is an open API which anyone can use to create applications that uses Twitter data... and it's silly simple, especially if you use the Java API <a href="http://code.google.com/p/java-twitter/">java-twitter</a>. The following is what is needed to login a user and print their friends timeline (the stream of tweets from people a person follows):</p>
<pre class="java"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> printFriendsTimeline<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> username, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> password<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> TwitterException<span style="color: #66cc66;">&#123;</span>
	Api api = <span style="color: #000000; font-weight: bold;">new</span> Api<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	api.<span style="color: #006600;">setCredentials</span><span style="color: #66cc66;">&#40;</span>username, password<span style="color: #66cc66;">&#41;</span>;
	Status<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> userTimeline = api.<span style="color: #006600;">getFriendsTimeline</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>Status status : userTimeline<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span>status.<span style="color: #006600;">getUser</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;:&quot;</span> + status.<span style="color: #006600;">getText</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>This means that anyone can do just about anything with the Twitter data. Your basic level of allowed requests is 100 request per hour and IP, but if your application is request-intensive you can ask Twitter for more and get up to 20.000 requests per hour and IP. Of course this has created a flora, or even an entire ecosystem, of applications and implementations where you can tweet, watch statistics, see the most tweeted links and everything you can imagine (just check out <a href="http://www.squidoo.com/twitterapps">this list</a>).</p>
<h3>Some tweeting advice</h3>
<p>Not that I'm an authority on this, but I still wanted to end with some advice on tweeting:</p>
<p>1. Create good content that you think people want to read. Did you published a blog post? Tweet about it. Going to a conference? Tweet about it. Did you find a new interesting framework? Tweet about it. Got a new fantastic insight? Tweet about it.</p>
<p>2. #tag your tweets. If you tweet "Just found out about this great API http://tr.im/hr8S" end it with describing #tags like this "Just found out about this great API http://tr.im/hr8S #java #dev #twitter" to make it searchable and to add more context. </p>
<p>3. Re-tweet/RT when you read a good tweet. RT is a user derived notation which is used when forwarding tweets. If you get "Jayway.com is a great company!" from me and love it you simply write "RT @mattiasask : Jayway.com is a great company!". Applications like TweetDeck also help you with this...</p>
<p>4. Try to get re-tweeted if you want to spread you tweets. A tweet can travel by RT from social graph to social graph and reach a lot of people that way. Read Guy Kawasakis' blog on how to get retweeted (http://blogs.openforum.com/2009/02/18/how-to-get-retweeted/) for more on this. </p>
<p>/Mattias Ask, <a href="http://twitter.com/mattiasask">@mattiasask</a></p>
<p>PS. I have to add cool thing about Twitter and the speed of updates, something Twitter co-founder Evan Williams <a href="http://www.ted.com/index.php/talks/evan_williams_on_listening_to_twitter_users.html">talked about at TED</a> this year. During the California forest fires in -07 Twitter followers where more updated about where the fires spread than the people listing to the traditional media sources where. Why? Because people in the actual areas where the fire spread were tweeting about it from their cellphones...</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/03/17/on-twitter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpenCauses.org &#8211; Do Good.</title>
		<link>http://blog.jayway.com/2009/02/25/opencausesorg-do-good/</link>
		<comments>http://blog.jayway.com/2009/02/25/opencausesorg-do-good/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 15:32:57 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[donations]]></category>
		<category><![CDATA[innovation]]></category>
		<category><![CDATA[opencauses]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=962</guid>
		<description><![CDATA[I had the opportunity to present the Way Group initiated project OpenCauses.org at TED@PalmSprings this year. It was a fantastic experience and I got a great response on the project. But what is it we are doing with OpenCauses.org? For good or for bad, the market is unprecedented in its power to generate wealth. What [...]]]></description>
			<content:encoded><![CDATA[<p>I had the opportunity to <a href="http://blog.ted.com/2009/02/friday_mornings.php">present</a> the <a href="http://www.waygroup.se/">Way Group</a> initiated project <a href="http://opencauses.org">OpenCauses.org</a> at <a href="http://www.ted.com">TED@PalmSprings</a> this year. It was a fantastic experience and I got a great response on the project. But what is it we are doing with <a href="http://opencauses.org">OpenCauses.org</a>?</p>
<p>For good or for bad, the market is unprecedented in its power to generate wealth. What if we could use this power, not to generate wealth, but to generate good?</p>
<p>Since the market understands money really well, why not create representative money based on donations? If we do this, everyone will be able to handle donations as money. We could own it, measure it, trade with it, work to generate more of it... and every cent of it would represent donations for good causes.</p>
<p>This is what <a href="http://www.opencauses.org">OpenCauses.org</a> is doing.</p>
<p><a href="http://www.opencauses.org">OpenCauses.org</a> really only aims to change <em>one</em> word. Instead of saying "I <em>make</em> donations to good causes" you will say "I <em><strong>buy</strong></em> donations to good causes". This slight change makes all the difference. </p>
<p><strong>What is it we are doing?</strong><br />
We are creating the Open Causes Platform, a non-profit donation platform, which will enable donations to causes aimed at the <a href="http://www.un.org/millenniumgoals/">UN Millennium Development Goals</a>. The Open Causes Platform will also hold Cause Credits. Causes Credits is representative money based on donations. This means that each Causes Credit represents a donation made to a good cause. </p>
<p>When you donate through the Open Causes Platform you receive Cause Credits for your donation. Your Cause Credits are measurable and accumulative, and  they are also transferable between users of the platform. All this combined effectively makes Cause Credits into a means of trade.</p>
<p>The Open Causes Platform is an infrastructural platform which exposes a number of web-services. With these services integrators can integrate basically any site or Internet connected product to the platform. Anyone can create pretty much any implementation of donation based services imaginable. They will be able to make donations, show how much users have donated, compare and transfer donation. </p>
<p><strong>Using Cause Credits</strong><br />
If you, as a person or an organization, own 100 Cause Credits you have donated $100 through the Open Causes Platform. If you later donate $10 more, you own 110 Cause Credits. </p>
<p>Now, let's say that I have a cellular phone that I don't use. If you give me your 110CC, I'll give you my phone. If so, I have made the actual donations for $110 and you have bought my phone in two steps. The value of my phone has paid for the $110 donation. You now own a phone, but have not made any donations.</p>
<p><strong>Summary</strong><br />
We are implementing a currency based on donations. Essentially we want to complement the market of today with a market based on generosity. Just imagine if every corporation where to accept a currency based on donations for 1% of their services and products... What couldn't we do then?</p>
<p>Mattias Ask,<br />
Founder of <a href="http://opencauses.org">OpenCauses.org</a></p>
<p>If you have any questions or want more information about the project,  go to <a href="http://www.opencauses.org">OpenCauses.org</a> or contact me at mattias.ask@opencauses.org.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/02/25/opencausesorg-do-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three minute talk at TED@PalmSprings</title>
		<link>http://blog.jayway.com/2009/01/02/three-minute-talk-at-tedpalmsprings/</link>
		<comments>http://blog.jayway.com/2009/01/02/three-minute-talk-at-tedpalmsprings/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 12:20:58 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[ted]]></category>
		<category><![CDATA[ted@palmsprings]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=744</guid>
		<description><![CDATA[Thanks to the launch of a Way Group-initiated project based on one of my ideas (much more on that later) I am going to talk at TED@PalmSprings. At TED all main talks are 18 minutes, but there are small talks of 3 minutes in-between the 18 minute talks. I've gotten a 3 minute talk. But [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to the launch of a Way Group-initiated project based on one of my ideas (much more on that later) I am going to talk at <a href="http://conferences.ted.com/TED2009/program/palmsprings.php">TED@PalmSprings</a>. At <a href="http://www.ted.com/">TED</a> all main talks are 18 minutes, but there are small talks of 3 minutes in-between the 18 minute talks. I've gotten a 3 minute talk. But how do you prepare for a 3 minute talk?</p>
<p>Like most people that has been up on stage a couple of times I'm used to talking for somewhere between 30 and 90 minutes. The longest session I've held was at Linköping University where I talked for 3 hours... Now I'm going to talk for 3 minutes, and to quote the people at TED:</p>
<p><em>"The 3-minute time limit will be strictly enforced -- it's a limit, not a goal."</em></p>
<p>And they are not kidding! They literally have a clock ticking down and they literally cut you off if you go over. And I have 3 minutes.</p>
<p>So, how do you prepare? Well, meticulous, of course. But how much time do you need to prepare it? Hard to say, but there are actually some hints here and there about that. Among the most interesting I found this:</p>
<p><em>"Woodrow Wilson was once asked how long it would take him to prepare for a 10 minute speech. He replied "Two weeks". He was then asked how long it would take for a 1 hour speech. "One week", he replied. 2 hour speech? "I'm ready right now," he replied."</em></p>
<p>This gives us something to aim for:<br />
* It takes 0 days to prepare a 120 minutes speech<br />
* It takes 7 days to prepare a 60 minute speech<br />
* It takes 14 days to prepare a 10 minute speech.</p>
<p>Now we can plot this on a curve like this:<br />
<img src="http://blog.jayway.com/wordpress/wp-content/uploads/2009/01/screen-capture-7.png" alt="screen-capture-7" title="screen-capture-7" width="482" height="387" class="alignnone size-full wp-image-745" /></p>
<p>As you might see this is not a linear dependency, meaning that we have to play around a bit. After a minute of that we get this:<br />
<img src="http://blog.jayway.com/wordpress/wp-content/uploads/2009/01/screen-capture-8.png" alt="screen-capture-8" title="screen-capture-8" width="485" height="392" class="alignnone size-full wp-image-746" /></p>
<p>This curve is a pretty decent approximation of Woodrows need for speech preparation. It says that in one week he actually could present for 64 minutes, but Woodrow was probably simplifying things when he said one hour in one week. These findings are of course objective and universal. The length of the talk has an deceleration that increases by 2.1% for each day of preparation needed. The last mark is the 10 minute speech. When go beyond that and zoom in we'll see the following:<br />
<img src="http://blog.jayway.com/wordpress/wp-content/uploads/2009/01/screen-capture-9.png" alt="screen-capture-9" title="screen-capture-9" width="496" height="459" class="alignnone size-full wp-image-747" /></p>
<p>The questions in the beginning of this post was how to prepare for a 3 minute talk. Based on the chart above we now know that the answer: <strong>meticulously, for 17 days</strong>! </p>
<p>(On a side note we also know that it takes 21 days to prepare a 21 second speech, and about 25 day for a hefty 1,5 second speech.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2009/01/02/three-minute-talk-at-tedpalmsprings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neo4j matches my mental model of information</title>
		<link>http://blog.jayway.com/2008/10/06/neo4j-matches-my-mental-model-of-information/</link>
		<comments>http://blog.jayway.com/2008/10/06/neo4j-matches-my-mental-model-of-information/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 11:27:55 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[graph database]]></category>
		<category><![CDATA[neo4j]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=335</guid>
		<description><![CDATA[I'm a visual person which means that I see pictures in my head when I think about abstract things like structure, code and information. My guess is that most people do, but anyway... When I first started looking at Neo4j I was blown away by how precise the graph database structure matched my mental model [...]]]></description>
			<content:encoded><![CDATA[<p>I'm a visual person which means that I see pictures in my head when I think about abstract things like structure, code and information. My guess is that most people do, but anyway...</p>
<p>When I first started looking at <a href="http://neo4j.org/">Neo4j</a> I was blown away by how precise the graph database structure matched my mental model of information. You have blobs of informations (nodes with properties) that relates to other blobs of information. Perfect! </p>
<p>When I started playing around with the API I couldn't do what I wanted, namely extend NodeImpl and make the objects I want to persist Nodes. Now, Neo4j has a very nice API which is hard to abuse (if you don't place your classes in the same namespace as they use), and understandably they don't want you to extend NodeImpl. The <a href="http://wiki.neo4j.org/content/Design_Guide">design guide</a> gives this example of use:</p>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CustomerImpl <span style="color: #000000; font-weight: bold;">implements</span> Customer<span style="color: #66cc66;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">final</span> Node underlyingNode;
&nbsp;
        <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> KEY_FIRST_NAME = <span style="color: #ff0000;">&quot;firstName&quot;</span>;
&nbsp;
        CustomerImpl<span style="color: #66cc66;">&#40;</span> Node underlyingNode <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">underlyingNode</span> = underlyingNode;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setFirstName<span style="color: #66cc66;">&#40;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> firstName <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                underlyingNode.<span style="color: #006600;">setProperty</span><span style="color: #66cc66;">&#40;</span> KEY_FIRST_NAME, firstName <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getFirstName<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #66cc66;">&#40;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> <span style="color: #66cc66;">&#41;</span> underlyingNode.<span style="color: #006600;">getProperty</span><span style="color: #66cc66;">&#40;</span> KEY_FIRST_NAME <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">// ...</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>That's great, but it doesn't match what I see in my head... In order to make things match I made a subtle change. </p>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> NodeDelegate <span style="color: #000000; font-weight: bold;">implements</span> Node <span style="color: #66cc66;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">private</span> Node delegate;
&nbsp;
        <span style="color: #000000; font-weight: bold;">protected</span> NodeDelegate<span style="color: #66cc66;">&#40;</span>Node node<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                delegate = node;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">// Delegate all methods of the Node interface to the</span>
        <span style="color: #808080; font-style: italic;">// Node received in the constructor...</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> CustomerNode <span style="color: #000000; font-weight: bold;">extends</span> NodeDelegate <span style="color: #000000; font-weight: bold;">implements</span> Customer <span style="color: #66cc66;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> KEY_FIRST_NAME = <span style="color: #ff0000;">&quot;firstName&quot;</span>;
&nbsp;
        CustomerNode<span style="color: #66cc66;">&#40;</span>Node node<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">super</span><span style="color: #66cc66;">&#40;</span>node<span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setFirstName<span style="color: #66cc66;">&#40;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> firstName <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                setProperty<span style="color: #66cc66;">&#40;</span> KEY_FIRST_NAME, firstName <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> getFirstName<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #66cc66;">&#40;</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a> <span style="color: #66cc66;">&#41;</span> getProperty<span style="color: #66cc66;">&#40;</span> KEY_FIRST_NAME <span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">// ...</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>By doing this I can work with my domain objects as Nodes. I don't know if it is "correct" but with this small change I can say that "A Customer IS a Node" and this is what I see in my head. Good? Bad? You be the judge, but it fits me <img src='http://blog.jayway.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2008/10/06/neo4j-matches-my-mental-model-of-information/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Making APIs usable</title>
		<link>http://blog.jayway.com/2006/10/01/making-apis-usable/</link>
		<comments>http://blog.jayway.com/2006/10/01/making-apis-usable/#comments</comments>
		<pubDate>Sun, 01 Oct 2006 14:56:49 +0000</pubDate>
		<dc:creator>Mattias Ask</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[jayview]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=3776</guid>
		<description><![CDATA[All APIs have end-users. How and whether these users use a certain API depends on how useful the API is to them. This in turn is determined by what problem the API solves, how easy it is to learn and understand, and how easy it is to use. This article will give some (perhaps obvious) [...]]]></description>
			<content:encoded><![CDATA[<p><strong>All APIs have end-users. How and whether these users use a certain API depends on how useful the API is to them. This in turn is determined by what problem the API solves, how easy it is to learn and understand, and how easy it is to use. This article will give some (perhaps obvious) pointers on how to improve ease-of-learning and ease-of-use of your API. </strong></p>
<p>Usability is the science of usage which means that usability rules and laws apply to rich clients, web applications, paper forms, furniture, milk cartons, tools etc. It needs to be taken into consideration whenever there is a human end-user. If not, the product will be designed to be specifically useful to the designer. </p>
<h2>Know your user </h2>
<p>The first question to ask yourself is: Who is going to use your API? If you know that<br />
then you are half way to the bank. Why? Simply because you know what your users<br />
know and want, and thus you can give them what they need.<br />
If the user has a list of objects and wants to remove objects which already exists in<br />
another list, your API could look something like this: </p>
<pre>CustomList myList = getMyList();
CustomList yourList = getYourList();
myList.removeSharedItems(yourList);
</pre>
<p>“myList.removedSharedItems(yourList);” describes what the function does to your<br />
list, and is suited for most any programmer. If, on the other hand, you <strong>know</strong> that<br />
your users are working with <strong>set theory</strong>, you would probably want to do something<br />
like this: </p>
<pre>CustomList myList = getMyList();
CustomList yourList = getYourList();
myList.toRelativeComplement(yourList);
</pre>
<h2>Let the API be self-documenting </h2>
<p>Remember that when it comes to learning or getting started with an API, many pro-<br />
grammers simply rely on the AutoCompletion-function in their IDE. If they don’t<br />
get it from looking at that, they might turn to the documentation, or simply turn to<br />
another competing API. So don’t take naming your classes and methods lightly.<br />
In the previous example both </p>
<pre>myList.removeSharedItems(yourList);</pre>
<p>..and: </p>
<pre>myList.toRelativeComplement(yourList);</pre>
<p>..mutate myList. This is visualised by using “remove” and “to” which both refer<br />
to the myList-object. If for example “myList.toRelativeComplement (yourList);”<br />
didn’t have the word “to”, the user wouldn’t know if it returns the relative comple-<br />
ment or if it mutates myList to it.<br />
In SpringFramework, self-explanatory class names such as “BatchPreparedState-<br />
mentSetter” (an interface for a prepared statement setters used during batch up-<br />
dates) are widely used. The only risk with this is that class-, interface- and method<br />
names can get rather long, resulting in poorer readability. Explain what it does but<br />
be as precise as possible and don’t take it to the extreme. </p>
<h2>Don’t present the underlying implementation </h2>
<p>The API should limit itself to what the user needs to know; no more, no less. The<br />
names of classes, interfaces and methods should describe what they do and what<br />
they are used for; not how they do it. Why force the user to know what the underly-<br />
ing implementation does if they don’t need to know? Open-source your code and<br />
give the user the choice to see how it is done instead of forcing it on them.<br />
Java.io.Properties.loadFromXML takes an InputStream. This means that to load<br />
properties from XML the following needs to be done. </p>
<pre>File myProps = new File(“.\\MyProps.xml”);
FileInputStream is = new FileInputStream(myProps);
Properties p = new Properties();
//void loadFromXML(InputStream in)
p.loadFromXML(is);
</pre>
<p>The fact that loadFromXML takes an InputStream describes what the method does.<br />
A better solution would be to look at SpringFramework’s Resource solution. There<br />
they have a common interface called “Resource” which is implemented by every-<br />
thing from FileSystemResource to InputStreamResource. If java.io.File were to im-<br />
plement such an interface, a solution could simply be: </p>
<pre>Properties p = new Properties();
//void loadFromXML(Resource xmlResource)
p.loadFromXML(new File(“.\\MyProps.xml”));</pre>
<p>In this case the user of the API doesn’t have to think about <strong>in what way</strong> the XML<br />
will be read; just that it <strong>will be</strong> read. </p>
<h2>Think of logical mapping</h2>
<p>The methods of a class (name and responsibility) must map well to the classes<br />
name; input and output of a method must map the responsibility of the method and<br />
so on. If this is done, the user will be able to use the API intuitively, and learn and<br />
understand how to use it without any documentation. </p>
<pre>//Bad mapping in Calendar
void setTime(Date date)
//Better mapping
void setTime(Time time)
</pre>
<h2>Limit the number of options </h2>
<p>If you have something in your API that can be done in two different ways, choose<br />
one. Don’t give the user an ambiguous API with features that are so similar that it is<br />
confusing, and force them to go to the documentation or choose by chance. </p>
<pre>myCalendar.add(Calendar.DAY_OF_WEEK,7);
//...differs from...
myCalendar.roll(Calendar.DAY_OF_WEEK,7);
//...in what way?
</pre>
<h2>Avoid methods and classes that do<br />
different things in different object states<br />
</h2>
<p>Separate your domain entities in such a way that they overlap as little as possible.<br />
This is basic OO and should be common sense, but it is a common problem. Java.<br />
io.File has exactly this problem. An object of java.io.File can be a File or a Directory.<br />
If the object is created from the path of a directory it is a directory. This gives the<br />
possibility to write, among other things, the following illogical code: </p>
<pre>File myFile = new File(“.\\MyFile.xml”);
boolean dirMade = myFile.mkDir();
</pre>
<p>A better solution would be if File were structured something like: </p>
<pre>interface FileSystemElement extends Resource{
   //...
}
class abstract AbstractFileSystemElement implements FileSystemElement{
   //...
} 

class File extends AbstractFileSystemElement{
   //...
} 

class Directory extends AbstractFileSystemElement{
   //...
} </pre>
<h2>Summary </h2>
<p>The most important thing to remember is that there is a human user at the other<br />
end of an API. If you remember this you will create better APIs. The pointers in this<br />
article simply scratch the surface of what could be done to improve your APIs. One<br />
thing that would result in great improvements is if you found a couple of users and<br />
user-tested the solution. (<a href="http://en.wikipedia.org/wiki/Usability_testing">http://en.wikipedia.org/wiki/Usability_testing</a>). </p>
<p><em>Originally published in <a href="http://jayway.se/jayview">JayView</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2006/10/01/making-apis-usable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

