I’m John C Bland II

Husband, Father, Tech Author, Deacon.
Founder of Katapult Media, and full-stack polyglot developer.
Political Free Agents Podcast Host.

I create. I launch.

YouTube Channel

I post regular fun on YouTube like me playing the bass and anything else I find fun. 

Get Something Built

All project work goes through Katapult Media. Business is open. Let’s chat.

ColdFusion Position at Adobe

This just came through the RSS tubes.

Passing on this job notice from Adobe. It is a contract position with the possibility of converting to full time. We have an open contract position for a CF engineer that I was hoping you could post on your blogs. Here are the requirements per the hiring manager:

  • BS or advanced degree and 3+ years’ experience, or equivalent knowledge.
  • Experience in design and development of web applications with ColdFusion, Mach-ii, AJAX, JSON, XML
  • Worked with and applied current web client-side technologies – JavaScript, CSS, HTML, etc.
  • Experience working with highly trafficked, scalable web applications with product downloads
  • Experience with Adobe AIR applications
  • Knowledge of presentation, web, business and data access layers and their interactions
  • Experience with web services protocols such as REST, SOAP, XML/RPC.
  • Solid foundation in computer science fundamentals, object oriented, design techniques, + software engineering best practices
  • Experience in Scrum/Agile software development methodology

This position is for the group that works on the Adobe client download center section of Adobe.com Please send resumes to Kavitha Mattikalli kmattika@adobe.com

Source Ray Camden

My response to ‘Does Adobe really care about ColdFusion? Doubt it’

Alan Williamson went on the attack in an attempt to call out Adobe for their lack of ColdFusion updates/support. I commented on his blog but wanted to replicate it here. I hesitated to do this seeing as it would bring light to a tasteless marketing effort but think it could be worth the discussion.

So here is my response to Does Adobe really care about ColdFusion? Doubt it:

I’d say OpenBD is behind Railo. I didn’t even know OpenBD was still working. I thought it was dying slowly [not being funny, absolutely serious here].

You’re taking Ray’s posts wayyyyy out of context. DateTimeFormat is a simple improvement we’ve all dealt with for years through two function calls: DateFormat, TimeFormat. Ray is pulling simple upgrades out of Zeus and posting about them. Maybe if that was the only update this post would be spot on but it is just one of the smaller niceties being provided.

If you want a list of big features, Charlie did a preso recently [October 2011] where he outlined what’s new.

Here are some I’d say are “slightly” larger than DateTimeFormat:
– Automated Hotfix Mechanis
– Restricting Admin Access by IP Addres
– CSRF Protection
– XSS Protection
– Completely rethought scheduled tasks [too many updates here to list]
– Web sockets support; other HTML5 goodies too
– Closures
– Implicit CFC constructors
– CFC method chaining [no more ‘return this;’ required to method chain]
– Tomcat replaces jrun
– SOLR improvements
– Better java integration; auto-load jars and cfc access in java [see CFCProxy] are my favs
– jQuery used in Admin [death to java applets]
– Per-application VFS
– Web Services are now AXIS 2; adds REST support and is brain-dead simple yet very powerful

Those are just some of the highlights from Charlie’s preso. Does that change the scope of your post?

As for it taking a very long time for such a simple update, I think all software has a similar issue. It isn’t like DateTimeFormat was all that hard to achieve through a UDF.

But…for the sake of discussion, OpenBD isn’t free and clear here either:
Issue 33: cfprocessingdirective in the error handler page

That’s been open since 2008. This one is 2008 as well.

Maybe the issue tracker is outdated but until your house is clean…you might not want to talk about someone else’s.

😉

PS – I deploy mainly Railo these days so don’t think I’m an Adobe fanboy defending the mothership.

It is always good for the community to take up a cause and get a company to improve a product but for a competitor to lambast and claim they are the clear leader they must: 1) Not have the same issue(s), 2) literally be in the lead, 3) Do so with legit points showcasing where an impending update is a poor one.

As another side note, I mention Railo as my preferred CFML engine [namely because it is free and blazingly fast!!!] but lately I’ve been in Rails way more than CF.

Server Performance with Railo 3.2 vs Railo 3.3

I thought my results tonight were quite interesting. I setup a new server for a client and, due to my recent woes, went straight to performance testing. 🙂 Since I LOVE numbers [data], it was appealing to me to test the server every step of the way to set some informal “benchmarks” for the starting point moving forward.

These performance tests were done with Siege by Joe Dog Software. I think it is it a great piece of software and highly recommend it for performance testing.

Server:
Media Temple (ve) 1GB
Ubuntu 11.04 Natty
Apache 2.2 [prefork MPM]

Siege command:

siege https://server-ip-here/index.cfm -c 100 -t 60s

This is a 100 concurrent user test for 60 seconds on the index.cfm page of the site. Enough details…on to the results.

(more…)

Railo Consulting FTW

For starters, I’m no server guru. I know some things and can get ColdFusion [Adobe/Railo] setup w/ ease but will it be optimal? Nope. This was proven true with a recent launch. I went with a general setup of Apache 2 -> Tomcat [via AJP] w/ Railo.

Most of my problems came, unbeknownst to me, by way of Apache being outdated and using the prefork mpm [opens a whole new Apache to cover requests based on your settings] vs the worker mpm [threaded; opens new threads only, not entire Apaache instances]. 2.2.3 was installed which used an older AJP module and by default used prefork. Simply upgrading to 2.2.16 wasn’t the push of a button or clicking of a few keys because centOS [via Yum] only grabs specific versions; in this case, 2.2.3. With a botched launch and days of outages for the next week+, I spoke with our team about bringing Railo Consulting in to fix things up.

(more…)

CFWheels URLRewriting on Tomcat through Apache

UPDATE
The initial post worked but submitted forms did not. :-/ What’s a web app without form submission? (rhetorical)

So, the configs are updated below and I have tested this locally on Tomcat 7 and on a centOS server w/ Tomcat 6. The issue was with the 2nd to last line and the last. They needed to be swapped. The 2nd to last forces a 301. Swap them…all good! 😀

I really need to stop with the long titles but they are so informative! 😀

This has been a major pain for me and others, it seems. I think I found a solution and would like to lay it out for you and get feedback to see if it works for others as well.

(more…)

Apache Authentication with Proxy

I’m purely pointing to a blog post by Jamie Krug (@jamiekrug), who is getting a huge man hug from me today. It saved me from a firestorm where a dev url was posted publicly but wasn’t password protected (lazy me!). Apache wasn’t playing nice since it passed off the ColdFusion files to Tomcat. Just before I went crazy with Tomcat changes…I found this. I hope it helps someone else.

https://jamiekrug.com/blog/index.cfm/2009/8/6/apache-authentication-with-proxy

CFWheels: Redirecting non-authorized access after login

CFWheels always seems to make me smile with certain features. It isn’t 100% perfect (what is?) but it really makes CF dev fun. In this case, we’re taking a simple scenario of a user attempting to access a non-public url while not authorized to login. It could be from a bookmark or them simply trying to “hack” your system. Either way, once the user logs in they should automatically get to the page they want. Here’s how you can do it in Wheels.

(more…)

mxunit 1.0.8 index.cfm is broken

A while back I starting building cfgithub and noticed I was, technically, writing unit tests but poorly. I then took a dive into CF-based unit testing frameworks and finally dove into mxunit. It was kicking my butt! Nothing in it was working properly but I finally got it working perfectly fine. I posted my issues on Twitter how I felt it was “…outdated, IMO…” to which @MarcEsher responded asking how to which I’m finally responding tonight. 😀

At a minimum the homepage should work perfectly fine. Unfortunately, the homepage has some code issues. In order to get this page working, it takes a few tweaks. I’ve posted these tweaks on the the Google Code issue tracker so those guys can get the builds together. It, honestly, looks like quality control wasn’t done on this build before publishing since these are so blatant you can’t miss them.

So…I’m off to see if I can get the rest of mxunit working. We’ll see how well this goes since my last attempt(s) were feeble but mainly because of the mxunit failures.

Disclaimer:

I can write test suites without a problem. That works perfectly fine. I hit walls when I attempt to use the Stub Generator, etc from the /mxunit site (not the .com but the actual site built within the /mxunit folder).

Should CF be free? Open source?

The long debate is back. So many argue the affirmative and are absolutely crazed over the argument. I’m not going to jump into it this time around. I would LOVE to see Standard offered for free but I won’t cry if I have to buy the next upgrade to CF9.

So, my post comes from Ben’s dissertation (hehe) he “just posted on his blog”:https://www.forta.com/blog/index.cfm/2008/6/2/The-ColdFusion-Pricing-Debate-Revisited. I’m turning comments off on this post because I don’t want to steal any thunder from Ben’s overall reason for posting (research into the discussion for Adobe’s planning purposes; or that’s what I got from the post).

ColdFusion 8.0.1 Cumulative Hotfix (chf8010001): cftooltip Fixed!!

It is cool to see “a bug you reported”:https://www.johncblandii.com/2008/04/coldfusion-801-cftooltip-is-br.html fixed. 🙂

Grab the “hotfix here”:https://kb.adobe.com/selfservice/viewContent.do?externalId=kb403622&sliceId=1.

Thanks to “Ray for blogging the hotfix release”:https://www.coldfusionjedi.com/index.cfm/2008/5/17/Did-you-know-a-hot-fix-for-ColdFusion-was-released-this-week because I had no idea one was released.

ColdFusion 9 Feature Request: Ext JS Only

I spoke with Delmore and Adam Lehman this weekend about the use of multiple javascript libraries. Ext 1.1 didn’t have everything Ext 2.0 has so they had use multiple libraries. Makes sense.

For CF9…PLEASE GET RID OF YUI! The UI components are absolutely flakey. I’ve been able to reproduce tons of issues with _cflayout_ tabs (I mean really horrible one’s; haven’t spent time debugging the JS though) and _cftooltip_ (“fix here”:https://www.johncblandii.com/2008/04/coldfusion-801-cftooltip-is-br.html).

So…no code suggestions or anything…just please nix YUI and fully integrate Ext 2 or whatever the current version is when CF9 comes out.

ColdFusion 9 Feature Request: cfquery resultType

This is one I really want to see happen as it is HIGHLY useful, at least to me.

**Idea**
When querying a database I want to return a query but a query of a cfc instances (a value object [or bean…pending your terminology]). I don’t want to return an Array of Structs though.

**Code Proposal**
On _cfquery_, add a _resultType_ attribute. This attribute would take a path to a CFC. The _resultType_ CFC should be nothing more than a value object (bean) based on the spec required by Adobe.

**Code Example **
[cfquery.cfm]
<cfquery name=”mydata” resultType=”cfcs.Product”>
SELECT productID, name
FROM products
</cfquery>

<cfoutput>
#mydata.getProductName()[1]#
</cfoutput>

[cfcs/Product.cfc]
<cfcomponent>
<cfscript>
variables.productID = 0;
variables.name = “”;
</cfscript>

<cffunction name=”init” access=”public” returntype=”string”>
<cfreturn this />
</cffunction>

<cffunction name=”getProductID” access=”public” returntype=”numeric”>
<cfreturn variables.productID />
</cffunction>

<cffunction name=”setProductID” access=”public” returntype=”void”>
<cfargument name=”productID” type=”numeric” required=”yes” />
<cfset variables.productID = arguments.productID />
</cffunction>

<cffunction name=”getName” access=”public” returntype=”string”>
<cfreturn variables.name />
</cffunction>

<cffunction name=”setName” access=”public” returntype=”void”>
<cfargument name=”name” type=”numeric” required=”yes” />
<cfset variables.name = arguments.name />
</cffunction>

<cffunction name=”getDisplayName” access=”public” returntype=”string”>
<cfreturn variables.name & ” (” & variables.productID & “)” />
</cffunction>
</cfcomponent>

**Time Saving Tip**
This could be annoying to some (having to write extra code) but a query would still be a query if you didn’t specify the _resultType_. You also could use _onMissingMethod_ to get/set your variables instead of writing every single one of the getters/setters. Another option is to use or write a code generator.

Let’s go Adobe…what’cha think?

cf.Objective() 2008 Review & CF8 .NET Integration Preso Files

What’s up folks? I haven’t blogged in a week or so due to the cf.Objective() ’08 conference. I put a lot of prep into it and it seemingly paid off. I’ll wait for the preso reviews to know for sure. 🙂

**Conference**
The conference was fun. I put my face to my name for a good number of folks (Corfield, Camden, Steven Hauer, etc). They were folks I speak to via email/IM but we hadn’t met in person. That was a good thing.

As for the conference sessions, I REALLY enjoyed “Laura’s”:https://www.asfusion.com preso on “Mate”:https://mate.asfusion.com (pronounced: mah-tay). I’m more on the side of “Maxim Porges”:https://maximporges.blogspot.com (“no framework required”:https://maximporges.blogspot.com/2008/05/more-feedback-on-flex-without.html) but Mate was really nice. It is a framework but your app can just use the event routing without coding it specifically for use with Mate, meaning you could easily nix Mate when you choose to roll your own (not so easy in Cairngorm and others).

“Maxim Porges”:https://maximporges.blogspot.com had a good preso on not using a framework. He just showed how to roll your own MVC. I prefer not using frameworks (in CF and AS) so the session rocked for me because he had really GREAT reasons why you don’t have to use a framework.

Of course “Tom Jordahl”:https://tjordahl.blogspot.com/ had a good BlazeDS preso. He knows that product intimately so hearing from him is always a good thing.

Nothing against the other presenters…there were other good presos but my wrists are hurting and I still need to code today so I’ll stop here. 🙂

**My preso**
As promised, here are “my preso files”:https://www.johncblandii.com/presos/cfobjective08/dotnet/ColdFusion8NetIntegration.zip (including PowerPoint). The C# and CF code is there. Fair warning…I’m using Visual Studio 2008 for the C# projects.

Enjoy!

ColdFusion 8.0.1: cftooltip is broken!

_cftooltip_ ignores attributes. Good thing is, I spent tonight figuring out what was up with it and have fixed it.

**Background**
_cftooltip_ uses “YUI”:https://developer.yahoo.com/yui/ (the Yahoo! UI Ajax library). CF actually uses the “YUI Tooltip”:https://developer.yahoo.com/yui/container/tooltip/ widget along with the “YUI Event Utility”:https://developer.yahoo.com/yui/examples/event/event-delegation.html to show/hide a tooltip on mouseover/mouseout.

**Initial Code**
I created a custom tag to encapsulate “our”:https://www.sportmatchmaker.com tooltip functionality. The ‘tag took just a few attributes (source, color, hideDelay). The issue was hideDelay WOULD NOT WORK! Here’s the _cftooltip_ code.

bq. <cftooltip autodismissdelay=”5000″ showDelay=”2000″ hideDelay=”#attributes.hideDelay#” sourcefortooltip=”#attributes.source#”>
<img src=”/images/#attributes.color#.gif” width=”16″ height=”16″ />
</cftooltip>

No sweat, right? Wrong!

**How does _cftooltip_ work?**
If you View Source on a page with a _cftooltip_, you’ll see ColdFusion wraps your content in a _span_ tag then assigns a listener. Well, granted…I’m using an _img_ tag so maybe a _div_ in the content of _cftooltip_ wouldn’t result in wrapping it with a _span_ but I haven’t tested that thought. Anyways…back to the post at hand. 🙂

bq. YAHOO.util.Event.addListener(“cf_tooltip_1208158360141″,”mouseover”,ColdFusion.Tooltip.getToolTip,{“_cf_url” : “/sometooltip.cfm”,”_cf_query” : “”,”context” : “cf_tooltip_1208158360141″,”hidedelay” : “15000”,”showdelay” : “2000”,”autodismissdelay” : “5000”,”preventoverlap” : “true”});

(**Update** Ignore extra spaces before the colon. MT is rendering it as a URL.)

That’s the YUI code created for my tooltip which points to a file called /sometooltip.cfm and is supposed to show after 2 seconds, auto-hide after 5 seconds and if the user mouses off the image hide the tip 5 seconds later.

**Sidebar: JS Coding**
Ok, I’m a stickler for code and my first look at this, Friday, threw me slightly. Why in the world did the config object (last parameter inside the curley braces) have quotes around the property name and value? That seemed weird. Maybe it is so it works in an older browser version or something. Oh well…not sweat…it worked.

**Back to “How it works…”**
ColdFusion now has a ColdFusion javascript package named…(take a big guess)…_ColdFusion_. 🙂 I won’t paste the cfajax.js file but it is located here: /CFIDE/scripts/ajax/package/cftooltip.js. There are two functions in this file. _ColdFusion.Tooltip.getToolTip_ is the event handler for the _addListener_ call (see above). The other one is _ColdFusion.Tooltip.setToolTipOut_ which is called after a new listener is added to the tip for the _mouseout_ event.

_ColdFusion.Tooltip.getToolTip_ is where the problem resides.

**The Fix**
All of the code is legit and works. Don’t be afraid by the variables with numbers for names. The _349 argument is the one to focus your attention on. If you do a _for…in_ loop you will see all of the parameters you passed into the config argument (see above). Everthing goes in perfectly fine but it seems YUI ignores all parameters. Why? Well, I haven’t gone through the YUI code but I found a reason why it happens and here’s how to take care of the problem.

Jump in your cftooltip.js and right before…

bq. _34a=new YAHOO.widget.Tooltip(_349.context+”_cf_tooltip”,_349);

…copy and paste the following:

bq. if(_349.hidedelay != undefined) _349.hidedelay = Number(_349.hidedelay);
if(_349.autodismissdelay != undefined) _349.autodismissdelay = Number(_349.autodismissdelay);
if(_349.showdelay != undefined) _349.showdelay = Number(_349.showdelay);

**Solution Explained**
The problem is ColdFusion isn’t casting the _Number_ parameters as actual _Number_’s. So either YUI validates those config params as _Number_’s and if they aren’t it ignores them as config params. It seems like the only valid reason but YUI has obfuscated their code and minimized it which I don’t want to mess with.

So, to fix it we check to make sure the parameter of the _349 object exists then resets the value to the same value but casted as a _Number_.

You can open your cftooltip.js and make the change above for your entire server (or that server instance if you’re using a multiserver setup). If you use _cfajaximport_ and set the _scriptsrc_ to a local file you have BE SURE TO KNOW this is a change for ALL scripts on your site. So, you could get all CF Javascript files and put them in your site directory, set them with _cfajaximport_ and only edit it for your site (how you’d probably have to do it with a shared site).

One other thing you could do is use _<cfajaximport tags=”tooltip” />_ then directly use the _YAHOO_ package but nix the call to _ColdFusion.Tooltip.getToolTip_ and have the _mouseover_ listener call your own custom function.

Anyways…I hope this helps because I looked all over and couldn’t find 1 blog post about cftooltip not working. I had a business partner check and he found nothing either.

Adobe…please validate this fix and get it out there asap so the community is aware.