<?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>indiWiz.com &#187; restclient</title>
	<atom:link href="http://indiwiz.com/tag/restclient/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiwiz.com</link>
	<description>Subhash&#039;s Tech Log</description>
	<lastBuildDate>Sun, 29 Apr 2012 15:11:41 +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>My LFY print article available with CC license</title>
		<link>http://indiwiz.com/2009/06/03/my-lfy-print-article-available-with-cc-license/</link>
		<comments>http://indiwiz.com/2009/06/03/my-lfy-print-article-available-with-cc-license/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 05:24:49 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[restclient]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=308</guid>
		<description><![CDATA[My print article in Linux For You (LFY) May 2009 Testing RESTful WebServices Made Easy is now available under Creative Commons Attribution-Share Alike 3.0 Unported License.]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>My print article in Linux For You (<a href="http://www.lfymag.com/">LFY</a>) May 2009 <i>Testing RESTful WebServices Made Easy</i> is <a href="http://download.indiwiz.com.s3.amazonaws.com/article/RESTClient.pdf">now available</a> under <a href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-Share Alike 3.0 Unported License</a>.</p>
<div class="shr-publisher-308"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/06/03/my-lfy-print-article-available-with-cc-license/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementing a DI Framework for WizTools.org RESTClient</title>
		<link>http://indiwiz.com/2008/12/15/implementing-a-di-framework-for-wiztoolsorg-restclient/</link>
		<comments>http://indiwiz.com/2008/12/15/implementing-a-di-framework-for-wiztoolsorg-restclient/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 16:34:44 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[DI]]></category>
		<category><![CDATA[IoC]]></category>
		<category><![CDATA[restclient]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=83</guid>
		<description><![CDATA[I wanted very basic DI functionality for RESTClient. Just wanted a mock implementation to execute when doing a mvn test, and real implementation when executed otherwise. So the functionality was simple. My immediate requirement did not require constructor injection or setter injection. And all the beans instantiated had to be singletons. No other fancy requirement. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>I wanted very basic DI functionality for <a href="http://rest-client.googlecode.com/">RESTClient</a>. Just wanted a mock implementation to execute when doing a <tt>mvn test</tt>, and real implementation when executed otherwise. So the functionality was simple. My immediate requirement did not require constructor injection or setter injection. And all the beans instantiated had to be singletons. No other fancy requirement. So for this limited functionality, I was able to design a small framework in two classes: <a href="http://code.google.com/p/rest-client/source/browse/trunk/src/main/java/org/wiztools/restclient/di/DIFramework.java">DIFramework.java</a> and <a href="http://code.google.com/p/rest-client/source/browse/trunk/src/main/java/org/wiztools/restclient/di/DIException.java">DIException.java</a>. For mapping the implementation to the interface, it is managed using a simple property file with content:</p>
<table border="1" width="100%" cellpadding="5" cellspacing="1">
<tr>
<td>
<pre>
org.wiztools.restclient.IGlobalOptions = org.wiztools.restclient.GlobalOptions
</pre>
</td>
</tr>
</table>
<p></p>
<p>The mock implementation in the test execution would be:</p>
<table border="1" width="100%" cellpadding="5" cellspacing="1">
<tr>
<td>
<pre>
org.wiztools.restclient.IGlobalOptions = org.wiztools.restclient.MockGlobalOptions
</pre>
</td>
</tr>
</table>
<p></p>
<p><tt>org.wiztools.restclient.IGlobalOptions</tt> is the interface, and <tt>org.wiztools.restclient.GlobalOptions</tt> and <tt>org.wiztools.restclient.MockGlobalOptions</tt> are the implementation. To get instance of implementation bean:</p>
<pre class="brush: java; title: ; notranslate">
IGlobalOptions obj = DIFramework.getInstance(IGlobalOptions.class);
</pre>
<p>This would return two different beans in different execution environments based on the property control.</p>
<div class="shr-publisher-83"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2008/12/15/implementing-a-di-framework-for-wiztoolsorg-restclient/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

