Monthly Archives: July 2006
Links: 7-28-2006
Links: 7-27-2006
- Deliwin – A del.icio.us bookmark manager client
Stores all your del.icio.us bookmarks in the system tray, pretty cool way to see the tags you’re using.
(categories: bookmarks del.icio.us free software )
Links: 7-26-2006
- visualcomplexity.com | A visual exploration on mapping complex networks
Graph / infoviz p0rn. I could look at these all day long.
(categories: art data information infoviz mapping maps stats visualization wow )
Links: 7-25-2006
- digg labs
Stamen Designs visualizations for digg.com go live, the swarm example is a force directed graph (http://en.wikipedia.org/wiki/Force-based_layout)
(categories: digg graphing infoviz visualization )
FluentInterface
A couple of weeks ago on the DWR users list, in the context of needing to wire up DWR without using an XML file, Joe Walker pointed to a blog posting by Martin Fowler. In it, Martin discusses an interface style called a ‘fluent interface’. It’s a little difficult to describe in words (so check it out in action on above mentioned blog post) but I think Piers Cawley described it best when he described the style as “…essentially interfaces that do a good job of removing hoopage.” Update: Geert Bevin uses this style in the RIFE framework and was calling the it “chainable builder methods” before Martin came along with the ‘fluent interface’ term.
Back to DWR. I spent the last couple days working on a ‘fluent’ way of configuring DWR which obviously then wouldn’t require dwr.xml, the result of which is available here. In short, given an XML configuration file that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting
1.0//EN" "http://www.getahead.ltd.uk/dwr/dwr10.dtd">
<dwr>
<init>
<converter id="testbean" class="uk.ltd.getahead.testdwr.TestBean2Converter"/>
</init>
<allow>
<create creator="new" javascript="Test" scope="application">
<param name="class" value="uk.ltd.getahead.testdwr.Test"/>
</create>
<create creator="new" javascript="JDate">
<param name="class" value="java.util.Date"/>
<exclude method="getHours"/>
<auth method="getMinutes" role="admin"/>
<auth method="getMinutes" role="devel"/>
</create>
<convert converter="bean" match="$Proxy*"/>
<convert converter="testbean" match="uk.ltd.getahead.testdwr.TestBean"/>
<convert converter="bean" match="uk.ltd.getahead.testdwr.ObjB"/>
<convert converter="object" match="uk.ltd.getahead.testdwr.ObjA">
<param name="force" value="true"/>
</convert>
</allow>
<signatures>
<![CDATA[
import java.util.*;
import uk.ltd.getahead.testdwr.*;
Test.testBeanSetParam(Set<TestBean>);
Test.testBeanListParam(List<TestBean>);
Test.charTestBeanMapParam(Map<Character, TestBean>);
Test.stringStringMapParam(Map<String, String>);
Test.stringStringHashMapParam(HashMap<String, String>);
Test.stringStringTreeMapParam(TreeMap<String, String>);
Test.stringCollectionParam(Collection<String>);
Test.stringListParam(List<String>);
Test.stringLinkedListParam(LinkedList<String>);
Test.stringArrayListParam(ArrayList<String>);
Test.stringSetParam(Set<String>);
Test.stringHashSetParam(HashSet<String>);
Test.stringTreeSetParam(TreeSet<String>);
]]>
</signatures>
</dwr>
you can instead configure DWR using the FluentConfiguration class like this:
FluentConfiguration fluentconfig = (FluentConfiguration)configuration;
fluentconfig
.withConverterType("testbean", "uk.ltd.getahead.testdwr.TestBean2Converter")
.withCreator("new", "Test")
.addParam("scope", "application")
.addParam("class", "uk.ltd.getahead.testdwr.Test")
.withCreator("new", "JDate")
.addParam("class", "java.util.Date")
.exclude("getHours")
.withAuth("getMinutes", "admin")
.withAuth("getMinutes", "devel")
.withConverter("bean", "$Proxy*")
.withConverter("testbean", "uk.ltd.getahead.testdwr.TestBean")
.withConverter("bean", "uk.ltd.getahead.testdwr.ObjB")
.withConverter("object", "uk.ltd.getahead.testdwr.ObjA")
.addParam("force", "true")
.withSignature()
.addLine("import java.util.*;")
.addLine("import uk.ltd.getahead.testdwr.*;")
.addLine("Test.testBeanSetParam(Set);")
.addLine("Test.testBeanListParam(List);")
.addLine("Test.charTestBeanMapParam(Map);")
.addLine("Test.stringStringMapParam(Map);")
.addLine("Test.stringStringHashMapParam(HashMap);")
.addLine("Test.stringStringTreeMapParam(TreeMap);")
.addLine("Test.stringCollectionParam(Collection);")
.addLine("Test.stringListParam(List);")
.addLine("Test.stringLinkedListParam(LinkedList);")
.addLine("Test.stringArrayListParam(ArrayList);")
.addLine("Test.stringSetParam(Set);")
.addLine("Test.stringHashSetParam(HashSet);")
.addLine("Test.stringTreeSetParam(TreeSet);")
.finished();
If you’re interested in using this in your DWR project, you need only to:
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>net.cephas.dwr.FluentDWRServlet</servlet-class>
<init-param>
<param-name>uk.ltd.getahead.dwr.Configuration</param-name>
<param-value>net.cephas.dwr.FluentConfiguration</param-value>
</init-param>
<init-param>
<param-name>skipDefaultConfig</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
Send me an email if you have any questions!
Links: 7-17-2006
- MSDN Wiki Home Page
MSFT integrating community contributions into Microsoft content via a wiki.
(categories: for:barrytallis microsoft msdn wiki ) - ONLamp.com — Rethinking Community Documentation
… in our day and age, *connections* with other people have taken precedence over book publishing.
(categories: community documentation for:barrytallis opensource oreilly wiki )
Links: 7-12-2006
Links: 7-10-2006
- Slope One – Wikipedia, the free encyclopedia
(categories: collaborative_filtering recommendations toread ) - deviantART: Death and Taxes: … by *mibi
Great infoviz of the 2004 US Federal Discretionary Budget
(categories: government information infoviz military stats taxes visualization )
Links: 7-5-2006
- Put off Firefox 1.5’s “Unresponsive script” dialogue – Lifehacker
Apply the change mentioned on the page if you get these annoying messages from Firefox.
(categories: browser firefox hacks )