Blog

Category Filtering: 'Java'

Remove Filter


Improving Lucee's QoQ Support Again- now 200% faster

Posted by Brad Wood
Dec 01, 2022 20:12:00 UTC

Two years ago, I published this post detailing how I had refactored the Query of Query support in Lucee to be much better and also much faster:

https://www.codersrevolution.com/blog/improving-lucees-query-of-query-support

I removed the single-threaded HSQLDB callback for grouped/aggregate and distinct selects and tuned the performance.  QoQ's are a bit of a polarizing feature in CFML.  They've suffered in the past from poor support and poor performance which has caused a lot of people to avoid them.  There are certainly places where queryMap(), queryFilter(), and queryReduce() are the best approach, but there are also times where you simply can't beat the readability and conciseness of an ordered,  aggregated select.  I know developers who tell me they never use "reduce" higher order functions because they are too confusing, but I've never met a developer who didn't understand "GROUP BY department"! 

I've got several other ideas to increase the feature set of QoQ in CFML including native support for INNER and OUTER joins as well as this idea of exposing CFML string, number, and date functions directly in QoQ.  I've also put in a handful of tickets for Adobe ColdFusion to invite them to follow in the improvements I've added to Lucee. I'd send them pulls, if I could : (

Create your own Desktop "Toaster" Popups in CommandBox Servers

Posted by Brad Wood
Jan 21, 2021 00:16:00 UTC

Here's a quick one that I tried out for the first time today.  Someone asked if it was possible for a CF app to have a desktop notification on the server it's running.  CommandBox servers have a try icon that runs inside the JVM of the server that can create popups and even Swing windows.  Turns out, it's actually really easy to tap into this to get a toaster popup on your desktop.  

Improving Lucee's Query of Query Support

Posted by Brad Wood
Sep 12, 2020 01:29:00 UTC

One of the really great features of CFML is the ability to run SQL against a result set in memory.  This allows you to union separate results together or even apply additional filtering on an exiting result if you can't control what the DB gives you.  Like everything, there is a time and a place for this.  There are people who strongly dislike QoQ (query of queries) but my take is that I think they're great when used with relatively small data sets and unless performance profiling shows they are causing issues, I have no problems using them.  

Using OSGI To Load A Conflicting Jar Into Lucee Server

Posted by Brad Wood
Sep 21, 2018 07:24:00 UTC

This post falls in the category of something that took me several hours to figure out and other people are not likely to figure it out on their own and I'm likely to forget it if I don't write it down!  The problem is if you have a jar file with some 3rd party library that you want to use in Lucee.  Often times this works great, but other times the dependencies of that library may conflict with other jars already loaded into the classpath for Lucee, its bundled libs, or the servlet container. 

CFML, Good Discussions, And Misinformation

Posted by Brad Wood
Jan 15, 2015 00:33:00 UTC

So this blog is a bit of a spill over from a Twitter conversation I had today with Stefan Mischook, a PHP programmer and maker of all sorts of training videos at www.studioweb.com and www.killersites.com.  A few years ago, Stefan uploaded a video blog to YouTube titled "Should you learn Coldfusion?" (sic) where he presented a not-so-glowing review of ColdFusion through the lens of circa 2003.  I've seen the video before come up in YouTube searches.  Part of that is a testament to the pathetically small amount of actual CFML content on YouTube.  While I've recorded a number of screencasts and webinars that are posted online, they're all on Vimeo or Adobe Connect so alas I'm not contributing to that specific site.  

Generating Primes Revisited: My Modifications To The Sieve of Eratosthenes

Posted by Brad Wood
Feb 01, 2011 11:28:00 UTC
In a recent pissing match between ColdFusion and PHP, Jared Rypka-Hauer was demonstrating the performance of a function that generated prime numbers. The discussion really wasn't about the BEST prime generator as much as it was about how much ColdFusion can kick PHP's puny butt all over town. Never the less, I piped up in the comments to ask Jared to compare a prime number generator that I wrote a while back based on the Sieve of Eratosthene. After Jared asked some good questions about how my code worked I figured it was time I stopped high-jacking the comments of the PHP pooper train. I decided to spin off a new post to highlight some significant performance gains I was able to produce.

JVM Args Don't Like Line Breaks

Posted by Brad Wood
Jan 31, 2010 07:44:00 UTC
A brief hiatus today from from the PCI Compliance series to issue a quick public service announcement. I was installing my free copy of SeeFusion today that I netted in the recent give-away WebApper had. Since the target machine was CF7 on a OpenSuse Linux with the JVM upgraded to 1.4.2_11, it was a "manual" install. Pretty easy-- copy a few jar files and edit a few configs. The problem was, SeeFusion wasn't able to connect to my debugging port to capture stack traces and I couldn't figure out why.

Taming The Header Output Of CFHTMLHead and CFAjaxProxy

Posted by Brad Wood
Oct 21, 2009 05:14:00 UTC
Tags like CFHTMLHead, CFAjaxProxy, and CFAjaxImport don't output their content into the regular ColdFusion output buffer. Instead they put their contents into a special header buffer which is dumped into the beginning of the output right before the request is sent back to the client. But what if you want control over where their output goes? CFSaveContent doesn't work on these bad boys. And even worse, <cfcontent reset="yes"> doesn't get rid of their output. The other day I got bit when trying to return the HTML of a rendered view via a proxy in ColdBox as a JSON string. The JavaScript output of the CFAjaxProxy tag was being appended to the beginning of the response and causing the result to not be valid JSON.

So, I Wrote My First "Hello World" Android App...

Posted by Brad Wood
Oct 07, 2009 04:04:00 UTC
My friend John dreams 3 or 4 get-rich schemes every week. Most of them involve technology, and he generally tries to talk me into helping him with them. He can never be dissuaded from the belief that each of his brainstorms are nothing short of an entrepreneurial pot of gold. These revelations, of course, come despite the fact that he has virtually no programming experience and even less start-up capital. Most of his recent ideas have all been centered around the new Google Android phones and the ability to write apps for them. After listening to him babble about Android app development for several weeks straight, I decided to download the Android SDK and play around with it.

ColdFusion's Object Instantiation Penalty: How Bad Is It?

Posted by Brad Wood
Sep 22, 2008 13:58:00 UTC
There has been a lot of talk recently about design patterns aimed at circumventing the overhead ColdFusion imposes upon us when creating CFCs. I'm not sure who coined the term "Object Instantiation Penalty", but the first reference to it I can find in the CF community was over at the Dot Matrix blog. Everyone seems to agree that object creation in ColdFusion leaves something to be desired, but I haven't seen anyone really quantify the price yet. I decided some line charts were in order.

Site Updates

Entries Search