<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>RAPaul.com</title>
	
	<link>http://www.rapaul.com</link>
	<description>A technical blog written by Richard Paul</description>
	<lastBuildDate>Sun, 14 Feb 2010 16:38:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/rapaul" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="rapaul" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Avoiding ambiguities when using @RequestMapping</title>
		<link>http://www.rapaul.com/2010/02/14/request-mapping-ordering/</link>
		<comments>http://www.rapaul.com/2010/02/14/request-mapping-ordering/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 16:30:16 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[annotation]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[params]]></category>
		<category><![CDATA[request]]></category>
		<category><![CDATA[requestmapping]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=437</guid>
		<description><![CDATA[I&#8217;ve recently been using the param attribute of the @RequestMapping annotation from Spring MVC.
Take the case of a search feature for a website.  If a &#8216;refine&#8217; parameter is present, the user should be shown a search form to refine their criteria. However if the refine parameter is not present the user is shown the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been using the <tt>param</tt> attribute of the <a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/bind/annotation/RequestMapping.html">@RequestMapping</a> annotation from Spring MVC.</p>
<p>Take the case of a search feature for a website.  If a &#8216;refine&#8217; parameter is present, the user should be shown a search form to refine their criteria. However if the refine parameter is not present the user is shown the search results for the query.</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">@RequestMapping<span style="color: #009900;">&#40;</span>value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;/search&quot;</span>, method<span style="color: #339933;">=</span>RequestMethod.<span style="color: #006633;">GET</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SearchController <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">// Handles search?query=dog&amp;refine=true</span><br />
&nbsp; @RequestMapping<span style="color: #009900;">&#40;</span>params<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;refine=true&quot;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> refine<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">// Handles search?query=dog</span><br />
&nbsp; @RequestMapping<br />
&nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
<p>While this code will initially work, there is some ambiguity in the way the URLs are matched.  The order in which the <tt>@RequestMapping</tt> mappings are defined in the class file is actually determining which method will be called.  If we were to define the <tt>search()</tt> method first, then a request to <tt>search?query=dog&#038;refine=true</tt> would satisfy the conditions for the <tt>search()</tt> method&#8217;s <tt>@RequestMapping</tt> and thus the <tt>params="refine=true"</tt> on the <tt>refine()</tt> method has no bearing on the outcome of the request.</p>
<p>To safeguard the controller against the potential reordering of methods in a class (which in usual Java programming has no affect on the outcome of running code), we need to ensure the parameter mapping is explicit.</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// Match if 'refine' parameter is present</span><br />
@RequestMapping<span style="color: #009900;">&#40;</span>params<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;refine=true&quot;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> refine<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span><br />
<span style="color: #666666; font-style: italic;">// Match if 'refine' parameter is not present</span><br />
@RequestMapping<span style="color: #009900;">&#40;</span>params<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;!refine=true&quot;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span></div></div>
<p>By explicitly checking the refine parameter is not present for the search method&#8217;s request mapping (<tt>!refine=true</tt>), the declaration order of our <tt>@RequestMapping</tt> annotations in the class file has no bearing on which method handles the request thus making our code robust to the reordering methods.  Similar precautions should be taken with the other attributes of <tt>@RequestMapping</tt> including <tt>method</tt> and <tt>headers</tt>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2010/02/14/request-mapping-ordering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My git svn workflow</title>
		<link>http://www.rapaul.com/2010/01/13/my-git-svn-workflow/</link>
		<comments>http://www.rapaul.com/2010/01/13/my-git-svn-workflow/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 21:28:03 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=417</guid>
		<description><![CDATA[Below are the steps I use when working with Git &#038; SVN. Please note, I am in no way a Git or SVN expert, but these are the steps that seem to work for me.
1) Checkout codebase
This step only needs to be done once, it will pull down a local copy of the entire history [...]]]></description>
			<content:encoded><![CDATA[<p>Below are the steps I use when working with Git &#038; SVN. Please note, I am in no way a Git or SVN expert, but these are the steps that seem to work for me.</p>
<p><strong>1) Checkout codebase</strong><br />
This step only needs to be done once, it will pull down a local copy of the entire history allowing for very fast nagivation of revisions and allow work to be down when no connection to a central repository is available.</p>
<pre>git svn clone svn://path/to/code/ --stdlayout</pre>
<p><strong>2) Create a topic branch to work on</strong><br />
We now want to start work on our first story, so we create a local branch for it.  This allows us to keep all changes related to the first story out of the master branch.  By keeping the master branch clean we can create as many local branches as we wish from it allowing us to quickly fix a bug in a separate local branch to the story we are working on.  I&#8217;ll come to this later.  The <em>-b</em> option means checkout and create a branch, this is a shortcut to creating the branch then checking it out.</p>
<pre>git checkout -b story1</pre>
<p>.. implement the first story ..</p>
<p><strong>3) Add all new/deleted/modified files to staging area</strong><br />
With git you can stage just the files that are important, these staged items then make up the contents of your commit.</p>
<pre>git add path/to/resource</pre>
<p><strong>4) Create a commit</strong><br />
We then create a commit of the staged files in our local branch, note this differs from SVN as a commit is only local.</p>
<pre>git commit -m "My commit message"</pre>
<p><strong>5) Merge changes from your topic branch into the master branch</strong><br />
Ensure the master branch is up to date</p>
<pre>git checkout master
git svn rebase</pre>
<p>Then merge your topic branch into master</p>
<pre>git merge story1</pre>
<p><strong>6) Merge conflicts</strong><br />
Merge any conflicts either manually or using <em>mergetool</em> (I&#8217;m yet to figure out how to use the <em>mergetool</em> command)</p>
<p><strong>7) Push to SVN</strong><br />
This is the bridge that takes our Git commits and pushes them to SVN.  Each Git commit will be mapped to a respective SVN commit.</p>
<pre>git svn dcommit</pre>
<p><strong>Working with multiple branches</strong><br />
As I mentioned earlier, one of the major advantages of Git over SVN is the ability to have multiple working branches locally, allowing you to switch between them with relative ease.  Take for example you are working on a story, it might take you a whole day to get it done.  At midday an urgent support request arrives for a bug in the live software.  Using SVN I would typically have to checkout the HEAD revision into a separate directory and import it into Eclipse as a new project.  With Git it is much simpler, I use the following steps to do the switching.</p>
<p># Commit all current work to the topic branch</p>
<pre>git add path/to/noncommited/work</pre>
<p># Switch to the master branch and make sure it is up to date</p>
<pre>git checkout master
git svn rebase</pre>
<p># Create a new branch for the bug fix</p>
<pre>git checkout -b bugfix</pre>
<p># Fix the bug<br />
# Follow steps 3-7 above<br />
# Carry on working on the story</p>
<pre>git checkout story1</pre>
<p><strong>Git GUI</strong><br />
You can use the <a href="http://www.kernel.org/pub/software/scm/git/docs/git-gui.html">Git GUI</a> tool for most of the steps above, I find it particularly useful for steps 3 &#038; 4.<br />
You can also review the history and changes using gitk, this is useful for code reviews before you push your code into a master repo.</p>
<p><strong>JGit (Eclipse Plugin)</strong><br />
I use the <a href="http://www.jgit.org/">JGit Eclipse Plugin</a> when working in Eclipse, it provides a diff with the previous version which I find invaluable.<br />
Install in Eclipse using the update site: http://www.jgit.org/updates</p>
<p><strong>References</strong><br />
<a href="http://blog.tsunanet.net/2007/07/learning-git-svn-in-5min.html">http://blog.tsunanet.net/2007/07/learning-git-svn-in-5min.html</a><br />
<a href="http://stackoverflow.com/questions/190431/is-git-svn-dcommit-after-merging-in-git-dangerous">http://stackoverflow.com/questions/190431/is-git-svn-dcommit-after-merging-in-git-dangerous</a><br />
<a href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#resolving-a-merge">http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#resolving-a-merge</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2010/01/13/my-git-svn-workflow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jQuery Behaviours</title>
		<link>http://www.rapaul.com/2009/09/15/jquery-behaviours/</link>
		<comments>http://www.rapaul.com/2009/09/15/jquery-behaviours/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 19:55:02 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[behaviors]]></category>
		<category><![CDATA[behaviours]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bubbling]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[facebox]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[livequery]]></category>
		<category><![CDATA[submission]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=402</guid>
		<description><![CDATA[Below are slides from a short presentation I gave to my colleagues at f1000.  The slides contain a brief background on Javascript behaviours and provide a comparison between jQueries&#8217; bind and live behaviours along with the liveQuery plugin.
jQuery Behaviours
View more documents from Richard Paul.

I have also created two little pages which demonstrate event bubbling [...]]]></description>
			<content:encoded><![CDATA[<p>Below are slides from a short presentation I gave to my colleagues at f1000.  The slides contain a brief background on Javascript behaviours and provide a comparison between jQueries&#8217; <a href="http://docs.jquery.com/Events/bind">bind</a> and <a href="http://docs.jquery.com/Events/live">live</a> behaviours along with the <a href="http://docs.jquery.com/Plugins/livequery">liveQuery plugin</a>.</p>
<div style="width:425px;text-align:left" id="__ss_2002204"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/rapaul/jquery-behaviours" title="jQuery Behaviours">jQuery Behaviours</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jquerybehaviours-090915142850-phpapp01&#038;stripped_title=jquery-behaviours" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jquerybehaviours-090915142850-phpapp01&#038;stripped_title=jquery-behaviours" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">documents</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/rapaul">Richard Paul</a>.</div>
</div>
<p>I have also created two little pages which demonstrate <a href="http://files.rapaul.com/behaviour/delegation.html">event bubbling</a> and how the different <a href="http://files.rapaul.com/behaviour/behaviour.html">behaviour mechanisms</a> work with form submission (hint: try using Internet Exploder with the &#8216;live&#8217; example).</p>
<p>A <a href='http://www.rapaul.com/wp-content/uploads/2009/09/jquery_behaviours.pdf'>PDF version</a> of the slides is available.</p>
<p>Thanks to my manager Phil, for letting me post this on my personal blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2009/09/15/jquery-behaviours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Behavioural World</title>
		<link>http://www.rapaul.com/2009/09/13/a-behavioural-world/</link>
		<comments>http://www.rapaul.com/2009/09/13/a-behavioural-world/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 16:16:49 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[scenarios]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=370</guid>
		<description><![CDATA[Or at least a behavioural twitter world,

http://abehaviouralworld.rapaul.com/ is a little project just launched which attempts to distill behaviours from twitter. Given my recent rapture in the world of BDD, the behaviours we are distilling are those that match the scenario format.

Given ...
When ...
Then ...

If you look carefully at the page source, you will notice a [...]]]></description>
			<content:encoded><![CDATA[<p>Or at least a behavioural twitter world,</p>
<p><a href="http://abehaviouralworld.rapaul.com/" target="_blank"><img src="http://www.rapaul.com/wp-content/uploads/2009/09/intro.png" alt="introduction" title="introduction" width="540" height="104" class="alignnone size-full wp-image-374" /></a></p>
<p><a href="http://abehaviouralworld.rapaul.com/">http://abehaviouralworld.rapaul.com/</a> is a little project just launched which attempts to distill behaviours from twitter. Given my recent rapture in the world of <a href="http://en.wikipedia.org/wiki/Behaviour_driven_development">BDD</a>, the behaviours we are distilling are those that match the scenario format.</p>
<pre>
Given ...
When ...
Then ...
</pre>
<p>If you look carefully at the page source, you will notice a large portion of it is dedicated to an HTML comment containing the list of features and the breakdown into scenarios.  To keep things easily accessible, each time I thought of a scenario I added it to the page, once completed, it was marked with [Done].</p>
<p>For example, starting with the most important feature:</p>
<pre>
  Feature 1)
  In order to see how BDD syntax is being used on twitter
  As a BDD zealot
  I want to see tweets that contain 'given', 'when' &#038; 'then', in that order.
</pre>
<p>I then broke this feature down into scenarios:</p>
<pre>
  [Done]
  Given the search returns more than matching 10 tweets
  When the user views the page
  Then the 10 most recent tweets should be displayed

  ...
</pre>
<p>Each time a scenario was satisfied, I marked it with [Done]. Not all scenarios ended up being all that important, the following scenario is still pending.</p>
<pre>
  Given the search returns no matching tweets
  When the user views the page
  Then instead of showing any tweets a message should be shown
</pre>
<p>In fact, if we attempt to tie this scenario back into the vision of the website (distilling behaviours in twitter), then we realise it adds no value. If no one is tweeting about behaviours, then it is highly unlike that anyone will be visiting our behaviour distillery.</p>
<p>There are a couple of features (3 &#038; 4) in the source which haven&#8217;t yet been implemented.</p>
<pre>
  Feature 3)
  In order to emphasis the given/when/then syntax
  As a BDD zealot
  I want to see give/when/then highlighted in the displayed tweets

  Feature 4)
  In order to encourage BDD syntax usage on twitter
  As a BDD zealot
  I want to be able to tweet from this page using a BDD template
</pre>
<p>If anyone would like to work on these features, or even just break down some useful scenarios, please feel free to fork the <a href="http://github.com/rapaul/abehaviouralworld">code on github</a>, provide me with a diff or add a comment (note at the time of writing github looks to be having some caching issues on the &#8216;Source&#8217; tab).</p>
<p><strong>What no executable scenarios?</strong><br />
Oops, nope. I&#8217;m yet to get into the world of writing executable scenarios in Javascript. If someone has some knowledge in this area, please feel free to fork the <a href="http://github.com/rapaul/abehaviouralworld">github repository</a> and start automating the scenarios from the page source.</p>
<p>PS: This idea was partially inspired by a <a href="http://twitter.com/soulnafein/status/3712851157">tweet by soulnafein</a> which read:<br />
<em>My girlfriend is taking the mickey out of me because recently I started explaining things using the Scenario format (Given When Then) :-)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2009/09/13/a-behavioural-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meetups in London</title>
		<link>http://www.rapaul.com/2009/09/01/meetups-in-london/</link>
		<comments>http://www.rapaul.com/2009/09/01/meetups-in-london/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 22:04:50 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[meetups]]></category>
		<category><![CDATA[uk]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=357</guid>
		<description><![CDATA[One of the great things about London, from a developer&#8217;s perspective, is the wealth of meetups going on.  Don&#8217;t get me wrong, in Auckland we had a few notable meetups including the Auckland JVM Group and the Auckland Web Meetup. But London has more people, more developers &#038; hence more meetups.
Below is a live [...]]]></description>
			<content:encoded><![CDATA[<p>One of the great things about London, from a developer&#8217;s perspective, is the wealth of meetups going on.  Don&#8217;t get me wrong, in Auckland we had a few notable meetups including the <a href="http://www.meetup.com/auckland-jug/">Auckland JVM Group</a> and the <a href="http://www.meetup.com/aucklandweb/">Auckland Web Meetup</a>. But London has more people, more developers &#038; hence more meetups.</p>
<p>Below is a live calendar of the meetups I&#8217;m planning on attending, </p>
<p><iframe src="http://www.google.com/calendar/embed?showTitle=0&amp;showNav=0&amp;showDate=0&amp;showPrint=0&amp;showTabs=0&amp;showCalendars=0&amp;showTz=0&amp;mode=AGENDA&amp;height=300&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=rc4b7dar1o2em74lj0c3omdvv8%40group.calendar.google.com&amp;color=%23A32929&amp;ctz=Europe%2FLondon" style=" border-width:0 " width="520" height="300" frameborder="0" scrolling="no"></iframe></p>
<p>I&#8217;ll try to keep this up to date, so feel free to subscribe to the calendar if you have similar interests (java, javascript, groovy, scala, testing, mocking, android, webOS, html5&#8230; anything you see in this blog&#8217;s tag cloud).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2009/09/01/meetups-in-london/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BDDMockito &amp; Eclipse</title>
		<link>http://www.rapaul.com/2009/08/09/bddmockito-eclipse/</link>
		<comments>http://www.rapaul.com/2009/08/09/bddmockito-eclipse/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 09:32:49 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mocking]]></category>
		<category><![CDATA[mockito]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=299</guid>
		<description><![CDATA[On the 23rd of July, Mockito 1.8.0 was released, you can see a full listing of changes in their release notes.  One feature that took my fancy was the inclusion of BDD aliases for stubbing an API, instead of using when, the Mockito team now encourage the use of given to bring your tests [...]]]></description>
			<content:encoded><![CDATA[<p>On the 23rd of July, <a href="http://mockito.org/">Mockito</a> 1.8.0 was released, you can see a full listing of changes in their <a href="http://code.google.com/p/mockito/wiki/ReleaseNotes">release notes</a>.  One feature that took my fancy was the inclusion of <a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development">BDD</a> aliases for stubbing an API, instead of using <tt>when</tt>, the Mockito team now encourage the use of <tt>given</tt> to bring your tests inline with the BDD style. To illustrate this, here is an example taken from the <a href="http://mockito.googlecode.com/svn/branches/1.8.0/javadoc/org/mockito/BDDMockito.html">BDDMockito javadoc</a>.</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">static</span> org.<span style="color: #006633;">mockito</span>.<span style="color: #006633;">BDDMockito</span>.<span style="color: #339933;">*;</span><br />
&nbsp;<br />
Seller seller <span style="color: #339933;">=</span> mock<span style="color: #009900;">&#40;</span>Seller.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
Shop shop <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Shop<span style="color: #009900;">&#40;</span>seller<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp;<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> shouldBuyBread<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">//given &nbsp;</span><br />
&nbsp; given<span style="color: #009900;">&#40;</span>seller.<span style="color: #006633;">askForBread</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">willReturn</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Bread<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp;<br />
&nbsp; <span style="color: #666666; font-style: italic;">//when</span><br />
&nbsp; Goods goods <span style="color: #339933;">=</span> shop.<span style="color: #006633;">buyBread</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<br />
&nbsp; <span style="color: #666666; font-style: italic;">//then</span><br />
&nbsp; assertThat<span style="color: #009900;">&#40;</span>goods, containBread<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>By breaking the test into <tt>given</tt>, <tt>when</tt> &#038; <tt>then</tt>, future maintainers of the tests will more quickly understand which parts of the test relate to setup, exercising the SUT and asserting.</p>
<p><em>(stealing from Apple&#8217;s <a href="http://www.youtube.com/watch?v=szrsfeyLzyg">AppStore ad</a>)</em> What&#8217;s great about Eclipse, is that if you want to write a foreach loop, there&#8217;s a template for that.  If you want to create a unit test, there&#8217;s a template for that. Yip there&#8217;s an <del>app</del> <ins>template</ins> for just about anything.</p>
<p>To minimise keystrokes and encourage the use of this style, you can modify the existing <tt>Test</tt> template as shown below to automatically generate the BDD style comments &#038; statically import the BDDMockito members.  To modify the template, navigate to Window > Preferences > Java > Editor > Templates.  Click on Test (the JUnit 4 test template) and click edit.  Paste in the follow template:</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">@$<span style="color: #009900;">&#123;</span>testType<span style="color: #339933;">:</span>newType<span style="color: #009900;">&#40;</span>org.<span style="color: #006633;">junit</span>.<span style="color: #006633;">Test</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> $<span style="color: #009900;">&#123;</span>testname<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">// given ${cursor}</span><br />
&nbsp; $<span style="color: #009900;">&#123;</span>staticImport<span style="color: #339933;">:</span>importStatic<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'org.junit.Assert.*'</span>, <span style="color: #0000ff;">'org.mockito.BDDMockito.*'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">// when</span><br />
<br />
&nbsp; <span style="color: #666666; font-style: italic;">// then</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
<p>You are now ready to start writing BDDMockito style unit tests using Eclipse&#8217;s template, simply type <tt>Test</tt>, hit Ctrl+Space and you will be given the following option.</p>
<p><img src="http://www.rapaul.com/wp-content/uploads/2009/08/ctrl-space.png" alt="ctrl-space" title="ctrl-space" width="476" height="227" class="aligncenter size-full wp-image-310" /></p>
<p>Selecting the option will generate the test method, focus first given to the test name, then to the blank line after <tt>// given</tt>.</p>
<p><img src="http://www.rapaul.com/wp-content/uploads/2009/08/created-template.jpg" alt="created-template" title="created-template" width="355" height="198" class="aligncenter size-full wp-image-308" /></p>
<p>There you have it, a simple Eclipse template to generate your BDDMockito style tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2009/08/09/bddmockito-eclipse/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Review: Spring Web Flow 2 Web Development</title>
		<link>http://www.rapaul.com/2009/06/11/review-spring-web-flow-2/</link>
		<comments>http://www.rapaul.com/2009/06/11/review-spring-web-flow-2/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 21:19:39 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webflow]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=231</guid>
		<description><![CDATA[
Spring Web Flow 2 Web Development
Authors: Markus Stäuble &#038; Sven Lüppken
Publisher: Packt Publishing
Date of Publishing: March 2009
Sample Chapter: Chapter 4: Spring Faces
Intended Audience
This book is intended for Java web application developers who wish to learn about Spring Web Flow 2.  A base knowledge of the Spring Framework and its associated MVC is advised, however [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rapaul.com/wp-content/uploads/2009/06/spring-webflow-2.png"><img src="http://www.rapaul.com/wp-content/uploads/2009/06/spring-webflow-2.png" alt="spring-webflow-2" title="spring-webflow-2" width="100" height="123" class="alignleft size-full wp-image-236"  style="margin-bottom: 1em;"/></a><br />
<a href="http://www.packtpub.com/develop-powerful-web-applications-with-spring-web-flow-2/book" target="_blank">Spring Web Flow 2 Web Development</a><br />
Authors: Markus Stäuble &#038; Sven Lüppken<br />
Publisher: <a href="http://www.packtpub.com/" target="_blank">Packt Publishing</a><br />
Date of Publishing: March 2009<br />
Sample Chapter: <a href="http://www.packtpub.com/files/spring-web-flow-2-web-development-sample-chapter-4-spring-faces.pdf" target="_blank">Chapter 4: Spring Faces</a></p>
<h2 style="clear:both">Intended Audience</h2>
<p>This book is intended for Java web application developers who wish to learn about <a href="http://www.springsource.org/webflow" target="_blank">Spring Web Flow 2</a>.  A base knowledge of the Spring Framework and its associated MVC is advised, however most examples in the book provide sufficient detailing of the surrounding technologies and their integration points.  This allows the reader to follow the examples without looking up details from other reference sources.</p>
<h2>Chapter 1 &#8211; Introduction</h2>
<p>The first chapter of this book provides a general introduction to Spring Web Flow 2 including some of the basic terminology.  For those familiar with Spring Web Flow 1, there is a useful section detailing the major changes introduced in Web Flow 2.  Having not used Spring Web Flow in over a year, I found the summary provided enough information to reacquaint myself.</p>
<h2>Chapter 2 &#8211; Setup for Spring Web Flow 2</h2>
<p>Chapter 2 details how to get Spring Web Flow setup in a Spring web application.  Details on where to find the source code and examples provides a good starting point for users who wish to see Web Flow in action before delving into the details.  An explanation of tooling support, such as setting up Eclipse to visualise flow, is a helpful addition especially with the prevalent screenshots.</p>
<h2>Chapter 3 &#8211; The Basics of Spring Web Flow 2</h2>
<p>As expected, this chapter covers the necessities for building a Web Flow, focussing on defining the flow using XML.  This is by far the most important and useful chapter of the book.  The chapter is just over 50 pages long, but is well worth the read as most sections are fundamental in using Web Flow, topics include: flow descriptors (including a diagram), flow scoped persistence, the newly supported EL expression language, scope levels, @Autowired behaviour gotchas, inputs &#038; outputs, subflows and end states.</p>
<h2>Chapter 4 &#8211; Spring Faces</h2>
<p>Not being a JavaServer Faces (JSF) user, I skimmed over this chapter, however it is available as a <a href="http://www.packtpub.com/files/spring-web-flow-2-web-development-sample-chapter-4-spring-faces.pdf" target="_blank">sample chapter</a>.</p>
<h2>Chapter 5 &#8211; Mastering Spring Web Flow</h2>
<p>This chapter contains a mix of topics.  The first section includes further information on the usage of subflows, however I feel the explanation is a little brief.</p>
<p>The next section talks about integration with the Spring Javascript project.  Spring Javascript is explained as being an abstraction layer on top of existing toolkits (only Dojo supported so far), but the example given has a hardwired dependency on <tt>dijit.form.DateTextBox</tt>.  I&#8217;m not sure if this is just a bad example or if that is how Spring Javascript works.  An introduction to the Tiles framework is then given and tied in nicely with an explanation of how to load page fragments using Spring Javascript.</p>
<p>The final section in this chapter covers advanced configuration of flows. I would advise using this section purely as a reference as it is heavy on detail.</p>
<h2>Chapter 6 &#8211; Testing Spring Web Flow Applications</h2>
<p>Being a bit of a testing zealot, this was the section I was really hanging out for.  The opening sentence reads, &#8220;Testing is an important aspect in every software development process&#8221;.  Off to a good start, unfortunately this chapter didn&#8217;t live up to my expectations.</p>
<p>The Web Flow specific test setup and assertions are explained well, for example calls such as <tt>context.setEventId("login")</tt>, <tt>this.resumeFlow(context)</tt> and <tt>assertFlowExecutionEnded()</tt>.</p>
<p>The example then introduces <a href="http://easymock.org/" target="_blank">EasyMock</a> to help isolate and focus the unit tests.  However this example has a glaring issue; it creates a mock of the wrong object.  The example models a user login using a <tt>UserService</tt> to fetch a user by username.  You would expect the mocked object in this case to be the <tt>UserService</tt>, but the example mocks out the underlying <tt>EntityManager</tt>.  As a result the unit test for the flow ends up setting expectations on Hibernate HQL, thus polluting the flow&#8217;s unit test with database queries that should really be tested at the service or DAO layer.  If you change the way users were fetched in the DAO (or you moved away from Hibernate) you wouldn&#8217;t expect your Web Flow tests to be affected.</p>
<p>My advice when reading this chapter is to skip to the section titled <em>More testing with EasyMock</em>.  This section shows correct usage of EasyMock and demonstrates a test driven approach to testing.</p>
<h2>Chapter 7 &#8211; Security</h2>
<p>The final chapter covers the integration of Spring Security, the only real option for security in Spring.  The details in this section are largely not specific to Spring Webflow, however they are important for developing any non-trivial application and are well explained with examples.</p>
<h2>Conclusion</h2>
<p>I would recommend this book to any developer new to Spring Web Flow.  The concepts and much of the implementation between Web Flow 1 and 2 remains the same, meaning this isn&#8217;t an essential read for existing Web Flow users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2009/06/11/review-spring-web-flow-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring’s Dependency Injection &amp; MVC</title>
		<link>http://www.rapaul.com/2009/03/29/springs-dependency-injection-mvc/</link>
		<comments>http://www.rapaul.com/2009/03/29/springs-dependency-injection-mvc/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 01:20:57 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[annotation]]></category>
		<category><![CDATA[controllers]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[ioc]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=198</guid>
		<description><![CDATA[Below are slides from a presentation I gave to colleagues at Kiwiplan. The presentation covered two Spring Framework topics, the first being a brief introduction to Spring&#8217;s Dependency Injection Container.  The second presentation was an introduction to Spring&#8217;s MVC (web) component, with a focus on the annotation style introduced in Spring 2.5.  PDF [...]]]></description>
			<content:encoded><![CDATA[<p>Below are slides from a presentation I gave to colleagues at Kiwiplan. The presentation covered two <a href="http://www.springsource.org/" target="_blank">Spring Framework</a> topics, the first being a brief introduction to Spring&#8217;s Dependency Injection Container.  The second presentation was an introduction to Spring&#8217;s MVC (web) component, with a focus on the annotation style introduced in Spring 2.5.  PDF versions are available for both <a href='http://www.rapaul.com/wp-content/uploads/2009/03/spring_dependency_injection.pdf'>Dependency Injection</a> and <a href='http://www.rapaul.com/wp-content/uploads/2009/03/spring_mvc.pdf'>MVC</a>.</p>
<div style="width:425px;text-align:left" id="__ss_1215690"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/rapaul/introduction-to-springs-dependency-injection?type=presentation" title="Introduction to Spring&#39;s Dependency Injection">Introduction to Spring&#39;s Dependency Injection</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=springdependencyinjection-090328201015-phpapp02&#038;stripped_title=introduction-to-springs-dependency-injection" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=springdependencyinjection-090328201015-phpapp02&#038;stripped_title=introduction-to-springs-dependency-injection" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/rapaul">Richard Paul</a>.</div>
</div>
<div style="width:425px;text-align:left" id="__ss_1215689"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/rapaul/introduction-to-spring-mvc?type=presentation" title="Introduction to Spring MVC">Introduction to Spring MVC</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=springmvc-090328201022-phpapp02&#038;stripped_title=introduction-to-spring-mvc" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=springmvc-090328201022-phpapp02&#038;stripped_title=introduction-to-spring-mvc" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/rapaul">Richard Paul</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2009/03/29/springs-dependency-injection-mvc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unit Testing Fundamentals</title>
		<link>http://www.rapaul.com/2009/03/02/unit-testing-fundamentals/</link>
		<comments>http://www.rapaul.com/2009/03/02/unit-testing-fundamentals/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 08:00:38 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[coverage]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JUnit]]></category>
		<category><![CDATA[mocking]]></category>
		<category><![CDATA[mockito]]></category>
		<category><![CDATA[NUnit]]></category>
		<category><![CDATA[rhino mocks]]></category>
		<category><![CDATA[seams]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[testability]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[vb.net]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=182</guid>
		<description><![CDATA[Below and attached are slides from a presentation I gave to colleagues at Kiwiplan.  The presentation covers a range of topics regarding unit testing best practices, including test driven development (TDD), mocking frameworks, avoiding over-specification and test coverage.  The slides also include diagrams to help explain the concept of isolating code through the [...]]]></description>
			<content:encoded><![CDATA[<p>Below and <a href='http://www.rapaul.com/wp-content/uploads/2009/03/unit_testing_fundamentals.pdf'>attached</a> are slides from a presentation I gave to colleagues at Kiwiplan.  The presentation covers a range of topics regarding unit testing best practices, including test driven development (TDD), mocking frameworks, avoiding over-specification and test coverage.  The slides also include diagrams to help explain the concept of isolating code through the use of seams.</p>
<div style="width:425px;text-align:left" id="__ss_1076073"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/rapaul/unit-testing-fundamentals?type=presentation" title="Unit Testing Fundamentals">Unit Testing Fundamentals</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=unittestingfundamentals-090226222727-phpapp01&#038;stripped_title=unit-testing-fundamentals" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=unittestingfundamentals-090226222727-phpapp01&#038;stripped_title=unit-testing-fundamentals" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/rapaul">Richard Paul</a>. (tags: <a style="text-decoration:underline;" href="http://slideshare.net/tag/unit-testing">unit testing</a> <a style="text-decoration:underline;" href="http://slideshare.net/tag/slides">slides</a>)</div>
</div>
<p>I&#8217;ve attached the final outcome of the live TDD examples.  Obviously TDD doesn&#8217;t come across very well as a final solution, however the code also provides basic examples of the <a href="http://www.mockito.org" target="_blank">Mockito</a> and <a href="http://ayende.com/projects/rhino-mocks.aspx" target="_blank">Rhino Mocks</a> libraries.  The code style is based on Spring Framework&#8217;s annotation driven MVC framework.</p>
<p><a href='http://www.rapaul.com/wp-content/uploads/2009/03/java-unit-testing-example.zip'>Java example code</a> &#8211; JUnit, Mockito, EclEMMA (Eclipse Java coverage)<br />
<a href='http://www.rapaul.com/wp-content/uploads/2009/03/vbnet-unit-test-example.zip'>VB.Net example code</a> &#8211; NUnit, Rhino Mocks</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2009/03/02/unit-testing-fundamentals/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Dojo</title>
		<link>http://www.rapaul.com/2009/02/15/using-dojo/</link>
		<comments>http://www.rapaul.com/2009/02/15/using-dojo/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 08:44:00 +0000</pubDate>
		<dc:creator>Richard Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[slides]]></category>

		<guid isPermaLink="false">http://www.rapaul.com/?p=128</guid>
		<description><![CDATA[Below are slides from a presentation I gave to colleagues at Kiwiplan.  The slides cover how to use some core Dojo APIs and also showcase some of the features Dojo provides.
Using Dojo
View more presentations from Richard Paul. (tags: dojotoolkit tutorial)

I also modified the javascript console created for my previous blog entry to use Dojo. [...]]]></description>
			<content:encoded><![CDATA[<p>Below are slides from a presentation I gave to colleagues at Kiwiplan.  The slides cover how to use some core Dojo APIs and also showcase some of the features <a href="http://www.dojotoolkit.org" target="_blank">Dojo</a> provides.</p>
<div style="width:425px;text-align:left" id="__ss_1029520"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/rapaul/using-dojo?type=powerpoint" title="Using Dojo">Using Dojo</a><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=usingdojo-1234686189920301-1&#038;stripped_title=using-dojo" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=usingdojo-1234686189920301-1&#038;stripped_title=using-dojo" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/rapaul">Richard Paul</a>. (tags: <a style="text-decoration:underline;" href="http://slideshare.net/tag/dojotoolkit">dojotoolkit</a> <a style="text-decoration:underline;" href="http://slideshare.net/tag/tutorial">tutorial</a>)</div>
</div>
<p>I also modified the javascript console created for my <a href="http://www.rapaul.com/2009/02/02/javascript-ajax-basics-slides/">previous blog entry</a> to use Dojo.  You can download the <a href='http://www.rapaul.com/wp-content/uploads/2009/02/dojotutorial.zip'>source</a> to try out Dojo examples on your local box. You will need Java and <a href="http://www.grails.org">Grails</a> installed and can run the server using the usual grails command.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">grails run-app</div></div>
<p>The console can then be accessed at <a href="http://localhost:8080/AjaxServer/">http://localhost:8080/AjaxServer/</a> (only tested in Firefox).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rapaul.com/2009/02/15/using-dojo/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
