links for 2008-01-31

January 31st, 2008 by James Carr

links for 2008-01-30

January 30th, 2008 by James Carr

links for 2008-01-29

January 29th, 2008 by James Carr

HTML5 Shim in IE

January 26th, 2008 by James Carr

There’s been something that cropped up as of late thanks to a comment made by Sjoerd Visscher and expanded on further by John Resig here … it seems that by using document.createElement() for a previously unknown tag makes IE start parsing that tag differently. As John points out, you can even apply CSS rules for it.

It’ll be interesting to see what comes from this… no doubt someone is going to implement a mock HTML5 library that lets you make HTML5 behaving pages for modern browsers.

Oh, and by the way, the draft covering the differences between HTML 5 and HTML 4 is worth a look. Especially since the first public draft was released this week. ;)

What Is Simple Design To You?

January 26th, 2008 by James Carr

Lately I’ve been struggling with the question of how to layout a project in a way to make it simpler to understand and modify. So I thought it would be a good idea to pose the following question. ;)

Given a project using a configuration mechanism and view technology you are least familiar with, what would it take to allow you to just jump right in and work on it without (a) adding unrelated code in the wrong place and (b) without having to study the system for a week or two?

IE Memory Leak Detector

January 26th, 2008 by James Carr

The newest tool in my javascript development toolkit: IE Javascript Memory Leak Detector.

Making extJS More Accessible to Java Developers

January 22nd, 2008 by James Carr

With my recent interest in extjs, I was playing with the idea of making a Struts2/WebWork component library or a tag library to handle a lot of the boilerplate extjs code (i.e. creating layouts and such) but, luckily, discovered someone beat me to the punch!

I randomly came across ExtTLD this morning while sifting through my rss feeds, and I must say I am rather impressed. Although I consider myself a pretty good javascript developer, there seems to be a lot of java developers who aren’t that hot at javascript… which is why whenever I attend any java related conference there is always several sessions touting “javascript free ajax!” frameworks like GWT, Ajax4JSF, or IceFaces. Although I’ve always been skeptical of such frameworks, I do see their benefits… especially for the java developer who excels at serverside JEE development but generally sucks when it comes to adding javascript behavior to the presentation layer.

So far it looks good, but I haven’t had a chance to play with it yet. Basically, I’ll have to see if it passes my “good javascript generator framework” test. I’m a pretty staunch advocate of unobtrusive javascript, and generally hate any presentation layer framework that seeks to dump several hundred (or thousand) lines of javascript inline in the html document. This is the reason I totally hate Struts 1’s client side validation plugin.

jQuery: Binding Submit on a Form’s Action Attribute

January 17th, 2008 by James Carr

Sigh… got bit a little today trying to do something with jQuery. I just could not for the life of me understand it! I was wanting to bind a submit handler to a form and, in trying to be clever, thought I would bind the form based on it’s action versus adding an id to it for the sole reason to bind it. So, I tried the following:

$("form[@action='test.php']").submit(function(event){
	event.preventDefault();
	alert("intercepted!");
});

Dang it! For reasons that confound me, it wouldn’t work!

So I took a quick gander at the documentation on the CSS selectors used in jQuery and decided to use the * modifier so it would match if it found it at all:

$("form[@action*='test.php']").submit(function(event){
	event.preventDefault();
	alert("intercepted! " + this.action);
});

For good measure, I thought I’d alert this.action to see the actual value of the action attribute. Surprisingly, it did have the full URL prepended before it… and that’s why I couldn’t bind by it before. LIkewise, I could also use ?= rather than *= if I want to match only the end of the action attribute’s value… since *= will search within the entire string. Good item to know. ;)

My Geek New Years Resolutions

January 12th, 2008 by James Carr

Of course, my main resolution this year is to undo the 50 to 60 pounds I put on over the course of 2007 (it’s troubling when you increase your pants size by 8 sizes!), but in addition to that I have several goals for 2008 that I hope to accomplish. So, here they are, in no particular order:

  • Learn Scala
  • Become a complete expert at Struts 2
  • Be a major advocate for adopting aspect oriented programming
  • Facilitate the adoption of Spring
  • Integrate at least one scripting language (Jython, JRuby, Groovy, Javascript) into an existing java system in a way that makes sense
  • Be more active in the blogsphere
  • Post more tutorials

Scala has just captured my interest a little. For those unfamiliar, here’s a quick snippet to whet your appetite:

/* Adding ! as a method on int's */
object extendBuiltins extends Application {
  def fact(n: Int): BigInt =
    if (n == 0) 1 else fact(n-1) * n
  class Factorizer(n: Int) {
    def ! = fact(n)
  }
  implicit def int2fact(n: Int) = new Factorizer(n)

  println("10! = " + (10!))
}

The last item on the list is a big goal to shoot for…. I have a ton of tutorials I’ve been asked to write, but for some reason I just haven’t gotten around to it. But I will this year, I promise.

Mid Mo XP User Group Meeting, January 16th

January 11th, 2008 by James Carr

if you happen to be near Columbia, MO around January 16th, feel free to join us at CARFAX for the Mid Mo XP usergroup meeting. This week we’ll have a very special guest speaker: Ron Jeffries, the author of Extreme Programming Installed and the owner of the XProgramming site.

The topic of Ron’s presentation is “The Dynamics of Software Development”, which Ron has described as

Using simple “chalk-talk” charts describing projects’ delivery of
features over time, Ron shows why “running tested features” make
management of software projects easier for everyone, and derives
the reasons behind the practices recommended as part of doing
Agile well.

Should be pretty interesting, and it will be the first time we’ve had a presenter that is well known in the XP community. Hopefully Ron will be the first of many more guest speakers to come (Gary and I keep posting open invitations to XP Mailing List regulars to come out and visit any time they want). ;)