<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Nicozan-Blog</title>
	<atom:link href="http://nicozan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicozan.wordpress.com</link>
	<description>Knowledge Seeking</description>
	<lastBuildDate>Wed, 24 Aug 2011 15:58:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='nicozan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Nicozan-Blog</title>
		<link>http://nicozan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://nicozan.wordpress.com/osd.xml" title="Nicozan-Blog" />
	<atom:link rel='hub' href='http://nicozan.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Traditional SW VS Intelligent SW</title>
		<link>http://nicozan.wordpress.com/2011/06/27/traditional-sw-vs-intelligent-sw/</link>
		<comments>http://nicozan.wordpress.com/2011/06/27/traditional-sw-vs-intelligent-sw/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 16:52:31 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[IA]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=538</guid>
		<description><![CDATA[Introduction By reading the title , you might think : “Wait a minute. Is there any Stupid SW?”. Please don’t think that, the idea of the post is to show you that there is type of software which aims to emulate Human Intelligence. When it is time to build Intelligent SW? Not all problems look [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=538&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><img class="alignleft" title="informationlogo" src="http://www.cva.org.ve/imagenes/257information_logo.jpg" alt="" width="74" height="74" />Introduction</strong></p>
<p>By reading the title , you might think : “Wait a minute. Is there any Stupid SW?”. Please don’t think that, the idea of the post is to show you that there is type of software which aims to emulate Human Intelligence.</p>
<p><strong>When it is time to build Intelligent SW?</strong></p>
<p>Not all problems look alike. There are some problems that can be solved by implementing a set of steps. These kind of problems have an algorithmic solution. On the other hand we have problems that can’t be solve by an algorithmic solution. These are the ones that need Intelligent SW to solve them.<br />
There is more than one Intelligent SW that can be build. Some of them are listed in the table below.</p>
<div dir="ltr">
<table>
<col width="289" />
<col width="335" />
<tbody>
<tr>
<td>
<p dir="ltr">INTELLIGENT SOFTWARE</p>
</td>
<td>
<p dir="ltr">TYPE OF PROBLEM</p>
</td>
</tr>
<tr>
<td>Expert Systems (With knowledge Base)</td>
<td>Problem that requires human expertise.</td>
</tr>
<tr>
<td>Genetic Algorithms</td>
<td>Optimization problems</td>
</tr>
<tr>
<td>Artificial Neuronal Network</td>
<td>Pattern recognition</td>
</tr>
</tbody>
</table>
</div>
<p>From all these, I will choose the Expert System  to compare with the Traditional Software.</p>
<p><strong>Comparison between Traditional SW and Expert Systems</strong></p>
<div dir="ltr">
<table>
<col width="*" />
<col width="*" />
<col width="*" />
<tbody>
<tr>
<td></td>
<td>Traditional SW</td>
<td>Expert System</td>
</tr>
<tr>
<td>Data</td>
<td>Objects, variables, Constants</td>
<td>Rules and Facts</td>
</tr>
<tr>
<td>Elements</td>
<td>Programs and Data</td>
<td>Rules, Facts and Inference</td>
</tr>
<tr>
<td>Engineering Area related to the build of them.</td>
<td>Software Engineering</td>
<td>Knowledge Engineering</td>
</tr>
<tr>
<td>SW Life Cycles based on</td>
<td>Spiral Model</td>
<td>IDEAL Methodology</td>
</tr>
</tbody>
</table>
</div>
<p>Some aspects need to be explained. The IDEAL methodology is based on the Spiral Model of the Software Engineering. With the difference that the IDEAL methodology considers the corrective maintenance of the knowledge base.</p>
<p>Another thing to keep in mind is that SW Engineering and the Knowledge Engineering complement with each other. Usually an Expert System is a module of a Software      Engineering project.</p>
<p><strong>Conclusion</strong></p>
<p>- Not all problems can be solved by an algorithmic solution.<br />
-SW Engineering and the Knowledge Engineering can live together.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/538/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/538/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/538/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=538&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/06/27/traditional-sw-vs-intelligent-sw/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>

		<media:content url="http://www.cva.org.ve/imagenes/257information_logo.jpg" medium="image">
			<media:title type="html">informationlogo</media:title>
		</media:content>
	</item>
		<item>
		<title>Drools Expert &#8211; Quick Start Screencast</title>
		<link>http://nicozan.wordpress.com/2011/05/30/drools-expert-quick-start/</link>
		<comments>http://nicozan.wordpress.com/2011/05/30/drools-expert-quick-start/#comments</comments>
		<pubDate>Mon, 30 May 2011 14:43:18 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[Drools]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=522</guid>
		<description><![CDATA[Hi, This is a short screencast that I have recorded to explain in a few minutes some of the features and concepts related to Drools Expert. Inside this screencast you will find a simple example that it will help you to understand some of the basics of an Expert System. Please click the image to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=522&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://drools.herod.net/drools-expert/html_single/images/droolsExpertLogo.png" title="Drools Expert Logo" class="alignnone" width="266" height="89" /><br />
Hi,<br />
This is a short screencast that I have recorded to explain in a few minutes some of the features and concepts related to Drools Expert. Inside this screencast you will find a simple example that it will help you to understand some of the basics of an Expert System.<br />
Please click the image to watch the screencast&#8230;</p>
<p><a href="http://www.screencast.com/users/nicozan/folders/Jing/media/1b4525c1-3aef-4c31-978f-ba7b8d589ccc" title="Drools Expert Screencast" target="_blank"><img src="http://watermarked.cutcaster.com/cutcaster-photo-100548792-green-go-button.jpg" border="0" width="100" height="100"></a></p>
<p>I hope it helps <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/522/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/522/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/522/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=522&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/05/30/drools-expert-quick-start/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>

		<media:content url="http://drools.herod.net/drools-expert/html_single/images/droolsExpertLogo.png" medium="image">
			<media:title type="html">Drools Expert Logo</media:title>
		</media:content>

		<media:content url="http://watermarked.cutcaster.com/cutcaster-photo-100548792-green-go-button.jpg" medium="image" />
	</item>
		<item>
		<title>Drools and Gwt &#8211; Small Post, Big Issue</title>
		<link>http://nicozan.wordpress.com/2011/05/11/drools-and-gwt-small-post-big-issue/</link>
		<comments>http://nicozan.wordpress.com/2011/05/11/drools-and-gwt-small-post-big-issue/#comments</comments>
		<pubDate>Wed, 11 May 2011 15:47:25 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[Drools]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[drools]]></category>
		<category><![CDATA[gwt+drools]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=503</guid>
		<description><![CDATA[Short Approach&#8230; It’s an excellent idea to combine 2 two technologies such as Drools and GWT to build Intelligent Web Applications. But there is a little bit of a problem at the moment to integrate them. Because Drools and GWT include the org.eclipse.jdt classes but with different JDT version. And when you run your application [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=503&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://www.verasoft.es/flash/drools_logo.png" title="drools logo" class="alignnone" width="150" height="100" /><img alt="" src="http://mysite.verizon.net/david.hubert.cook/gwt-google-maps/images/gwt-logo.png" title="gwt-logo" class="alignnone" width="100" height="100" /></p>
<p><strong>Short Approach&#8230;</strong></p>
<p>It’s an excellent idea to combine 2 two technologies such as Drools and GWT to build Intelligent Web Applications. But there is a little bit of a problem at the moment to integrate them. Because Drools and GWT include the<strong> org.eclipse.jdt</strong> classes but with different JDT version. And when you run your application (mvn gwt:run) you will have an error like this:<br />
<pre class="brush: plain;">
Unable to parse module: com.google.gwt.user.User
java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.CompilationResult.getErrors()
[Lorg/eclipse/jdt/core/compiler/IProblem;
at com.google.gwt.dev.jdt.AbstractCompiler$ICompilerRequestorImpl.
acceptResult(AbstractCompiler.java:213)
at org.eclipse.jdt.internal.compiler.Compiler.compile
(Compiler.java:417)
...
</pre></p>
<p><strong>Solution&#8230;</strong></p>
<p>So to solve this problem you need to add an exclusion to your dependecy (that has the Drools-Core dependency) added in your Maven Gwt Application pom.xml. The exclusion in your pom should look like this:<br />
<pre class="brush: plain;">
&lt;dependencies&gt;
    [...]
&lt;dependency&gt;
           &lt;groupId&gt;com.wordpress.nicozan&lt;/groupId&gt;
           &lt;artifactId&gt;dependency-with-drools-core&lt;/artifactId&gt;
           &lt;version&gt;1.0&lt;/version&gt;
           &lt;exclusions&gt;
                   &lt;exclusion&gt;
                           &lt;groupId&gt;org.eclipse.jdt.core.compiler&lt;/groupId&gt;
                           &lt;artifactId&gt;ecj&lt;/artifactId&gt;
                   &lt;/exclusion&gt;
           &lt;/exclusions&gt;
&lt;/dependency&gt;
    [...]
&lt;/dependencies&gt;
</pre></p>
<p>Short but helpful <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/503/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/503/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/503/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=503&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/05/11/drools-and-gwt-small-post-big-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>

		<media:content url="http://www.verasoft.es/flash/drools_logo.png" medium="image">
			<media:title type="html">drools logo</media:title>
		</media:content>

		<media:content url="http://mysite.verizon.net/david.hubert.cook/gwt-google-maps/images/gwt-logo.png" medium="image">
			<media:title type="html">gwt-logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Knowledge Elicitation &#8211; Using Protocol Analysis</title>
		<link>http://nicozan.wordpress.com/2011/04/19/knowledge-elicitation-using-protocol-analysis/</link>
		<comments>http://nicozan.wordpress.com/2011/04/19/knowledge-elicitation-using-protocol-analysis/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 17:58:44 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[Drools]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[Expert Systems]]></category>
		<category><![CDATA[Knowledge Elicitation]]></category>
		<category><![CDATA[Knowledge Engineering]]></category>
		<category><![CDATA[Protocol Analysis]]></category>
		<category><![CDATA[Rule Based Systems]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=479</guid>
		<description><![CDATA[Introduction As you might remember in previous posts I have talked about Knowledge Engineering, Expert Systems and Rule Based Systems. Today I’ll get back to those concepts and explain you the Protocol Analysis Method to do Knowledge Elicitation. Protocol Analysis Before we begin, I would like to highlight that there are other methods to elicit [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=479&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>As you might remember in previous posts I have talked about <strong>Knowledge Engineering, Expert Systems and Rule Based Systems.</strong> Today I’ll get back to those concepts and explain you the<strong> Protocol Analysis Method</strong> to do <strong>Knowledge Elicitation.</strong><br />
<strong><br />
Protocol Analysis</strong></p>
<p>Before we begin, I would like to highlight that there are other methods to elicit knowledge such as interviews, questionnaires and repertory grids.<br />
This method have several steps, obviously lets start we the first one :</p>
<p><strong>1-</strong> The Idea is to search and capture ,and then study, everything the expert says while he is solving a problem. That’s why we record the experts explanation with a tape recorder during his task. In other words, the expert have to explain what he is thinking.</p>
<p><strong>2-</strong> After we record our experts explanation (Protocol),we have to write down the recorded audio and divide the text into segments. Please have a look at the next simple example:<br />
<strong>Protocol:</strong><em> “As we can see the Porsche 911 is a very comfortable and fast car, so it is expensive”</em><br />
<strong>Transcription: </strong></p>
<table>
<col width="42" />
<col width="582" />
<tbody>
<tr>
<td style="text-align:center;"><strong>Line</strong></td>
<td>
<p style="text-align:center;"><strong>Text</strong></p>
</td>
</tr>
<tr>
<td>
<p style="text-align:center;">1</p>
</td>
<td>
<p style="text-align:center;">As we can see</p>
</td>
</tr>
<tr>
<td>
<p style="text-align:center;">2</p>
</td>
<td>
<p style="text-align:center;">the Porsche 911</p>
</td>
</tr>
<tr>
<td>
<p style="text-align:center;">3</p>
</td>
<td>
<p style="text-align:center;">is a very comfortable</p>
</td>
</tr>
<tr>
<td>
<p style="text-align:center;">4</p>
</td>
<td>
<p style="text-align:center;">and fast car</p>
</td>
</tr>
<tr>
<td>
<p style="text-align:center;">5</p>
</td>
<td>
<p style="text-align:center;">so it is</p>
</td>
</tr>
<tr>
<td style="text-align:center;">6</td>
<td style="text-align:center;">expensive</td>
</tr>
</tbody>
</table>
<p>In the example protocol,  the expert was explaining what makes a car expensive, thats this ob</p>
<p><strong>3-</strong> Now it’s time to identify concepts, characteristics, values, relations and operators. Considering the Drools Expert tool: Concepts are facts, characteristics are the facts properties and values are the values of the properties.<br />
The operators are elements use by the expert to move from a state of the problem to an other state closer to the final solution.<br />
Let’s see the next classification table:<strong></strong></p>
<table id="internal-source-marker_0.8507981030763603">
<tbody>
<tr>
<td>
<p style="text-align:center;">Element</p>
</td>
<td>
<p style="text-align:center;">ID</p>
</td>
</tr>
<tr>
<td>
<p style="text-align:center;">As we can see</p>
</td>
<td>Relation</td>
</tr>
<tr>
<td>
<p style="text-align:center;">Porsche 911</p>
</td>
<td>Concept</td>
</tr>
<tr>
<td style="text-align:center;">very comfortable</td>
<td>
<p style="text-align:center;">Value</p>
</td>
</tr>
<tr>
<td>
<p style="text-align:center;">fast</p>
</td>
<td>
<p style="text-align:center;">Value</p>
</td>
</tr>
<tr>
<td>
<p style="text-align:center;">so it is</p>
</td>
<td>Operator</td>
</tr>
<tr>
<td>
<p style="text-align:center;">expensive</p>
</td>
<td>Concept</td>
</tr>
</tbody>
</table>
<p><strong></strong>The states in our problem can be Concepts or Characteristics, but not both at the same time. In this case I’ll choose Concepts as states of the problem.<br />
In the table that follows we’ll specify the explicit relations:<br />
<strong><br />
</strong></p>
<table>
<col width="*" />
<col width="*" />
<col width="*" />
<tbody>
<tr>
<td>
<p style="text-align:center;"><strong>Concepts</strong></p>
</td>
<td><strong>Characteristics</strong></td>
<td><strong>Values</strong></td>
</tr>
<tr>
<td style="text-align:center;">Porsche 911</td>
<td style="text-align:center;">(Comfort)</td>
<td>
<p style="text-align:center;">very comfortable</p>
</td>
</tr>
<tr>
<td></td>
<td>
<p style="text-align:center;">(Speed)</p>
</td>
<td>
<p style="text-align:center;">fast</p>
</td>
</tr>
<tr>
<td>
<p style="text-align:center;">Expensive</p>
</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>A value must be always related to a characteristic. If there is an explicit value in the text but there isn’t the explicit characteristic, we have to write the implicit one between parenthesis like the example above.<br />
Now we represent the implicit relations, that are always between concepts.</p>
<p><a href="http://nicozan.files.wordpress.com/2011/04/knowledgeelicitation-usingprotocolanalysis2.png"><img class="size-full wp-image-497 alignnone" title="KnowledgeElicitation-UsingProtocolAnalysis(2)" src="http://nicozan.files.wordpress.com/2011/04/knowledgeelicitation-usingprotocolanalysis2.png?w=640" alt=""   /></a></p>
<p>After this schema, we draw, what is called,  a “<em>Search Identification</em>”:</p>
<p><a href="http://nicozan.files.wordpress.com/2011/04/knowledgeelicitation-usingprotocolanalysis.png"><img class="size-full wp-image-498 alignnone" title="KnowledgeElicitation-UsingProtocolAnalysis" src="http://nicozan.files.wordpress.com/2011/04/knowledgeelicitation-usingprotocolanalysis.png?w=640" alt=""   /></a></p>
<p><strong>4-</strong> Now that we have done our search identification it is time to write the rule associated to it. Obviously we’ll be using the <strong>DRL syntax of Drools Expert.</strong></p>
<p><pre class="brush: plain;">
rule &quot;It's an expensive car&quot;
when
  $porsche : Porsche911( speed  == &quot;Fast&quot;, comfort == “Very Comfortable” )
then
  System.out.println( “Car: ”  + $porsche.getName() + “ is an expensive car” );
end
</pre></p>
<p>Well, this short explanation would be enough for you to start your first knowledge elicitation and get closer to the knowledge engineering.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/479/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/479/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/479/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=479&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/04/19/knowledge-elicitation-using-protocol-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>

		<media:content url="http://nicozan.files.wordpress.com/2011/04/knowledgeelicitation-usingprotocolanalysis2.png" medium="image">
			<media:title type="html">KnowledgeElicitation-UsingProtocolAnalysis(2)</media:title>
		</media:content>

		<media:content url="http://nicozan.files.wordpress.com/2011/04/knowledgeelicitation-usingprotocolanalysis.png" medium="image">
			<media:title type="html">KnowledgeElicitation-UsingProtocolAnalysis</media:title>
		</media:content>
	</item>
		<item>
		<title>GWT- Time to Refactor means Async Interfaces Issue</title>
		<link>http://nicozan.wordpress.com/2011/04/07/gwt-time-to-refactor-means-async-interfaces-issue/</link>
		<comments>http://nicozan.wordpress.com/2011/04/07/gwt-time-to-refactor-means-async-interfaces-issue/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 16:43:29 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[GWT]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Async]]></category>
		<category><![CDATA[Async Interfaces GWT]]></category>
		<category><![CDATA[gwt-maven-plugin]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=466</guid>
		<description><![CDATA[Introduction When you first create a GWT App, the project is divided ,usually, into three packages: client,shared and server. In this post we’ll consider the next packages names: -com.wordpress.nicozan.client -com.wordpress.nicozan.shared -com.wordpress.nicozan.server Refactoring Services Let’s consider that in the package com.wordpress.nicozan.client we have the interface bankService and we have too the interface bankServiceAsync. This Async-interface help [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=466&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://mojo.codehaus.org/gwt-maven-plugin/images/gwt-maven-logo.png" title="gwt-maven-logo" class="alignnone" width="130" height="70" />   <strong>Introduction</strong></p>
<p>When you first create a GWT App, the project is divided ,usually, into three packages: client,shared and server. In this post we’ll consider the next packages names:<br />
<strong>-com.wordpress.nicozan.client<br />
-com.wordpress.nicozan.shared<br />
-com.wordpress.nicozan.server</strong></p>
<p><strong>Refactoring Services</strong></p>
<p>Let’s consider that in the package com.wordpress.nicozan.client we have the interface bankService and we have too the interface bankServiceAsync. This Async-interface help us to communicate with the server side of our application. The server side is in the package com.wordpress.nicozan.server and contains an implementation named bankServiceImpl.<br />
Up to now everything seems nice and simple, but if your application starts to grow and improve, you&#8217;ll probably have many services. This means that your client package we’ll have several service interfaces mixed with your widgets and utility classes.<br />
So to avoid having everything mixed up, you decide to create the next packages:<br />
<strong>-com.wordpress.nicozan.client.util<br />
-com.wordpress.nicozan.client.widgets<br />
-com.wordpress.nicozan.client.services</strong><br />
This post will focus in the <strong>services package</strong>. Inside this package we’ll put the service interfaces that are related to the Async interfaces.<br />
At the moment we compile (<em>mvn clean install</em> ), an error will appear. The error will say that the Async interfaces cannot be found. This problem is because by default the gwt-maven-plugin generates the Async interfaces from the service interfaces located in the client package, and it doesn&#8217;t look inside the client sub-packages. The way to solve this problem is by adding 2 tags to the plugin configuration inside the <strong>pom.xml</strong>:<br />
<pre class="brush: plain;">
...
&lt;!-- GWT Maven Plugin --&gt;
 &lt;plugin&gt;
       &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
       &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt;
       &lt;version&gt;2.1.0-1&lt;/version&gt;
           &lt;executions&gt;
                 &lt;execution&gt;
                       &lt;goals&gt;
                             &lt;goal&gt;compile&lt;/goal&gt;
                             &lt;goal&gt;test&lt;/goal&gt;
                             &lt;goal&gt;i18n&lt;/goal&gt;
                             &lt;goal&gt;generateAsync&lt;/goal&gt;
                       &lt;/goals&gt;
                 &lt;/execution&gt;
           &lt;/executions&gt;
       &lt;!-- Plugin configuration. There are many available options, see
         gwt-maven-plugin documentation at codehaus.org --&gt;
      &lt;configuration&gt;
         &lt;runTarget&gt;MyWebApp.html&lt;/runTarget&gt;
         &lt;hostedWebapp&gt;${webappDirectory}&lt;/hostedWebapp&gt;
          &lt;i18nMessagesBundle&gt;com.wordpress.nicozan.client.Messages&lt;/i18nMessagesBundle&gt;  
         &lt;servicePattern&gt;**/client/services/*Service.java&lt;/servicePattern&gt;
         &lt;inplace&gt;true&lt;/inplace&gt;
       &lt;/configuration&gt;
 &lt;/plugin&gt;
...
</pre></p>
<p>In the code snippet above, the two important tags are <strong><em>servicePattern </em></strong>and <strong><em>inplace</em></strong>. In the first one, we specify a relative path to where service interfaces are. The second tag, specifies that the generated Async interface have to be located in the same package as its analog service interface.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/466/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/466/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/466/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=466&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/04/07/gwt-time-to-refactor-means-async-interfaces-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>

		<media:content url="http://mojo.codehaus.org/gwt-maven-plugin/images/gwt-maven-logo.png" medium="image">
			<media:title type="html">gwt-maven-logo</media:title>
		</media:content>
	</item>
		<item>
		<title>GWT Visualization &#8211; Transform Data into Information</title>
		<link>http://nicozan.wordpress.com/2011/03/30/gwt-visualization-transform-data-into-information/</link>
		<comments>http://nicozan.wordpress.com/2011/03/30/gwt-visualization-transform-data-into-information/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 12:22:25 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[GWT]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Charts]]></category>
		<category><![CDATA[GWT Visualization]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=457</guid>
		<description><![CDATA[Introduction Beginning with the concept, that data it is not information. A table full of rows (i.e. 1000 rows) it can be consider data, and you’ll agree with me that trying to find meaningful data (Information) from the table it’s going to be a tedious task. At this point of the reasoning is when we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=457&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://code.google.com/p/gwt-google-apis/logo?cct=1299885414" title="gwt-api-logo" class="alignnone" width="55" height="55" />    <strong>Introduction</strong></p>
<p>Beginning with the concept, that <strong>data</strong> it is not <strong>information</strong>.  A table full of rows (i.e. 1000 rows) it can be consider data, and you’ll agree with me that trying to find meaningful data (Information) from the table it’s going to be a tedious task. At this point of the reasoning is when we use Charts (i.e. Line Charts, Pie Charts, Scatter Charts, etc) to summarize the data from the table and in that way we obtain information to make a decision. GWT Visualization will help us to add Charts to our GWT webapp, by using its simple API.</p>
<p><strong>Using the GWT Visualization API</strong></p>
<p>If you are not familiarized with the GWT Framework, you need to have a look at its <a href="http://code.google.com/intl/en/webtoolkit/gettingstarted.html">documentation</a> or <a href="http://nicozan.wordpress.com/2011/01/11/gwt-google-web-toolkit-framework-basic-concepts-to-do-things-well/">my post</a>. Considering that you are using the Maven GWT Plugin, all you have to do is define the next dependency in the projects pom.xml.<br />
<pre class="brush: plain;">
&lt;dependency&gt;
  &lt;groupId&gt;com.google.gwt.google-apis&lt;/groupId&gt;
  &lt;artifactId&gt;gwt-visualization&lt;/artifactId&gt;
  &lt;version&gt;1.0.2&lt;/version&gt;
&lt;/dependency&gt;
</pre><br />
The next thing to do is define the module inheritance so the client side of the webapp can use it. In the “myWebApp”.gwt.xml you have to write:<br />
<pre class="brush: plain;">
&lt;inherits name='com.google.gwt.visualization.Visualization'/&gt;
</pre><br />
Now that we have GWT Visualization ready to use, let’s see the elements that are part of a Chart:<br />
-DataTable (Data Format that is going to be injected into the Chart so it can display information)<br />
-Options (Set of characteristics of the Chart: width, height,background,color,etc. )  </p>
<p>If you want to see a basic example working go to this page: <a href="http://code.google.com/p/gwt-google-apis/wiki/VisualizationGettingStarted">GWT Visualization Example.<br />
</a><br />
<strong>Short Tip:</strong></p>
<p>If you want to draw a Line Chart and you have dots or coordinates best thing, you should use a Scatter Chart and set the option ScatterChart.Option.setLineSize(1); . The line size has to be 1 or greater than 1.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/457/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/457/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/457/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=457&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/03/30/gwt-visualization-transform-data-into-information/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>

		<media:content url="http://code.google.com/p/gwt-google-apis/logo?cct=1299885414" medium="image">
			<media:title type="html">gwt-api-logo</media:title>
		</media:content>
	</item>
		<item>
		<title>GWT &#8211; Adding Jar Dependency to our GWT project. (Maven-Gwt-Plugin)</title>
		<link>http://nicozan.wordpress.com/2011/03/17/gwt-adding-jar-dependency-to-our-gwt-project-maven-gwt-plugin/</link>
		<comments>http://nicozan.wordpress.com/2011/03/17/gwt-adding-jar-dependency-to-our-gwt-project-maven-gwt-plugin/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 16:16:40 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[GWT]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=440</guid>
		<description><![CDATA[Introduction You might be asking yourself, Why am I doing this post?, because you might think that adding a dependency in a GWT Project using the Maven-GWT-Plugin is just as simple as adding a dependency in a Regular Maven project. Sorry to disappoint but apart from that you have to do something else … Concepts [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=440&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>You might be asking yourself, Why am I doing this post?, because you might think that adding a dependency in a GWT Project using the Maven-GWT-Plugin is just as simple as adding a dependency in a Regular Maven project. Sorry to disappoint but apart from that you have to do something else … <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Concepts</strong></p>
<p>Every gwt project has a <strong>gwt.xml file</strong> that represents the GWT-module. This file contains specific information related to the module, for example:<br />
<strong>&#8212;Entry-point </strong>(The java class that represents the web page that is going to be displayed in the web browser)<br />
<strong>&#8212;Inherits </strong>(External Modules that our GWT-Module uses)</p>
<p>These two elements shown above are represented by tags. These tags are child elements of the root element <em>module</em> . The next code snippet shows how the gwt.xml file is structured.<br />
<strong>MyWebApp.gwt.xml</strong><br />
<pre class="brush: plain;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;module rename-to='MyWebApp'&gt;
 &lt;!-- Inherit the core Web Toolkit stuff.                        --&gt;
 &lt;inherits name='com.google.gwt.user.User'/&gt;
 &lt;!-- Inherit the default GWT style sheet.  You can change       --&gt;
 &lt;!-- the theme of your GWT application by uncommenting          --&gt;
 &lt;!-- any one of the following lines.                            --&gt;
 &lt;inherits name='com.google.gwt.user.theme.standard.Standard'/&gt;
 &lt;!-- &lt;inherits name='com.google.gwt.user.theme.chrome.Chrome'/&gt; --&gt;
 &lt;!-- &lt;inherits name='com.google.gwt.user.theme.dark.Dark'/&gt;     --&gt;

 &lt;!-- Other module inherits                                      --&gt;
 &lt;inherits name='com.wordpress.nicozan.Model'/&gt;

 &lt;!-- Specify the app entry point class.                         --&gt;
 &lt;entry-point class='com.wordpress.nicozan.client.MyWebApp'/&gt;

 &lt;!-- Specify the paths for translatable code                    --&gt;
 &lt;source path='client'/&gt;
 &lt;source path='shared'/&gt;
&lt;/module&gt;
</pre><br />
As you can see the name of the gwt.xml file is the same, <strong>and must be</strong>, as the Entry-point Java Class name. There are some modules that are standards and need to be inherited, (i.e : com.google.gwt.user.User)<br />
<strong><br />
Adding Jar Dependencies</strong></p>
<p>Let’s consider the MyWebApp.gwt.xml shown before and that we have a project with two sub modules : webapp and model. The project has the next directory structure:<br />
<pre class="brush: plain;">
parent-project/                                    
|- pom.xml
|
|- model/                                      (External JAR module:)
|  |- pom.xml
|  \- src/main/java/
|     \- com/wordpress/nicozan/
|        |- Model.gwt.xml
|        \- model/utils/Element1.java
|
\- webapp/                                      (GWT-Module)
 |- pom.xml
 \- src/
    |- main/java/
    |  \ -com/wordpress/nicozan/
    |     |- MyWebApp.gwt.xml
    |     \- client/MyWebApp.java
    \- main/webapp/
       \- WEB-INF/web.xml
</pre><br />
Take special attention to the model module. There is a gwt.xml file<strong> (Model.gwt.xml)</strong> that it’s in charge of specifying the source path from where the resources we’ll be built so the webapp module will then be able to use them. The Model.gwt.xml will look like this:<br />
<pre class="brush: plain;">
&lt;module&gt;
&lt;inherits name=&quot;com.google.gwt.user.User&quot;/&gt;
&lt;source path=&quot;model&quot;/&gt;
&lt;/module&gt;
</pre><br />
The Java classes are found recursively so you just need to specify the root directory.<br />
The next thing to do is to generate this resources so the GWT webapp can use them. The pom.xml of the model module would look like this:<br />
<pre class="brush: plain;">
&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;
&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

&lt;parent&gt;
  &lt;groupId&gt;com.wordpress.nicozan&lt;/groupId&gt;
  &lt;artifactId&gt;parent-project&lt;/artifactId&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
&lt;/parent&gt;

&lt;artifactId&gt;model&lt;/artifactId&gt;
&lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
&lt;packaging&gt;jar&lt;/packaging&gt;

&lt;build&gt;    
  &lt;resources&gt;
    &lt;resource&gt;
      &lt;directory&gt;src/main/java&lt;/directory&gt;
      &lt;includes&gt;
        &lt;include&gt;**/*.java&lt;/include&gt;
        &lt;include&gt;**/*.gwt.xml&lt;/include&gt;
      &lt;/includes&gt;
    &lt;/resource&gt;
  &lt;/resources&gt;
  &lt;plugins&gt;
        &lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;gwt-maven-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
        &lt;execution&gt;
          &lt;goals&gt;
            &lt;goal&gt;resources&lt;/goal&gt;
          &lt;/goals&gt;
        &lt;/execution&gt;
      &lt;/executions&gt;
    &lt;/plugin&gt;
  &lt;/plugins&gt;
&lt;/build&gt;
&lt;/project&gt;
</pre><br />
Now, when you do mvn clean install of the parent-project, the resources will be generated and the GWT webapp can consume them. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>TIPS/NOTES:</strong><br />
- Don’t forget to add all the dependencies as you usually do in your common maven projects.<br />
- Remember to add the maven-gwt-plugin to the pom.xml of the resource you want generate.<br />
- You don&#8217;t need to do all the steps explained above if you are adding dependencies that are going to use on the server-side. In that case just add the dependency to the pom as usual.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/440/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/440/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/440/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=440&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/03/17/gwt-adding-jar-dependency-to-our-gwt-project-maven-gwt-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>
	</item>
		<item>
		<title>Cargo Maven Plugin &#8211; Functional Testing</title>
		<link>http://nicozan.wordpress.com/2011/03/01/cargo-maven-plugin-functional-testing/</link>
		<comments>http://nicozan.wordpress.com/2011/03/01/cargo-maven-plugin-functional-testing/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 15:10:27 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Cargo]]></category>
		<category><![CDATA[Functional Testing]]></category>
		<category><![CDATA[WebApps]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=427</guid>
		<description><![CDATA[Introduction The main idea of this post is to help you and give you a set of steps to create en embedded web-app container where you can put different compiled modules inside it and run integration tests. Container JAVA API: Cargo has a Java API that allow as to start/stop/configure Java Containers and deploy modules [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=427&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong><br />
The main idea of this post is to help you and give you a set of steps to create en embedded web-app container where you can put different compiled modules inside it and run integration tests.<br />
<strong><br />
Container JAVA API:</strong><br />
Cargo has a Java API  that allow as  to start/stop/configure Java Containers and deploy modules into them. The objects related to this API are:</p>
<p>    <strong>* Container: </strong> is the top level interface wrapping a real physical container. Cargo supports Local and Remote containers. (In this explanation we’ll be using Local Containers). A Container is composed of a Configuration.<br />
    <strong>* Configuration:</strong> tells the Cargo how the container is to configured (logging, security, data sources, location where to put deployables, etc). A Configuration can be configured to install Deployables before the containers is started.<br />
   <strong> * Deployer:  </strong>it is used to hot-deploy Deployables. Hot-deploy means when you deploy a Deployable into a running container.<br />
    <strong>* Deployables: </strong>are archives (WAR,EAR,etc) that can be deployed into the container.</p>
<p><strong>MAVEN 2 Cargo Plugin:</strong><br />
The plugin wraps the Cargo JAVA API and from various types of use cases of it, we’ll explain how to start and stop a container, including deploying some deployables as it starts.<br />
As we said before we’ll run an embedded container.The most basic container you can use in cargo is an Embedded Jetty 4x/5x/6x Container. The following maven 2 plugin definition will configure an embedded Jetty 6x container. Note the use of the embedded type element to specify an embedded container.<br />
<pre class="brush: plain;">
[...]
&lt;build&gt;
  &lt;plugins&gt;
     &lt;plugin&gt;
         &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
         &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
         &lt;version&gt;1.0.6&lt;/version&gt;
         &lt;configuration&gt;
             &lt;container&gt;
                   &lt;containerId&gt;jetty6x&lt;/containerId&gt;
                   &lt;type&gt;embedded&lt;/type&gt;
             &lt;/container&gt;
         &lt;/configuration&gt;
     &lt;/plugin&gt;
  &lt;/plugins&gt;
&lt;/build&gt;
[...]
</pre><br />
Before we continue please remember that the code snippet from above goes in your pom.xml  and that if you don’t specify the  value the embedded container we’ll be Jetty 5.X.</p>
<p>Now it is time to start deploying our deployables. The deployables are archives (i.e. EAR and WAR) that can be deployed in the container. The code snippet below shows how to deploy deployables in an embedded container, in this case jetty:<br />
<pre class="brush: plain;">
&lt;dependencies&gt;
[...]
   &lt;dependency&gt;
       &lt;groupId&gt;com.wordpress.nicozan&lt;/groupId&gt;
       &lt;artifactId&gt;my-war&lt;/artifactId&gt;
       &lt;version&gt;1.0.0&lt;/version&gt;
       &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;/dependency&gt;
[...]
&lt;/dependencies&gt;
[...]
&lt;build&gt;
  &lt;plugins&gt;
     &lt;plugin&gt;
        &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
        &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
        &lt;version&gt;1.0.6&lt;/version&gt;
        &lt;configuration&gt;
             &lt;container&gt;
                   &lt;containerId&gt;jetty6x&lt;/containerId&gt;
                   &lt;type&gt;embedded&lt;/type&gt;
             &lt;/container&gt;
            &lt;configuration&gt;
                      &lt;type&gt;embedded&lt;/type&gt;
                      [...]
                      &lt;deployables&gt;
                            &lt;deployable&gt;
                                  &lt;groupId&gt;com.wordpress.nicozan&lt;/groupId&gt;
                                   &lt;artifactId&gt;my-war&lt;/artifactId&gt;
                                   &lt;type&gt;war&lt;/type&gt;
                             &lt;/deployable&gt;
                      &lt;/deployables&gt;
            &lt;/configuration&gt;
       &lt;/configuration&gt;
     &lt;/plugin&gt;
  &lt;/plugins&gt;
&lt;/build&gt;
[...]
</pre><br />
Okay, let’s talk about the tags we have seen above. As we can see, we  have specified the  that represents our . You might have noticed that the dependency tag and the deployable tag have almost the same properties. The property that they don’t share is the version. This is because cargo gets the version information from the dependency declaration at the moment it has to deploy the deployable.</p>
<p><strong>When do we use Cargo?</strong></p>
<p>Imagine that you have a Web App,in Java obviously using the maven archetype. This Web Application is divided in two  modules: Client and Server. The hierarchical structure of the project would be like this:<br />
<strong>MyWebApp</strong> (pom.xml)<br />
    &#8212;&gt; <strong>Client-Module</strong> (pom.xml)<br />
    &#8212;&gt; <strong>Server-Module</strong> (pom.xml)<br />
Up to now we see a very common structure of a project, but cargo empowers the use of an extra module to start the Functional Testing. We’ll add the module Deployer to our project structure.<br />
<strong>MyWebApp</strong> (pom.xml)<br />
    &#8212;&gt; <strong>Client-Module</strong> (pom.xml)<br />
    &#8212;&gt; <strong>Server-Module</strong> (pom.xml)<br />
    &#8212;&gt; <strong>Deployer-Module</strong> (pom.xml)<br />
In the <strong>Deployer-Module</strong> you have to modify its pom.xml  and write a configuration similar to the one written in code snippets above, it should be something like this:<br />
<pre class="brush: plain;">  
&lt;dependencies&gt;
[...]
&lt;dependency&gt;
  &lt;groupId&gt;com.wordpress.nicozan&lt;/groupId&gt;
  &lt;artifactId&gt;Client-Module&lt;/artifactId&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
  &lt;groupId&gt;com.wordpress.nicozan&lt;/groupId&gt;
  &lt;artifactId&gt;Server-Module&lt;/artifactId&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
&lt;/dependency&gt;
[...]
&lt;/dependencies&gt;
[...]
&lt;build&gt;
  &lt;plugins&gt;
    &lt;plugin&gt; 
         &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
         &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
         &lt;configuration&gt;
             &lt;container&gt;
                   &lt;containerId&gt;jetty6x&lt;/containerId&gt;
                   &lt;type&gt;embedded&lt;/type&gt;
             &lt;/container&gt;
             &lt;configuration&gt;
                  &lt;type&gt;embedded&lt;/type&gt;
                  [...]
                  &lt;deployables&gt;
                            &lt;deployable&gt;
                                  &lt;groupId&gt;com.wordpress.nicozan&lt;/groupId&gt;
                                   &lt;artifactId&gt;Client-Module&lt;/artifactId&gt;
                                   &lt;type&gt;war&lt;/type&gt;
                             &lt;/deployable&gt;
                    &lt;deployable&gt;
                                  &lt;groupId&gt;com.wordpress.nicozan&lt;/groupId&gt;
                                   &lt;artifactId&gt;Server-Module&lt;/artifactId&gt;
                                   &lt;type&gt;war&lt;/type&gt;
                             &lt;/deployable&gt;
                  &lt;/deployables&gt;
             &lt;/configuration&gt;
         &lt;/configuration&gt;
    &lt;/plugin&gt;
  &lt;/plugins&gt;
&lt;/build&gt;
[...]
</pre><br />
Hope this helps you to understand the main idea of cargo. If you are interested in improving your ways of building a web app, you can have a look at Leandro’s <a href="http://www.dx9.com.ar/gwt/how-to-smartgwt-maven-eclipse/">post</a> that explains  how to create web app using SmartGwt.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/427/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/427/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/427/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=427&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/03/01/cargo-maven-plugin-functional-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>
	</item>
		<item>
		<title>Drools-Guvnor &#8211; Spring Context Feature</title>
		<link>http://nicozan.wordpress.com/2011/02/03/drools-guvnor-spring-context-feature/</link>
		<comments>http://nicozan.wordpress.com/2011/02/03/drools-guvnor-spring-context-feature/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 17:00:00 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[Drools]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=398</guid>
		<description><![CDATA[Introduction Drools-Guvnor has now the possibility to create, modify and delete Spring Context Files. This new feature allows you to define Drools Knowledge Bases, Knowledge Sessions, Knowledge Agents and Common Spring Beans inside your Spring Context File. How to Create a Spring Context in Guvnor You have to go to the Knowledge Bases Tag on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=398&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>Drools-Guvnor has now the possibility to create, modify and delete Spring Context Files. This new feature allows you  to define Drools Knowledge Bases, Knowledge Sessions, Knowledge Agents and Common Spring Beans inside your Spring Context File. </p>
<p><strong>How to Create a Spring Context  in Guvnor</strong></p>
<p>You have to go to the Knowledge Bases Tag on the Left Menu and select:<br />
<strong>Create New &#8212;&gt; New Spring Context.</strong><br />
Like any other asset you will have to give it a name and set in which package it&#8217;ll be saved.<br />
<a href="http://nicozan.files.wordpress.com/2011/02/createspringcontextguvnor.png"><img src="http://nicozan.files.wordpress.com/2011/02/createspringcontextguvnor.png?w=458&#038;h=471" alt="" title="createSpringContextGuvnor" width="458" height="471" /></a></p>
<p><strong>It is time to Edit our Spring Context</strong></p>
<p>The next image shows the SpringContext Editor. You will be able to insert new tags in this XML file, by positioning your text cursor in the place where you would like to insert this new tag and then click on one of the options on the left palette. (KSession, KBase, Node,  KAgent, Spring Bean)<br />
<a href="http://nicozan.files.wordpress.com/2011/02/editspringcontextguvnor.png"><img src="http://nicozan.files.wordpress.com/2011/02/editspringcontextguvnor.png?w=640&#038;h=299" alt="" title="EditSpringContextGuvnor" width="640" height="299" /></a><br />
Another feature of the SpringContext editor is that we can validate our XSD file against the XSD file implicitly referred in the Spring Context File. All you have to do is go to : Source&#8212;&gt; Validate.</p>
<p><strong>Adding New Buttons to our Palette</strong></p>
<p>If you want to add new buttons to your palette, Drools Guvnor allows you to do this through a Properties File. The name of the file is <strong>springContextElements.properties</strong>, it&#8217;s located in the path:<strong>$GUVNOR_HOME/WEB-INF/Clases/springContextElements.properties.</strong></p>
<p><strong>Downloading The Spring Context Files</strong></p>
<p>Each spring context is exposed through an URL. These URLs could be found at the bottom part of the Package editor where the context files are defined.<br />
<a href="http://nicozan.files.wordpress.com/2011/02/downloadspringcontextguvnor.png"><img src="http://nicozan.files.wordpress.com/2011/02/downloadspringcontextguvnor.png?w=640&#038;h=339" alt="" title="DownloadSpringContextGuvnor" width="640" height="339" /></a></p>
<p>Stay tuned for updates related to Drools&#8230; <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> , this new feature is now in the trunk, in Drools 5.2.0.M1. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/398/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/398/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/398/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=398&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/02/03/drools-guvnor-spring-context-feature/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>

		<media:content url="http://nicozan.files.wordpress.com/2011/02/createspringcontextguvnor.png" medium="image">
			<media:title type="html">createSpringContextGuvnor</media:title>
		</media:content>

		<media:content url="http://nicozan.files.wordpress.com/2011/02/editspringcontextguvnor.png" medium="image">
			<media:title type="html">EditSpringContextGuvnor</media:title>
		</media:content>

		<media:content url="http://nicozan.files.wordpress.com/2011/02/downloadspringcontextguvnor.png" medium="image">
			<media:title type="html">DownloadSpringContextGuvnor</media:title>
		</media:content>
	</item>
		<item>
		<title>GWT &#8211; Asynchronous RPC</title>
		<link>http://nicozan.wordpress.com/2011/01/14/gwt-asynchronous-rpc/</link>
		<comments>http://nicozan.wordpress.com/2011/01/14/gwt-asynchronous-rpc/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 13:28:29 +0000</pubDate>
		<dc:creator>nicozan</dc:creator>
				<category><![CDATA[GWT]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://nicozan.wordpress.com/?p=385</guid>
		<description><![CDATA[Most semi-complex WebApps have a back-end server. GWT give us the possibility to interact with the server-side using RPC (Remote Procedures Call). I&#8217;ll explain how it works through an example: On the client-side, we have 2 Interfaces that will be the key to our communication with the server-side. BankClient.java BankClientAsync.java The nature of asynchronous methods [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=385&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Most semi-complex WebApps have a back-end server.  GWT give us the possibility to interact with the server-side using RPC (Remote Procedures Call). I&#8217;ll explain how it works through an example:</p>
<p><a href="http://nicozan.files.wordpress.com/2011/01/client-serverrpc.png"><img src="http://nicozan.files.wordpress.com/2011/01/client-serverrpc.png?w=555&#038;h=275" alt="" title="client-serverRPC" width="555" height="275" /></a></p>
<p>On the client-side, we have 2 Interfaces that will be the key to our communication with the server-side.</p>
<p><strong>BankClient.java</strong><br />
<pre class="brush: plain;">
package com.wordpress.nicozan.client;
import com.google.gwt.user.client.rpc.RemoteService;
public interface BankClient extends RemoteService {
  public String askForLoan(String s);
}
</pre></p>
<p><strong>BankClientAsync.java</strong><br />
<pre class="brush: plain;">
package com.wordpress.nicozan.client;
public interface BankClientAsync {
   public void askForLoan(String s, AsyncCallback&lt;String&gt; callback);
}
</pre></p>
<p>The nature of asynchronous methods requires the caller to pass in a callback object that can be notified when an asynchronous call completes, since by definition the caller cannot be blocked until the call completes. For the same reason, asynchronous methods do not have return types; they generally return void. Should you wish to have more control over the state of a pending request, return Request instead. After an asynchronous call is made, all communication back to the caller is via the passed-in callback object.</p>
<p>On the server side we just have 1 class, that implements the methods of the BackClient interface.</p>
<p><strong>Bank.java</strong><br />
<pre class="brush: plain;">
package com.wordpress.nicozan.server;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.wordpress.nicozan.client.BankClient;
public class Bank extends RemoteServiceServlet implements
    BankClient {
  	public String askForLoan(String s) {
			if (Integer.parseInt(s) &lt;= 1000){
				System.out.println(&quot;granted&quot;);
				return new String(&quot;Loan Granted&quot;);	
		 	}else{
		 		System.out.println(&quot;Deny&quot;);
		 		return new String(&quot;Loan Denied&quot;);
		 	}

        }
}
</pre><br />
It is very important to take into consideration the suffix Async and argument referencing the AsyncCallback. The relationship between service interface and its asynchronous counterpart must follow certain naming standards. If the naming standards aren&#8217;t applied the GWT compiler won&#8217;t generate the proper code to implement RPC.<br />
The service interface and the asynchronous interface must be in the same package. Each method in the asynchronous service interface must have a corresponding method in the asynchronous service interface with an extra AsyncCallback parameter as the last argument.</p>
<p>Up to now we have defined all the necessary elements, but how should we use them?. Usually in common WebApps we have to define and map our servlet in the <strong>web.xml</strong> file:<br />
<pre class="brush: plain;">
...
&lt;servlet&gt;
   &lt;servlet-name&gt;bankServlet&lt;/servlet-name&gt;
   &lt;servlet-class&gt;com.wordpress.nicozan.server.Bank&lt;/servlet-class&gt;
   &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;    
&lt;/servlet&gt;
  
&lt;servlet-mapping&gt;
    &lt;servlet-name&gt;bankServlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/bankServlet&lt;/url-pattern&gt;  	
&lt;/servlet-mapping&gt;
  	
&lt;servlet-mapping&gt;
   &lt;servlet-name&gt;bankServlet&lt;/servlet-name&gt;
   &lt;url-pattern&gt;/com.wordpress.nicozan.Application/bankServlet&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;  	
...
</pre></p>
<p>Please remember that one servlet can be mapped in more than one URL, no the other way around. GWT needs an other definition of the servlet in the Module Configuration File,<strong>”Application.gwt.xml” </strong>:<br />
<pre class="brush: plain;">
…      
&lt;servlet path=&quot;/bankServlet&quot; class=&quot;com.wordpress.nicozan.server.Bank&quot;/&gt; 
...
</pre><br />
Nothing further to say, thanks for reading it. I hope it helps.. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nicozan.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nicozan.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nicozan.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nicozan.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nicozan.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nicozan.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nicozan.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nicozan.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nicozan.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nicozan.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nicozan.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nicozan.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nicozan.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nicozan.wordpress.com/385/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=nicozan.wordpress.com&amp;blog=15757797&amp;post=385&amp;subd=nicozan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://nicozan.wordpress.com/2011/01/14/gwt-asynchronous-rpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/172b11f948a94901e672a5fbec44b560?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">nicozan</media:title>
		</media:content>

		<media:content url="http://nicozan.files.wordpress.com/2011/01/client-serverrpc.png" medium="image">
			<media:title type="html">client-serverRPC</media:title>
		</media:content>
	</item>
	</channel>
</rss>
