<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Wayne Graham&apos;s Blog - Web</title>
			<link>http://swem.wm.edu/blogs/waynegraham/index.cfm</link>
			<description>ColdFusion Development for Academic Libraries</description>
			<language>en-us</language>
			<pubDate>Sun, 22 Nov 2009 17:40:47 -0500</pubDate>
			<lastBuildDate>Wed, 07 Mar 2007 08:24:00 -0500</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>wsgrah@wm.edu</managingEditor>
			<webMaster>wsgrah@wm.edu</webMaster>
			
			
			
			
			
			<item>
				<title>Adding COinS for BlogCFC</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2007/3/7/Adding-COinS-for-BlogCFC</link>
				<description>
				
				A few months ago, I was up at George Mason&apos;s &lt;a href=&quot;http://chnm.gmu.edu/&quot;&gt;Center for History and New Media&lt;/a&gt; talking to them about how they were approaching their online projects. One of the things they introduced me to was &lt;a href=&quot;http://www.zotero.org/&quot;&gt;Zotero&lt;/a&gt;, a Firefox extension to &quot;collect, manage, and cite your research sources.&quot; While it was mostly developed to help researchers manage citations online, I started using it to start organize blog entries, adding my own notes, tags, and relating them to other blog entries. 

Unfortunately, I&apos;ve been adding these pages manually. And, with about two lines of code, you can add meta-data to not only open your entries in BlogCFC up to Zotero, but other harvesters. 

First, a quick note about COinS.
 
&lt;more /&gt;

&lt;a href=&quot;http://ocoins.info/&quot;&gt;COinS&lt;/a&gt; is an acronymn for ContextObjects in Spans), it&apos;s basically a micro-format for embedding bibliographic information in HTML for the &lt;a href=&quot;http://www.niso.org/standards/standard_detail.cfm?std_id=783&quot;&gt;NISO OpenURL Standard Z39.88-2004&lt;/a&gt;. What makes this really nice is that you no longer have to hunt down how to cite information for your specific format (Chicago, APA, etc.), the information is embedded in the HTML and software then properly formats the citations for you. 

A blog entry is a reasonably straight-forward citation. You want the URL, title of the entry, the author, and date. So, to add to BlogCFC, open the index.cfm page and where the loop for the categories is located (around line 82), simply add a new String of the categories:

&lt;code&gt;
	&lt;cfloop item=&quot;catid&quot; collection=&quot;#categories#&quot;&gt;
		&lt;!--- added line ---&gt;
		&lt;cfset cats = cats &amp; &quot;&amp;amp;rft.subject=&quot; &amp; #categories[currentRow][catid]# /&gt;
		
		&lt;cfoutput&gt;&lt;a href=&quot;#application.blog.makeCategoryLink(catid)#&quot;&gt;#categories[currentRow][catid]#&lt;/a&gt;&lt;cfif catid is not lastid&gt;,&lt;/cfif&gt;&lt;/cfoutput&gt;
	&lt;/cfloop&gt;
&lt;/code&gt;

Now, you just need to add the span. I added mine directly under the close of the above loop. 

&lt;code&gt;
&lt;cfoutput&gt;
	&lt;span class=&quot;Z3988&quot; title=&quot;&quot;ctx_ver=Z39.88-2004&amp;amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;amp;rft.title=#replace(title, &quot; &quot;, &quot;+&quot;, &quot;ALL&quot;)##cats#&amp;amp;rft.creator=#application.blog.getProperty(&quot;owneremail&quot;)#&amp;amp;rft.date=#dateFormat(posted, &quot;yyyy-mm-dd&quot;)#&amp;amp;rft.type=blogPost&amp;amp;rft.format=text&amp;amp;rft.identifier=#application.blog.makeLink(id)#&amp;amp;rft.source=#application.blog.getProperty(&quot;blogDescription&quot;)#&amp;amp;rft.language=English&quot;&gt;&lt;/span&gt;
&lt;/cfoutput&gt;
&lt;/code&gt;

You&apos;ll notice there&apos;s nothing in the span, so it doesn&apos;t actually display on the screen, but is there for OpenURL aware programs like Zotero. If you refresh your cache, you&apos;ll then see a button in the address bar (assuming Zotero is installed) that will then add the blog entry to your collection.

Not using BlogCFC? There&apos;s &lt;a href=&quot;http://dev.zotero.org/docs/wordpress?s=wordpress&quot;&gt;a few WordPress plugins&lt;/a&gt; too, though I&apos;ve not seen anything for Blogger yet.
				
				</description>
						
				
				<category>Blog</category>				
				
				<category>Web</category>				
				
				<category>ColdFusion</category>				
				
				<pubDate>Wed, 07 Mar 2007 08:24:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2007/3/7/Adding-COinS-for-BlogCFC</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Form Validation</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/9/21/Form-Validation</link>
				<description>
				
				I&apos;ve been playing with some form validation stuff for CF. I had been usign &lt;cfform&gt;, but I wanted the HTML interface to act a bit more like the Flash interface, but I don&apos;t really want to use Flash. I&apos;ve also been doing a lot more work with some of the DHTML libraries that AJAX has made popular, so I figured there had to be a relatively elegent way to do form validations with something like &lt;a href=&quot;http://prototype.conio.net/&gt;prototype&lt;/a&gt;.

I remembered seeing something on &lt;a href=&quot;http://ajaxian.com/archives/really-easy-field-validation-with-prototype&quot;&gt;Ajaxian&lt;/a&gt; about easy form validation and decided to give it a try. The article on &lt;a href=&quot;http://tetlaw.id.au/view/blog/really-easy-field-validation-with-prototype/&quot;&gt;Dexagogo&lt;/a&gt; shows how they created a library to handle form-validations that doesn&apos;t require any other work than creating a form. This was just what I was looking for!

Basically, you just need the latest files from &lt;a href=&quot;http://script.aculo.us/&quot;&gt;script.aclo.us&lt;/a&gt; with the latest prototype version (the 1.5 release candidate is included in the latest script.aculo.us lib folder), and the validation library. Convienently, they&apos;re all included &lt;a href=&quot;http://tetlaw.id.au/upload/dev/validation/validation1.5.3.zip&quot;&gt;in the demo file on the site&lt;/a&gt;.

&lt;more /&gt;

To use this, you really only need prototype and the validation library (script.aculo.us adds a nice effect &amp;ndash; much like the Flash format in cfform). For me, I made these calls:

&lt;code&gt;
&lt;head&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;/scripts/scriptaculous/lib/prototype.js&quot;&gt;&lt;/script&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;/scripts/validator.js&quot;&gt;&lt;/script&gt;
	&lt;script type=&quot;text/javascript&quot; src=&quot;/scripts/scriptaculous/scriptaculous.js?load=effects&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;/code&gt;

This is slightly different than the example on their page; they load the effects.js file directly, I&apos;m calling the library via script.aculo.us with the load parameter. This isn&apos;t really a big deal for one library, but it is convenient when you want to use several, but not all, of the libraries (e.g. scriptaculous.js?load=effects,dragdrop,slider).

Anyway, to actually use this, you need to create a form with an id attribute:

&lt;code&gt;
&lt;form name=&quot;feedback&quot; id=&quot;feedback&quot; action=&quot;#cgi.script_name#&quot; method=&quot;post&quot;&gt;
...
&lt;/form&gt;
&lt;/code&gt;

Now, we add some fields and use the class attribute to call the validator:

&lt;code&gt;
Name: &lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot; class=&quot;required&quot; /&gt;&lt;br/&gt;
Email: &lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; class=&quot;required validate-email&quot; /&gt;
&lt;input type=&quot;submit&quot; /&gt;
&lt;/code&gt;

There are 11 options for use in the validation library (this is directly off their page):

&lt;ul&gt;
	&lt;li&gt;required (not blank)&lt;/li&gt;
	&lt;li&gt;validate-number (a valid number)&lt;/li&gt;
	&lt;li&gt;validate-digits (digits only)&lt;/li&gt;
	&lt;li&gt;validate-alpha (letters only)&lt;/li&gt;
	&lt;li&gt;validate-alphanum (only letters and numbers)&lt;/li&gt;
	&lt;li&gt;validate-date (a valid date value)&lt;/li&gt;
	&lt;li&gt;validate-email (a valid email address)&lt;/li&gt;
	&lt;li&gt;validate-url (a valid URL)&lt;/li&gt;
	&lt;li&gt;validate-date-au (a date formatted as; dd/mm/yyyy)&lt;/li&gt;
	&lt;li&gt;validate-currency-dollar (a valid dollar value)&lt;/li&gt;
	&lt;li&gt;validate-one-required (At least one textbox/radio element must be selected in a group)&lt;/li&gt;
&lt;/ul&gt;

This is really nice, because if you want to allow an optional field, but validate it, you can do:

&lt;code&gt;
&lt;input type=&quot;text&quot; name=&quot;email&quot; class=&quot;validate-email&quot; /&gt;
&lt;/code&gt;

There&apos;s one more piece of the pie...to call the validation library. At the bottom of your page add:

&lt;code&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
	new Validation(&apos;feedback&apos;, {immediate:true});
&lt;/script&gt;
&lt;/code&gt;

The first argument is the id attribute of the form you&apos;re wanting to validate. The second tells the Validator object what to do. This particular example enables validation on each field as you leave it (which I find useful). Some of the other options are:

&lt;ul&gt;
	&lt;li&gt;stopOnFirst (boolean): Stop on the first validation failure; default: false&lt;/li&gt;
	&lt;li&gt;onSubmit (boolean): Override the default behavior of adding an even listener to the onsubmit event (set to false if you want to make sure your onsubmit method gets called no matter what); default: true&lt;/li&gt;
	&lt;li&gt;immediate (boolean): validate when the cursor leaves the field; default: false&lt;/li&gt;
	&lt;li&gt;focusOnError (boolean): place the focus on the first field with an error; default: true&lt;/li&gt;
	&lt;li&gt;useTitles (boolean): make field validators use form element title attributes as error advice message; default: false&lt;/li&gt;
	&lt;li&gt;onFormValidate (string function): call a function when the form is validated&lt;/li&gt;
	&lt;li&gt;onElementValidate (string function): call a function when an element is validated&lt;/li&gt;
&lt;/ul&gt;

What I thought was really cool was the ability to add custom validation types via an API. Say you only want folks to use capital letters for their names, you simply add a new validation type like:

&lt;code&gt;
&lt;script type=&quot;javascript&quot;&gt;
	Validation.add(&apos;validate-ucase&apos;, &apos;Please only use upper-case letters (A-Z) in this field.&apos;, function(v){
		return Validation.get(&apos;IsEmpty&apos;).test(v) || /^[A-Z]+$/.test(v);
	}
&lt;/script&gt;
&lt;/code&gt;

Want to add several? You can do that too:

&lt;code&gt;
&lt;script type=&quot;javascript&quot;&gt;
	Validation.addAllThese([
		[&apos;validate-lcase&apos;, &apos;Please only use lower-case (a-z) letters in this field&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^[a-z]+$/.test(v);
		}],
		[&apos;validate-zip&apos;, &apos;Please check your zip code&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^(\d{5})(( |-)?(\d{4}))?$/.test(v);
		}],
		[&apos;validate-phone&apos;, &apos;Please check your phone number&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^(([0-9]{3}-)|\([0-9]{3}\) ?)?[0-9]{3}-[0-9]{4}$/.test(v);
		}],
		[&apos;validate-ssn&apos;, &apos;Please check the Social Security Number. It should follow the format 999-99-9999&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^([0-9]{3}(-?)[0-9]{2}(-?)[0-9]{4})$/.test(v);
		}],
		[&apos;validate-ip&apos;, &apos;Please check the IP address&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/.test(v);
		}], 
		[&apos;validate-uuid&apos;, &apos;Please check the UUID&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{16}$/.test(v);
		}],
		[&apos;validate-guid&apos;, &apos;Please check the GUID&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^[0-9a-f]{8,8}-[0-9a-f]{4,4}-[0-9a-f]{4,4}-[0-9a-f]{4,4}-[0-9a-f]{12,12}]$/.test(v);
		}],
		[&apos;validate-float&apos;, &apos;Please only use floating point numbers in this field&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^(\b[0-9]+\.([0-9]+\b)?|\.[0-9]+\b)$/.test(v);
		}],
		[&apos;validate-visa&apos;, &apos;Please check your credit card number&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/.test(v);
		}],
		[&apos;validate-mastercard&apos;, &apos;Please check your credit card number&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/.test(v);
		}],
		[&apos;validate-discovery&apos;, &apos;Please check your credit card number&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^6011-?\d{4}-?\d{4}-?\d{4}$/.test(v);
		}],
		[&apos;validate-amex&apos;, &apos;Please check your credit card number&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^3[4,7]\d{13}$/.test(v);
		}],
		[&apos;validate-diners&apos;, &apos;Please check your credit card number&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^3[0,6,8]\d{12}$/.test(v);
		}],
		[&apos;validate-time&apos;, &apos;Please only use time in this field&apos;, function(v){
			return Validation.get(&apos;IsEmpty&apos;).test(v) || /^\d{1,2}[:]\d{2}([:]\d{2})?( [aApP][mM]?)?$/.test(v);
		}]
]);
&lt;/script&gt;
&lt;/code&gt;

This should be all of the normal items included in &lt;cfform&gt; (plus a couple extra for good measure). Now the only thing left is to make it look pretty. One of the nice things about the Flash format in &lt;cfform&gt; is that it color codes required fields with the different halo effects. To obtain a similar effect in the forms, we&apos;ll use style sheets instead.

This is a rather light stylesheet, but it&apos;ll give you something to start with (based on the default haloGreen skin):
 
 &lt;code&gt;
 input.required, textarea.required {
	border: 1px solid #ffbf2b;
 }
 input.validation-failed, textarea.validation-failed{
	border: 1px solid #ff3300;
	color: #ff3300;
 }
 input.validation-passed, textarea.validation-passed{
	border: 1px solid #00cc00;
	color: #000;
 }
 .validation-advice {
	margin: 5px 0;
	padding: 5px;
	background-color: #FF3300;
	color: #fff;
	font-weight: bold;
}
.custom-advice {
	margin: 5px 0;
	padding: 5px;
	background-color: #c8aa00;
	color: #fff;
	font-weight:bold;
}
&lt;/code&gt;
 
I made a short example of some of the validations at &lt;a href=&quot;http://swem.wm.edu/blogs/waynegraham/examples/validation/&quot;&gt;http://swem.wm.edu/blogs/waynegraham/examples/validation/&lt;/a&gt;. I have to say that I&apos;ve found this to be a bit better solution (at least for my needs) than using &lt;cfform&gt;!
				
				</description>
						
				
				<category>JavaScript</category>				
				
				<category>Web</category>				
				
				<category>ColdFusion</category>				
				
				<category>AJAX</category>				
				
				<pubDate>Thu, 21 Sep 2006 09:17:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/9/21/Form-Validation</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Real Life XSLT 2.0 transformations</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/8/23/Real-Life-XSLT-20-transformations</link>
				<description>
				
				I ran into a bit of a situation that was really blowing my mind. I have a rather large XML file (around 20,000+ lines) marked up in TEI that I wanted to do some transformations on (a day book and ledger from the 1850s). Essentially the code follows the format

&lt;code&gt;
...
&lt;figure&gt;
	&lt;head&gt;Page 12&lt;/head&gt;
	&lt;graphic url=&quot;0023_p12&quot;/&gt;
&lt;/figure&gt;

&lt;fw type=&quot;header&quot; place=&quot;top-center&quot;&gt;
	&lt;name type=&quot;place&quot; key=&quot;7022220&quot;&gt;Williamsburg&lt;/name&gt;,
	&lt;date value=&quot;1850&quot;&gt;1850&lt;/date&gt;,
&lt;/fw&gt;

&lt;table&gt;
	&lt;row&gt;
		&lt;cell&gt;
			&lt;date value=&quot;1850-10-03&quot;&gt;&lt;choice&gt;&lt;abbr&gt;Oct&lt;hi rend=&quot;sup;underline&quot;&gt;r&lt;/hi&gt;&lt;/abbr&gt;&lt;expan&gt;October&lt;/expan&gt;&lt;/choice&gt; 3&lt;hi rend=&quot;sup&quot;&gt;th&lt;/hi&gt; 1850&lt;/date&gt;
		&lt;/cell&gt;
		&lt;cell&gt;
			&lt;name type=&quot;person&quot; key=&quot;griffss01&quot;&gt;Doct&lt;hi rend=&quot;sup;underline&quot;&gt;r&lt;/hi&gt; S S Griffin&lt;/name&gt;
		 &lt;/cell&gt;
		 &lt;cell&gt;&amp;nbsp;&lt;/cell&gt;
	&lt;/row&gt;
	...
&lt;/table&gt;
&lt;pb/&gt;
...
&lt;/code&gt;

What I wanted to accomplish was group all this together in separate divs for HTML output (ok, I actually need to write each page to its own file, but this is pretty much just one more step). 

I just could not find a way to group this info this way using XSLT 1 without wrapping each page within its own div structure. I didn&apos;t really want to go back and do this, so I asked the TEI-L list. David Sewell pinged me back with some XQuery code that recursively recalls the document structure for a given node. 

He also mentioned that it would be pretty easy to write an XSLT 2 transformation that groups these nodes together. I did a little bit of digging and came up with

&lt;code&gt;
&lt;xsl:template match=&quot;tei:div&quot;&gt;
	&lt;xsl:for-each-group select=&quot;*&quot; group-ending-with&quot;tei:pb&quot;&gt;
		&lt;div class=&quot;page&quot;&gt;
			 &lt;xsl:apply-templates select=&quot;current-group()&quot; /&gt;
		&lt;/div&gt;
	&lt;/xsl:for-each-group&gt;
&lt;/xsl:template&gt;
&lt;/code&gt;

This transformed the pages to what I was wanting

&lt;code&gt;
&lt;div class=&quot;page&quot;&gt;
	&lt;img src=&quot;0023_12.png&quot; alt=&quot;Page 12&quot; /&gt;
	
	&lt;h1 class=&quot;fw&quot;&gt;Williamsburg, 1850,&lt;/h1&gt;
	
	&lt;table&gt;
		&lt;tr&gt;
			&lt;td&gt;
			&lt;span class=&quot;abbr&quot;&gt;Oct&lt;sup&gt;&lt;u&gt;r&lt;/u&gt;&lt;/sup&gt;&lt;/span&gt;&lt;span class=&quot;expan&quot;&gt;October&lt;/span&gt; 3&lt;sup&gt;th&lt;/sup&gt; 1850&lt;/date&gt;
		&lt;/td&gt;
		&lt;td&gt;
			&lt;a href=&quot;javascript:getName(&apos;griffss01&apos;);&gt;Doct&lt;sup&gt;&lt;u&gt;r&lt;/u&gt;&lt;/sup&gt; S S Griffin&lt;/a&gt;
		 &lt;/td&gt;
		 &lt;td&gt;&amp;nbsp;&lt;/td&gt;
	&lt;/row&gt;
	...
&lt;/table&gt;
&lt;/div&gt;

&lt;div class=&quot;page&quot;&gt;
	...
&lt;/div&gt;
&lt;/code&gt;

The XSLT processor for ColdFusion doesn&apos;t support XSLT 2.0 (it&apos;s still a draft spec). However, Saxon does (specifically Saxon 8). For more on doing XSLT transformations, see &lt;a href=&quot;http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/11/21/XSLT-20-in-ColdFusion&quot;&gt;XSLT 2.0 in ColdFusion&lt;/a&gt;.
				
				</description>
						
				
				<category>XSLT</category>				
				
				<category>Web</category>				
				
				<category>ColdFusion</category>				
				
				<category>XML</category>				
				
				<pubDate>Wed, 23 Aug 2006 11:56:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/8/23/Real-Life-XSLT-20-transformations</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>IE 7 beta 3 in Standalone Mode</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/7/21/IE-7-beta-3-in-Standalone-Mode</link>
				<description>
				
				I&apos;ve been running IE 7 beta 2 in standalone mode (so it wouldn&apos;t override my real IE installation) for a while. However, when beta 3 came there were some issues going to beta  3 because it needed to write some values to the registry and didn&apos;t assume your default settings. 

I ran across &lt;a href=&quot;http://tredosoft.com/IE7_standalone&quot;&gt;Tredosoft&apos;s entry on how to get beta 3 working&lt;/a&gt;. The really nice thing is that they packaged a nice installer to do everything for you! So, if you need to test your website in IE 7 (there are some funky things going on with style rendering), I definitely recommend checking this out!
				
				</description>
						
				
				<category>General</category>				
				
				<category>Web</category>				
				
				<pubDate>Fri, 21 Jul 2006 08:36:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/7/21/IE-7-beta-3-in-Standalone-Mode</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>MG Unity</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/6/23/MG-Unity</link>
				<description>
				
				It&apos;s been a while since I&apos;ve written on this blog...I&apos;m attempting to keep this one on CF. Anyway, MG Unity has come out and I have to admit that I&apos;m REALLY glad it has. 

I&apos;ve been working on a project with five academics from four different institutions looking at the vernacular architecture of the Colonial Chesapeake to 1720 for an article in the William and Mary Quarterly for the 2007 celebration of Jamestown. The objective was to write an scholarly article that looks at everything that has been excavated and see if the arguments of past scholars still hold. Not only were the scholars looking at individual sites as an aggregate, but wanted to track changes to the structures over time (additions, fireplaces, cellars, etc.). 

I knew this was going to be a challenging project from the beginning, so I attempted to set the expectations early for the application development cycle. I thought it a fluke that I actually got them all to aggree on a set of important fields and tables before I started coding anything (a first for me). However, as I got into the project a bit more, requests for additional fields here, moving this data to this table, all while attempting to support constant input into the application got to be a bit more than was really feasible for a &quot;spare-time&quot; project. 

I had set out to use as good of coding practices as I could. Each table had its own DAO, gateway, TOs, validators, etc. However, each change to these fields made me keep mucking around in these files and the forms calling the objects. After a while of making constant changes, I fell back on some old &quot;bad&quot; practices and kind of strong-armed some of the solution with spaghetti code...and I hated myself for it because I knew that I would have to come back at a later date to fix it.

About this time Joe started doing some work with Arf! And Doug Hughes started work on Reactor. I continued to code in my bad style, but since I knew what I had done, I just kept doing it.

After the project members presented their paper, I set the project down for a while since my daughter had just been born. Since Joe brought out Unity, I decided now was as good a time as any to pick up the refactoring of the project. 

All I can say is that what I&apos;ve done in half-a-day with Unity would take me three- to four-times longer my old way. The scaffolds (once I figured out how they were working) have been an absolute godsend for the rather complex relationships between phases of construction and the overall archaeological and architectural record. The Reactor syntax is so easy (especially since ColdSpring seperates all the configuration) that everything just clicks. 

The entire framework is just so intuitive (at least compared to my previous experiences with frameworks). The ability to not have to worry any more about building the basic web pages, forms, CRUD, and displays makes Unity a pleasure. Also, changes will be a breeze compared to what they entailed a couple of months ago, which will allow me to do some of the cool stuff I had planned with Google Maps and Google Earth to map out the locations of these archeaological/historical sites!
				
				</description>
						
				
				<category>Web</category>				
				
				<category>ColdFusion</category>				
				
				<category>modelglue</category>				
				
				<pubDate>Fri, 23 Jun 2006 14:27:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/6/23/MG-Unity</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>SFTP for Eclipse</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/4/13/SFTP-for-Eclipse</link>
				<description>
				
				One of my gripes with Eclipse platform has been lack of support for a (functional) SFTP plugin. I had tried about a year ago, but came up empty with something that would work. I gave it another go last week and found &lt;a href=&quot;http://kosh.kmem.org/projects/esftp/&quot; title=&quot;ESftp&quot;&gt;ESftp  &lt;/a&gt;. It took a couple of tries to get it working (more on that in a second), but once I did, I&apos;ve been finding it really useful. 

What I really have liked is the ability to configure the plugin at the project and folder levels (in case you need to send them in different places). 

The one sticky-point I found in getting it up and running was the fact that the plugin has dependencies on the JSSH2 and Jsch which are not packaged directly with the extension. The author gives a reason in the README file, but like most folks, I just plugged the extension into Eclipse and expected it to work since there&apos;s no mention of it on their website. 

Anyway, here are the brief directions to getting this working...

&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=151842&quot;&gt;Download&lt;/a&gt; both the &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=151842&amp;package_id=167998&amp;release_id=390999&quot;&gt;esftp &lt;/a&gt;and &lt;a href=&quot;http://sourceforge.net/project/showfiles.php?group_id=151842&amp;package_id=169901&amp;release_id=371958&quot;&gt;esftp-lib &lt;/a&gt;files&lt;/li&gt;
&lt;li&gt;Extract the esftp.zip somewhere convenient (it automatically creates a directory named &quot;plugins/org.kmem.kosk.sftp_&amp;lt;version&amp;gt;&quot;)&lt;/li&gt;
&lt;li&gt;Extract esftp-lib.zip into the same directory above so the /lib folder is inside of plugins/org.kmem.kosk.sftp_&amp;lt;version&amp;gt;&lt;/li&gt;
&lt;li&gt;Move the entire org.kmem.kos.sftp_&amp;lt;version&amp;gt; into $ECLIPSE_HOME/plugins&lt;/li&gt;
&lt;li&gt;Run Eclipse with the clean command line option
&lt;code&gt;
eclipse -clean
&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

You should then have a new menu bar named ESftp. To configure your global settings, go to Window/Preferences.../ESftp. To configure a project, right click on the root folder and select Properties. For an individual folder, again, right-click and select Properties. 

After you&apos;ve gotten everything configured the way you want, just the the contextual ESftp Get File, Put + Save File, and Put File actions to transfer items back and forth. 

Another (similar) project I found was &lt;a href=&quot;http://deployer.sourceforge.net/&quot;&gt;deployer&lt;/a&gt;. I haven&apos;t played with that particular plugin as the per-folder settings in ESftp were more of what I was looking for. The one thing I still would love is an ANT task to SFTP...the only downside is that there has to be a password in clear text somewhere.

If you want to give this a whirl, and are having a problem getting the plugin to work, drop me a line and I&apos;ll send you the entire (presumably) working plugin.
				
				</description>
						
				
				<category>Web</category>				
				
				<category>Eclipse</category>				
				
				<pubDate>Thu, 13 Apr 2006 10:59:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/4/13/SFTP-for-Eclipse</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Cygwin to the Rescue!</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/12/14/Cygwin-to-the-Rescue</link>
				<description>
				
				I had a local SVN repository that had a lot of large images in it (scans of letters to- and from- Thomas Jefferson) that I needed to remove from the repository on my local machine but keep the files. Normally, this is an export issue, however, we&apos;re talking about 800 hundred images that are around 40MB a piece. Needless to say this was going to take more time than I was willing to dedicate to the task.

This is where Cygwin came into play. I basically wanted to delete all of the .svn folders that Subversion creates when you add something to a repository. So, with a single line, I was able delete the folders for an operation that would have taken a few hours to complete with the export task. 

So, in case you ever find yourself needed a script like this, here you go (assuming you&apos;re in the directory you want to start deleting in):

&lt;code&gt;
find . -type d -name ?*.svn? -print0 | xargs -0 rm -rdf
&lt;/code&gt;

This also works wonders for deleting .DS_Store files that tend to get onto your servers when you have Mac users (just be sure to change the -type flag to f).
				
				</description>
						
				
				<category>Server</category>				
				
				<category>Web</category>				
				
				<category>Subversion</category>				
				
				<pubDate>Wed, 14 Dec 2005 15:53:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/12/14/Cygwin-to-the-Rescue</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Export OPML from Thunderbird</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/10/7/Export-OPML-from-Thunderbird</link>
				<description>
				
				I&apos;ve been using Thunderbird as my RSS reader for a a while now...and it does a pretty decent job. However, with the flurry of posts about the Google RSS reader, I decided to also have a look. There&apos;s an option to import your feed from other programs, but this requires OPML format.

Unfortunately, there&apos;s not an option to create this output file. After a little digging, there actually is a way to get Thunderbird to export the OPML from your aggregator. I found &lt;a href=&quot;http://dougal.gunters.org/blog/2005/01/03/thunderbird-opml&quot;&gt;this post by Dougal Campbell&lt;/a&gt; where he basically fixed the bug that hid the export/import function in the &quot;Manage Subscriptions&quot; portion.

All you need to do is exit Thunderbird and download his patched &lt;a href=&quot;http://dougal.gunters.org/docs/newsblog.jar&quot;&gt;newsblog.jar&lt;/a&gt; file. Then, go to your Thunderbird installation home (Program files\Mozilla Thunderbird\chrome) and rename newsblog.jar to something else (he recommends &apos;newsblog.jar.orig&apos;) and put the patched version in there. Now, when you start Thunderbird and go to manage your subscriptions, you will see the option to import and export OPML files. 

Then just head over to Google Reader and upload the file. It takes a little bit to upload the file (I suspect they&apos;re getting hammered pretty hard right now). You&apos;ll probably also want to remove the &quot;patched&quot; newsblog.jar and rename your newblog.jar.orig to its original name since it&apos;s not part of the normal distribution.
				
				</description>
						
				
				<category>Google</category>				
				
				<category>Web</category>				
				
				<category>XML</category>				
				
				<pubDate>Fri, 07 Oct 2005 15:29:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/10/7/Export-OPML-from-Thunderbird</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Atom for BlogCFC</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/9/23/Atom-for-BlogCFC</link>
				<description>
				
				There are a lot of different formats for generating syndicated content (RSS 1 and 2, OPML, Atom, etc.). Currently (as of 2005), there are two big players, RSS 2.0 and Atom 1.0. One of the downfalls of the RSS 2.0 standard is that it is copyrighted by Harvard University, and work on the specificiation has halted. Because of this, future work has to be carried out under a different name (and organization). The Atompub Working Group is one organization carrying out further development of online syndication with the Atom 1.0 standard.

Without getting too far into the differences between the two, I thought one of the coolest things about Atom is that it is capable of being transferred using any network protocol (like XMPP). Atom is also an XML namespace, along with using a non-normative RelaxNG schema. 

Anyway, I extended this blog (&lt;a href=&quot;http://ray.camdenfamily.com&quot;&gt;BlogCFC&lt;/a&gt;) to generate an Atom feed (including the RSS 1.0 and RSS 2.0 feeds it already generated). The code isn&apos;t quite ready to post yet, but I basically created a new file named atom.cfm, which is almost exactly like rss.cfm, but calls a new function in blog.cfc called generateAtom. 

The generateAtom function creates the Atom XML, and includes a stylesheet from the &lt;a href=&quot;http://www.atomenabled.org&quot;&gt;AtomEnabled.org&lt;/a&gt; site. Because Atom uses the xhtml namespace, it actually uses your browser&apos;s default HTML stylesheet rather than the XML stylesheet with the tree view. 

I have validated the feed against &lt;a href=&quot;http://swem.wm.edu/blogs/waynegraham/atom.cfm?mode=full&quot;&gt;FEED Validator&lt;/a&gt;, though the enclosures and subjects aren&apos;t currently in there...but will be added shortly.
				
				</description>
						
				
				<category>Blog</category>				
				
				<category>Web</category>				
				
				<category>XML</category>				
				
				<pubDate>Fri, 23 Sep 2005 14:11:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/9/23/Atom-for-BlogCFC</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Google Blog Search</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/9/14/Google-Blog-Search</link>
				<description>
				
				Like many, I&apos;ve been playing around with &lt;a href=&quot;http://blogsearch.google.com&quot;&gt;Google&apos;s blog search&lt;/a&gt; today. From a university library perspective, it&apos;s interesting to see what people are saying about the library. While playing around with the searches, I noticed the little Live Bookmark in Firefox that allows you to subscribe to a search. Very cool!

This got me thinking more about how our library catalog is being used. It would be really nice to be able to generate RSS from search results in the library catalog. It would be nice to be able to set up searches in the catalog that monitor specific resources in the catalog. Since I&apos;m thinking out loud, this could probably be done reasonably easily with an asynchronous gateway using the Z39.50 protocol...hmmm; sounds like a project!
				
				</description>
						
				
				<category>Google</category>				
				
				<category>Blog</category>				
				
				<category>Web</category>				
				
				<pubDate>Wed, 14 Sep 2005 19:57:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/9/14/Google-Blog-Search</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Major Site Update</title>
				<link>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/8/20/Major-Site-Update</link>
				<description>
				
				I&apos;m in the middle of rolling out the new site design for the library, so there have been some funky things going on; which I promise will be over by the end of the weekend. 

I did just get a report from our Google box that our 100,000 document limit had been met (we have a lot less than 100,000 pages), so I need to hunt down what&apos;s going on there. I&apos;m also having a slight problem updating the Blog layout code to use the aura skin. Maybe it&apos;s just been too long of a day...
				
				</description>
						
				
				<category>Web</category>				
				
				<pubDate>Sat, 20 Aug 2005 22:30:00 -0500</pubDate>
				<guid>http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/8/20/Major-Site-Update</guid>
				
			</item>
			
		 	
			</channel></rss>