java

Closures for Java

Wanting some light reading for this evening, I decided to dig into the Closures for Java draft spec (homepage).
Oh. My. God.
I'm a huge fan of closures. They're elegant, simple, and easy to use. Their semantics are subtle, but not confusing. They allow for very concise implementation of otherwise complicated algorithms, [...]

Scriptlets in CF Anyone?

My last post about Comparators via CF Groovy was simplistic in nature, but the underlying concept is incredibly powerful.  Here's a similar snippet (from the demo app), this time using a Comparator class:
<g:script>
Collections.sort(variables.a, new ReverseDateKeyComparator())
</g:script>
So what do we have here?  Why it's a snippet of Java embedded directly in your CFML page, and it gets [...]

Design Patterns in Dynamic Langauges

I went to the Portland JUG meeting this evening to hear Neal Ford talk about design patterns in dynamic languages. Unlike Joshua Marinacci a couple months ago, Neal actually seemed to understand what he was talking about, which was a relief. He gave a quick run-through of dynamic vs. static languages (or [...]

Use ColdFusion? Use Java.

If you use ColdFusion (or another Java-based CFML runtime), you should be using Java. There's a reason that CF uses Java under the hood: Java is incredibly powerful. Yes the interface to Java from the CF level is cumbersome and creating hybrid CF/Java applications pretty much costs you CF's RAD capabilities, but there [...]

Interesting @task Edition Breakdown

The operational support team where I work uses a product called @task for trouble tickets, and I'm currently build some Subversion/Trac integration pieces so that we can keep everything in sync between us (the developers) and them.  I saw they have a SOAP interface for the product, but made an interesting discovery: it's only available [...]

Telling it like it is

I was writing some Java today, and ran across the DraconianErrorHandler in the depths of Xerces (package com.sun.org.apache.xerces.internal.util).  It's a very apt name (it simply throws any errors it's passed), but the name struck me as something outside the bounds of the expected.  I'd have undoubtedly named it ErrorPropogationErrorHandler or something that described what it [...]

Clearsilver on OSX

It's been a while since I've posted, but I've got a lot to talk about. First up is Clearsilver on OSX.
For those of you who don't know, Clearsilver is a lightweight templating engine written in C. It has bindings for a wide array of languages, including Java. Java bindings, of course, mean [...]

DWR Rules!

I've been using DWR quite a bit on a new Java application, and WOW, it's awesome.  It's not really that different from any other JS remoting toolkit, but it is really slick.  In a nutshell, you declare "remotable" objects (mine happen to be Spring-configured services) along with what methods are remotable, and any complex data [...]

HotSpot is Hot

I've been doing a lot of Java lately, and (at least at work) moving away from ColdFusion.  I've got mixed feelings about the transition, but that's a different post.  Today I was doing some VERY primitive profiling on the application, and was amazed.
Not surprisingly, the majory of the request processing time went to data access.  [...]