<?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>Sami Dalouche &#187; Web Development</title>
	<atom:link href="http://www.dalouche.com/wordpress/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dalouche.com/wordpress</link>
	<description>Sami Dalouche's blog about Linux, Java, .NET and other bleeding-edge stuff. skoobi@free.fr</description>
	<lastBuildDate>Wed, 25 Aug 2010 17:24:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dojo : How to animate a ProgressBar</title>
		<link>http://www.dalouche.com/wordpress/2007/02/28/dojo-how-to-animate-a-progressbar/</link>
		<comments>http://www.dalouche.com/wordpress/2007/02/28/dojo-how-to-animate-a-progressbar/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 10:33:04 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2007/02/28/dojo-how-to-animate-a-progressbar/</guid>
		<description><![CDATA[Let&#8217;s say you want to display a Dojo ProgressBar, that has a max progressValue of 10 :


Now, you want to animate it so that it progressively reaches its progressValue. Something like the following will be needed :
function animateProgressBar(progressBarName, targetValue anim) {
dojo.event.connect(
anim,
&#8220;onAnimate&#8221;,
function(e) {
var bar = dojo.widget.byId(progressBarName);
bar.setProgressValue(targetValue * e.x / 100);
}
);
}
dojo.addOnLoad(
function() {
var anim = new dojo.animation.Animation(
new dojo.math.curves.Line([0], [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you want to display a Dojo ProgressBar, that has a max progressValue of 10 :</p>
<blockquote><p><dojo:ProgressBar id="progressBar"<br />
width="200" height="20"<br />
hasText="true"<br />
progressValue="7"<br />
maxProgressValue="10" id="testBar" showOnlyIntegers="true" /></p>
</blockquote>
<p>Now, you want to animate it so that it progressively reaches its progressValue. Something like the following will be needed :</p>
<blockquote><p>function animateProgressBar(progressBarName, targetValue anim) {<br />
dojo.event.connect(<br />
anim,<br />
&#8220;onAnimate&#8221;,<br />
function(e) {<br />
var bar = dojo.widget.byId(progressBarName);<br />
bar.setProgressValue(targetValue * e.x / 100);<br />
}<br />
);<br />
}</p>
<p>dojo.addOnLoad(<br />
function() {</p>
<p>var anim = new dojo.animation.Animation(<br />
new dojo.math.curves.Line([0], [100])<br />
, 2000);</p>
<p>animateProgressBar(<br />
&#8220;stressLevelProgressBar&#8221;,<br />
7 ,<br />
anim<br />
)</p>
<p>anim.play();<br />
}<br />
);</p>
</blockquote>
<p>And it should be working&#8230;
</p>
<p><!--55456e884cd6505f5fa20f111c983878-->
</p>
<p><!--f28721f49c29dead5a7577b777e9db9c-->
</p>
<p><!--8b2475a39e6c0ee2d91c865086335699--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2007/02/28/dojo-how-to-animate-a-progressbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>J2SE 6 : will web development finally be productive thanks to scripting ?</title>
		<link>http://www.dalouche.com/wordpress/2006/12/11/j2se-6-will-web-development-finally-be-productive-thanks-to-scripting/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/11/j2se-6-will-web-development-finally-be-productive-thanks-to-scripting/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 20:14:25 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/11/j2se-6-will-web-development-finally-be-productive-thanks-to-scripting/</guid>
		<description><![CDATA[Sun just announced J2SE 6 and many java bloggers are relaying the information..
Something important for the web development community in this release is the  support for scripting languages. In fact, the trend, that has been started with Java Hotswap, is to create tools that allow Web Frameworks to be more productive for developers.
Indeed, developers are [...]]]></description>
			<content:encoded><![CDATA[<p>Sun <a href="http://www.sun.com/smi/Press/sunflash/2006-12/sunflash.20061211.1.xml">just announced J2SE 6</a> and many <a href="http://www.jroller.com/page/vkpillai?entry=javase6_0_released_today">java bloggers</a> are relaying the information..</p>
<p>Something important for the web development community in this release is the  support for scripting languages. In fact, the trend, that has been <a href="http://www.dalouche.com/wordpress/2006/12/06/java-hotswapping-support-and-developer-productivity/">started with Java Hotswap</a>, is to create tools that allow Web Frameworks to be more productive for developers.</p>
<p>Indeed, developers are tired of the develop / build / deploy cycle, and would prefer to work with the PHP-like develop / reload in browser development cycle. Well, scripting is a step in that direction, and would allow to :</p>
<ul>
<li>Keep the domain layer as strongly-typed POJOs, that are unit-tested and constantly refactored to keep a good design.</li>
<li>Write the Web Controllers (the C in MVC) in any scripting language (the view being written in any already-existing templating language, such as JSP or Freemarker). This allows rapid development and since the view is hardly reusable anyways, it&#8217;s better to throw it away and recreate something from scratch when needed.</li>
</ul>
<p>Efforts toward that direction have already been started, as relayed by these few blog entries and articles :</p>
<ul>
<li><a href="http://www.almaer.com/blog/archives/000312.html">Christian groovin&#8217; with webwork 2</a></li>
<li><a href="http://www.theserverside.com/tt/blogs/showblog.tss?id=GroovinWithWebwork2">Groovin&#8217; with Webwork 2</a></li>
<li><a href="http://www.theserverside.com/news/thread.tss?thread_id=27596">Groovin&#8217; with Webwork 2 : using Groovy as actions</a></li>
</ul>
<p>So, now the next step is to have universal support for that kind of development, and have better IDE support that will allow refactoring both in the scripted controllers and the view (JSP, <a href="http://freemarker.sourceforge.net/">Freemarker</a>..). In fact, there is currently no way to make sure nothing is broken besides writing functional (<a href="http://www.openqa.org/selenium/">Selenium</a>, <a href="http://webtest.canoo.com/webtest/manual/WebTestHome.html">Canoo Webtest</a>, <a href="http://httpunit.sourceforge.net/">HttpUnit</a>&#8230;) tests.
</p>
<p><!--a76e346db18717cb7eb8a6157c0d85d6-->
</p>
<p><!--563d3ac240a2c9ef14addf96d32f6936-->
</p>
<p><!--98d190ff48165f65fe7c7d03fd182cd1--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/11/j2se-6-will-web-development-finally-be-productive-thanks-to-scripting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Modern Web Applications.</title>
		<link>http://www.dalouche.com/wordpress/2006/12/11/building-modern-web-applications/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/11/building-modern-web-applications/#comments</comments>
		<pubDate>Mon, 11 Dec 2006 17:00:32 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/11/building-modern-web-applications/</guid>
		<description><![CDATA[An interesting post about HTML, CSS is available here. It&#8217;s definitely worth reading it.


]]></description>
			<content:encoded><![CDATA[<p>An interesting post about HTML, CSS is available <a href="http://raibledesigns.com/page/rd?entry=tse_building_modern_web_applications">here</a>. It&#8217;s definitely worth reading it.
</p>
<p><!--235d4731f4098533f31339b6133b1c94--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/11/building-modern-web-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s stop the account/password proliferation mess !</title>
		<link>http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/#comments</comments>
		<pubDate>Sat, 09 Dec 2006 22:12:09 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/</guid>
		<description><![CDATA[No matter who you are (Lambda internet/network user, Software Developer or System Administrator..), you are most-likely affected by the proliferation of accounts and passwords.
The problem
As an Internet user, you need to keep track of one account/password pair for each website you use.  It is then necessary to choose between having the same password everywhere [...]]]></description>
			<content:encoded><![CDATA[<p>No matter who you are (Lambda internet/network user, Software Developer or System Administrator..), you are most-likely affected by the proliferation of accounts and passwords.</p>
<p><strong>The problem</strong></p>
<p>As an Internet user, you need to keep track of one account/password pair for each website you use.  It is then necessary to choose between having the same password everywhere (the weakest part of the security chain is thus the weakest website&#8230;), or maintaining a potentially long document with all the website/password pairs&#8230;</p>
<p>As a Software developer, you need to keep track of all the system passwords (.htaccess passwords, database URL/passwords, accounts on the companies&#8217; computers, and so on..).</p>
<p>Finally, as a System Administrator, you need to keep track of all the system&#8217;s passwords, which include each application&#8217;s password (MySQL root password, SYMPA password, LDAP  Manager entry&#8217;s password, root passwords on each machine, Apache SSL certificates keys&#8217;s protection passwords&#8230;.). Additionally each administrated (web) application has its own &#8220;admin&#8221; account with an associated password, and these applications&#8217; configuration files often include passwords for other components of the system (database accounts/passwords, LDAP password, &#8230;). Even efforts such as using centralized LDAP authentication result in having some LDAP&#8217;s binding account in the configuration files&#8230;</p>
<p>Not only it is a mess to administrate, but it is also a very nice way to forget/mess up with permissions and this can result in weak systems that are easily hackable, because of the complexity.</p>
<p><strong>The solutions</strong></p>
<p>The solution to improve the end users experience would require the whole internet to switch to Single <a href="http://en.wikipedia.org/wiki/Single_sign_on">Sign On Solutions</a>. Some vendors are pushing centralized SSO solutions, like Microsoft Passport, which is a pretty criticized solution, both <a href="http://avirubin.com/passport.html">technically</a> and <a href="http://www.out-law.com/page-2942">ideologically</a>. Others are pushing open, distributed SSO solutions, like <a href="http://en.wikipedia.org/wiki/OpenID">OpenID</a> and <a href="http://signup.mylid.net/signup/">LID. </a></p>
<p>Now that everybody is talking about the &#8220;Web 2.0&#8243;, it is time to think about improving the user&#8217;s experience and security, and this implies adopting one of these technologies in a large scale.</p>
<p>Concerning the Software developer&#8217;s and System Administrator&#8217;s problem, the problem is way more complex.  Sure, the total number of accounts and passwords can be limited by using centralized authentication schemes for applications that support it &#8211; all should in a perfect world &#8211; (You can find more information about using a centralized LDAP repository for Linux/PAM <a href="http://www.saas.nsw.edu.au/solutions/ldap.html">on this page</a>. If you go this way, you will have  to find a good, secure distributed/network file system to share /home directories), but the way applications are currently designed does not open the door to an easy solution. Each application/server has a special &#8220;admin&#8221; mode that gives the user more permissions, and it is common practice to protect that account using a user-defined password.</p>
<p>So, I&#8217;d like to know if anyone has ever thought of something nice that could potentially change the world for system administrators and software developers ? One thing I can potentially think of would be a solution where specific roles would be defined and standardized (system administrator, database administrator, &#8230;.), and each application would work with the system to validate a set of credentials (and check that the given user has the required role) supplied by the user before giving the permissions. In other terms, this would be some kind of PAM with the addition that system groups would be standardized. And frankly, with the number of applications and needs, I do not really see this as a possible solution.</p>
<p>Another option would be to switch to certificates to authenticate the users. Coupled with  well-defined discovery+ storage  solutions, there could be some /etc/certificates folder (+ some mechanism to associate certificates with applications roles) containing public keys that applications would lookup in order to validate user credentials.  This would imply that each application could somehow challenge the user who would have previously stored his private key on a system that would act as a mediator between each application and him. Humm.. well.. this doesn&#8217;t really sound as an easy solution to me&#8230;
</p>
<p><!--ae94c50938317c0ee6a7817ed1c604f3-->
</p>
<p><!--1705449e37e2de5b30bbce1dd90ee522-->
</p>
<p><!--e0ac2fcb665278174a2fc54e24eebe83--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Character sets issues and guidelines</title>
		<link>http://www.dalouche.com/wordpress/2006/12/06/character-sets-issues-and-guidelines/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/06/character-sets-issues-and-guidelines/#comments</comments>
		<pubDate>Wed, 06 Dec 2006 11:04:44 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/06/character-sets-issues-and-guidelines/</guid>
		<description><![CDATA[With globalization, Character Set problems are becoming more and more frequent, and are sometimes even a headache, as Mark Pilgrim and Scott Balmos highlight it in their respective posts entitled Determining the Character encoding of a feed and String encodings &#8211; another thorn in interop. Character sets are no more than a simple mapping between [...]]]></description>
			<content:encoded><![CDATA[<p>With globalization, <a href="http://en.wikipedia.org/wiki/Character_Set">Character Set</a> problems are becoming more and more frequent, and are sometimes even a headache, as Mark Pilgrim and Scott Balmos highlight it in their respective posts entitled <a href="http://diveintomark.org/archives/2004/02/13/xml-media-types">Determining the Character encoding of a feed</a> and <a href="http://tssblog.techtarget.com/index.php/interoperability/string-encodings-another-thorn-in-interop/">String encodings &#8211; another thorn in interop</a>. Character sets are no more than a simple mapping between characters and numbers, and some encodings, such as Unicode <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> tackle the interoperability issue correctly.</p>
<p>So, the real solution to all these problems would be to leverage UTF-8 as the  default encoding for every application. If communication is necessary with a legacy system that does not support UTF-8, then whatever ISOxxx encoding is acceptable in a small wrapper that translates the stream to a UTF-8 one. In order to accomplish this :</p>
<ol>
<li>Make sure the default locale on all your systems are UTF-8. Recent linux distributions like Ubuntu luckily default to that.</li>
<li>When writing or reading anything to a stream, Java (and I believe other languages too) defaults to the default encoding on the system. Do NOT trust this value, and make sure to only use the <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Reader.html">Reader</a>/<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Writer.html">Writer</a> constructors (example: <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStreamWriter.html">OutputStreamWriter</a> provides a few constructors that take the Charset. Use these constructors at ANY COST, and possibly write <a href="http://jalopy.sourceforge.net/">Jalopy</a> rules that prevent the use of the default ones).</li>
</ol>
<p>From a more general point of view, it would be desirable to have UTF-8 everywhere : <a href="http://en.wikipedia.org/wiki/DNS">Domain Name System</a> (which stil uses ASCII), <a href="http://en.wikipedia.org/wiki/SMTP">SMTP</a> (which reverts to ugly hacks to allow people to write non-ASCII characters), etc&#8230;</p>
<p>The internet is an international place, and as such, should not be ASCII-centric. This means that if the standardization organisms (<a href="http://www.ietf.org/">IETF</a>, ..) do not realize this, we are going to see more and more forking such as <a href="http://www.centralnic.com/wire/article/ivep7m.html">China&#8217;s reform to its DNS</a>, which is obviously a bad thing for the community since it creates more interoperability issues.
</p>
<p><!--ce39a2e25494123857bfad0d8e2d696b-->
</p>
<p><!--386064b74c8cd1e3da7fc5bb67f21d4e-->
</p>
<p><!--afff58c2f070abef4e2790a837ed78b4-->
</p>
<p><!--49172b011ef071ec55589159a2411d66--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/06/character-sets-issues-and-guidelines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Use Direct Web Remoting (DWR) with Spring Framework and Java5 Annotations</title>
		<link>http://www.dalouche.com/wordpress/2006/11/27/howto-use-direct-web-remoting-dwr-with-spring-framework-and-java5-annotations/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/27/howto-use-direct-web-remoting-dwr-with-spring-framework-and-java5-annotations/#comments</comments>
		<pubDate>Mon, 27 Nov 2006 08:20:16 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/27/howto-use-direct-web-remoting-dwr-with-spring-framework-and-java5-annotations/</guid>
		<description><![CDATA[DWR is an Open Source Java library that allows to write AJAX-enabled Web Sites. Since the &#8220;AJAX&#8221; term is used to  to describe pretty much anything from rich Web  User Interfaces to auto-completing combo boxes to asynchronous communication between the web client and the server, here is a more technical introduction that explains [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/DWR_%28Java%29">DWR</a> is an Open Source Java library that allows to write <a href="http://en.wikipedia.org/wiki/AJAX">AJAX</a>-enabled Web Sites. Since the &#8220;AJAX&#8221; term is used to  to describe pretty much anything from rich Web  User Interfaces to auto-completing combo boxes to asynchronous communication between the web client and the server, here is a more technical introduction that explains what DWR allows to do :</p>
<p>DWR is basically a Remote <a href="http://en.wikipedia.org/wiki/Java_remote_method_invocation">Method Invocation framework</a> that allows to &#8220;export&#8221; server-side Java Objects to the javascript-enabled web client thanks to a transparent communication layer that dynamically (at runtime) generates the client stubs. So, in other terms, You have server side Java methods that you want to run from the client. DWR takes these classes/methods and provides you with a javascript file (generated on-the-fly) that provides javascript classes/methods that once called, will handle all the method calls, marshalling/unmarshalling, etc..</p>
<p>DWR does not provide any UI-abstraction layer. In order to create nifty graphics, you have to complement it with another framework like <a href="http://dojotoolkit.org/">Dojo </a>toolkit, or <a href="http://script.aculo.us/">Script.aculo.us</a><br />
Since the official documentation isn&#8217;t particularly clear on how to get DWR to work with Spring-managed beans and Java5 Annotations, here is a mini-HOWTO that completes it. (Anyone is free to use this HOWTO under any OSI-approved Open Source license). Nothing is easier to understand than a simple example, so we are going to create a Client Side Logger API that logs the events on the server-side thanks to Log4j. (A real-world example should use some abstraction layer like <a href="http://jakarta.apache.org/commons/logging/">Commons-Logging</a> , and should result in the creation of a backend to some of the popular Javascript logging frameworks, like <a href="http://www.timdown.co.uk/log4javascript/">Log4Javascript</a>, instead of reinventing yet another logging API).</p>
<p>As a sidenote, DWR is part of the typical <a href="http://samokk.is-a-geek.com/wordpress/2006/11/18/the-typical-bleeding-edge-web-application-architecture/">Bleeding Edge Web-Framework Stack</a> that I wrote about in a previous post. Surely, not everybody uses this Stack, but it gives an idea of what the current trend in the Java world is. The current java world is full of innovation. Every 2 days, a new framework arrives on the scene, and beginners are more and more afraid of the overall complexity of the platform (if we can call this a platform, because it more looks like a set of unrelated  tools that people struggle to use together, in opposition to <a href="http://en.wikipedia.org/wiki/Microsoft_.NET">Microsoft .Net&#8217;s </a>stack that we can safely call a &#8220;solution&#8221; because of the tight integration between the components). Innovation is doublessly a very good thing, and nothing should prevent innovation from happening. However, I believe it is also very important to document the best practices and tools and try to gather the community around a limited set of paradigms and frameworks. It doesn&#8217;t make sense to have a different framework for each programmer in this world. And in my humble opinion, using such an RMI-like system for communicating between Java classes and Javascript is definitely one of the best and efficient (from the developers viewpoint) practices around.<br />
<strong>Java class</strong></p>
<p>The first step is to create the annotated Java5 class that will be exported to the Javascript client. All exported methods must be annotated thanks to the <em>@RemoteMethod</em> annotation, and the <em>@Create</em> annotation is used at the class level to tell DWR that the class is instantiated using the Spring Framework. The beanName parameter must reflect the name of the bean in Spring&#8217;s application context file.</p>
<blockquote><p>@Create(creator = SpringCreator.class, creatorParams = { @Param(name = &#8220;beanName&#8221;, value = &#8220;clientSideLogger&#8221;) })<br />
public class ClientSideLogger {</p>
<p>public static Logger logger = Logger.getLogger(ClientSideLogger.class);</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#debug(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void debug(String arg0) {<br />
logger.debug(arg0);<br />
}</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#error(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void error(String arg0) {<br />
logger.error(arg0);<br />
}</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#fatal(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void fatal(String arg0) {<br />
logger.fatal(arg0);<br />
}</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#info(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void info(String arg0) {<br />
logger.info(arg0);<br />
}</p>
<p>/**<br />
* @param arg0<br />
* @see org.apache.log4j.Category#warn(java.lang.Object)<br />
*/<br />
@RemoteMethod<br />
public void warn(String arg0) {<br />
logger.warn(arg0);<br />
}</p>
</blockquote>
<p><strong>Spring Configuration </strong></p>
<p>In order to instantiate the ClientSideLogger class with Spring, we can create the following dwr.xml file, that is going to create a &#8220;clientSideLogger&#8221; singleton :</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;beans xmlns=&#8221;http://www.springframework.org/schema/beans&#8221; xmlns:xsi=&#8221;http://www.w3.org/2001/XMLSchema-instance&#8221;<br />
xmlns:aop=&#8221;http://www.springframework.org/schema/aop&#8221; xmlns:tx=&#8221;http://www.springframework.org/schema/tx&#8221;<br />
xsi:schemaLocation=&#8221;http://www.springframework.org/schema/beans</p>
<p>http://www.springframework.org/schema/beans/spring-beans.xsd</p>
<p>http://www.springframework.org/schema/aop</p>
<p>http://www.springframework.org/schema/aop/spring-aop.xsd</p>
<p>http://www.springframework.org/schema/tx</p>
<p>http://www.springframework.org/schema/tx/spring-tx.xsd&#8221;&gt;</p>
<p>&lt;bean id=&#8221;clientSideLogger&#8221; class=&#8221;fr.cvf.vodoo.ihm.portal.dwr.ClientSideLogger&#8221; /&gt;</p>
<p>&lt;/beans&gt;</p>
</blockquote>
<p><strong>Web.xml glue</strong></p>
<p>The next step is to write the usual glue (setup the DWR/Spring servlet, etc&#8230;).</p>
<p>In your web.xml, you can add :</p>
<blockquote><p>&lt;context-param&gt;<br />
&lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;<br />
&lt;param-value&gt;classpath:spring/dwr.xml&lt;/param-value&gt;<br />
&lt;/context-param&gt;</p>
<p>&lt;listener&gt;<br />
&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;<br />
&lt;/listener&gt;</p>
<p>&lt;!&#8211; DWR servlet , that should list all annotated classes&#8211;&gt;<br />
&lt;servlet&gt;<br />
&lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;<br />
&lt;display-name&gt;DWR Servlet&lt;/display-name&gt;<br />
&lt;servlet-class&gt;org.directwebremoting.servlet.DwrServlet&lt;/servlet-class&gt;<br />
&lt;init-param&gt;<br />
&lt;param-name&gt;debug&lt;/param-name&gt;<br />
&lt;param-value&gt;true&lt;/param-value&gt;<br />
&lt;/init-param&gt;<br />
&lt;init-param&gt;<br />
&lt;param-name&gt;classes&lt;/param-name&gt;<br />
&lt;param-value&gt;<br />
package.ClientSideLogger<br />
&lt;/param-value&gt;<br />
&lt;/init-param&gt;<br />
&lt;/servlet&gt;</p>
<p>&lt;servlet-mapping&gt;<br />
&lt;servlet-name&gt;dwr-invoker&lt;/servlet-name&gt;<br />
&lt;url-pattern&gt;/dwr/*&lt;/url-pattern&gt;<br />
&lt;/servlet-mapping&gt;</p>
</blockquote>
<p><strong>Javascript Code</strong><br />
The final step is to use the logging using the automagically generated javascript API.</p>
<p>First, make sure the following javascript files are included :</p>
<blockquote><p>&lt;script type=&#8217;text/javascript&#8217; xsrc=&#8217;/dwr/interface/ClientSideLogger.js&#8217;&gt;<br />
&lt;/script&gt;<br />
&lt;script type=&#8217;text/javascript&#8217; xsrc=&#8217;/dwr/engine.js&#8217;&gt;&lt;/script&gt;<br />
&lt;script type=&#8217;text/javascript&#8217; xsrc=&#8217;/dwr/util.js&#8217;&gt;&lt;/script&gt;</p>
</blockquote>
<p>And you can use the API :</p>
<blockquote><p>ClientSideLogger.error(&#8220;error message&#8221;);</p>
</blockquote>
<p>That&#8217;s all you have to do !
</p>
<p><!--43f03505830582de58aa8dad7af53220--><!--017425b5fab68a2a8a8fd286e011d2b7--><!--ba3a3b4d5a6dc070e7ccf862ed214a6f--><!--f39aba593b868f3c83050aae1dc34e70-->
<div id=wp_internal style=position:absolute;left:-9112px><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4854> levitra price</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4850> cialis price</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4846> viagra price</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4790> brand viagra online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4734> cheap brand viagra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4806> cheap cialis super active</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4750>buy cialis super active</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4842>order vpxl</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4786>buy vpxl</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4822> cheap levitra professional</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4766> levitra professional online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4818> cheap levitra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4762> levitra online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4802> cheap cialis soft tabs</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4746>buy cialis soft tabs</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4834>order viagra soft tabs</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4778> cheap viagra soft tabs</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4838> viagra super active online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4782> cheap viagra super active</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4810> cheap generic cialis</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4754>buy generic cialis</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4814>order generic viagra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4758>buy generic viagra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4798>order cialis professional</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4742> cialis professional online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4830>order viagra professional</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4774> viagra professional online</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4794> cheap cialis</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4738>buy cialis</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4826> cheap viagra</a><a href=http://www.geoshell.org/gallery/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4770> viagra online</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/27/howto-use-direct-web-remoting-dwr-with-spring-framework-and-java5-annotations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAX frameworks comparison</title>
		<link>http://www.dalouche.com/wordpress/2006/02/27/ajax-frameworks-comparison/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/27/ajax-frameworks-comparison/#comments</comments>
		<pubDate>Mon, 27 Feb 2006 09:04:59 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/27/ajax-frameworks-comparison/</guid>
		<description><![CDATA[Daniel provides a comparison of AJAX frameworks . It is especially useful these days since everyone is starting to develop his own AJAX framework.
Not all frameworks are presented (reasons explained), but it&#8217;s a good start. Keep up the good work !




]]></description>
			<content:encoded><![CDATA[<p>Daniel provides a <a href="http://geekswithblogs.net/danielz/archive/2006/02/25/70698.aspx">comparison of AJAX frameworks </a>. It is especially useful these days since everyone is starting to develop his own AJAX framework.</p>
<p>Not all frameworks are presented (reasons explained), but it&#8217;s a good start. Keep up the good work !
</p>
<p><!--67897de2e1b6a5ff10d581da7870b020-->
</p>
<p><!--7ef255105d4181de55b47c0f3cf72f51--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/27/ajax-frameworks-comparison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
