Friday, 30 November 2012

Stack Overflow is populated by @rseholes (#1 of what could end up being a series...)

G'day

RANT ALERT! (and language some people will find unpleasant).
Since I started this blog, I've had a link over on the right-hand side of the page encouraging people to help out other ColdFusion developers on the ColdFusion channel on Stack Overflow (and on the Adobe ColdFusion forums). I stand by my sentiment that it's important to help people, but I've about had a gutsful of Stack Overflow. Not the concept - it's admirable - but the "gimme-a-little-power-and-I-become-a-nazi" fvckwits who try to find meaning in their pathetic little lives by demonstrating how they have a tiny tiny tiny amount of authority over other people, and by god, they will exercise it.

Thursday, 29 November 2012

Final Call for survey participation

G'day:
Hey, I've decided to start collating the results of the survey I've been running on where the priority ought to go in porting the remaining non-CFScript-ready CFML functionality to CFScript.

Update:
This survey is now complete. The results can be found here.

Wednesday, 28 November 2012

ColdFusion 10 hosting, anyone?

G'day:
In the course of doing this blog and writing example code for it, or knocking together small applications to help myself and possibly other people, I need a small amount of code to be hosted in a public-facing environment.  Examples of this are the ColdFusion (and ColdFusion Builder) Bugs RSS feeds, my experimental easier-to-use search UI for the Adobe bug tracker, and the Twitter bug notifier thingey. These all run fine on CF9, but there's a few things I want to try which require CF10 (mostly stuff I want to experiment with, like web sockets).

Saturday, 24 November 2012

Thoughts on "Coldfusion and the law of dialectics of progress" by Stofke on wheels

G'day:
This is another article that started as a comment on someone else's blog, but it got too long, so I figured I'd clutter up my own blog rather than theirs.

"Stofke on wheels" has written an interesting article entitled "Coldfusion and the law of dialectics of progress" (I wish I could come up with titles like that... without simply just copying it, like I have in this article, I mean ;-)
 
The article starts well - discussing a concept I was unaware of "Law of the handicap of a head start" - and how it possibly applies to ColdFusion - but ultimately arrives at some dubious conclusions as to how Railo is an answer to the questions left asking.

Wednesday, 21 November 2012

CFLib.org needs your UDFs

G'day:
 I assume you all now what CFlib.org is, but in case not, it summarises itself thus:
The purpose of the Common Function Library Project (CFLib.org) is to create a set of user-defined function (UDF) libraries for ColdFusion 5.0 and higher. These libraries are open source and may be used and modified to your liking. Functions range from email format checking to encryption routines. These UDFs can greatly speed up development time as well as add new and powerful features to your web site.

Anyone can add their code to the project by simply using our submission form. You must be running ColdFusion 5.0 (or higher) to run these libraries. For more information about ColdFusion, please visit Adobe's ColdFusion product page. If you have any suggestions or comments, please contact me. CFLib.org was created by Raymond Camden [...].

Tuesday, 20 November 2012

Update to this blog's communication policy

G'day:
This blog has a communications policy, a link to which is always over on the right-hand-side there.

Proposal for a ColdFusion "express installer"

G'day:
Yesterday I commented on a coupla blog articles about "how to fix ColdFusion", or more to the point, how to apply CPR to it, get it back up and running, and winning races.

Monday, 19 November 2012

ColdFusion 10 Update 5: mostly smooth

G'day:
Here's my experience with the new ColdFusion 10 update 5 which was released half an hour or so ago.

Sean said that Nick said that Fusion Authority said...

G'day
Sean Corfield's written an interesting article entitled "CFML - Too Little, Too late?". I recommend you read it. It's not earthshattering and not saying anything that hasn't been said before, but it's nicely composed and is poignant and thought-provoking. And I tend to pay attention when Sean says stuff. I don't necessarily then agree, but I do pay attention ;-)

I started feeding-back to him in a comment on his own blog, but it was getting too long for a blog comment so I thought I'd revise it slightly to add context, and write it here instead.

Friday, 16 November 2012

Slashes are not more important than people


First things first

CFHour is asking people to donate money for the relief of victims of Hurricane Sandy.

To encourage people to donate, they are running a competition to win a copy of ColdFusion Builder.  Details are on their site, but I've repeated them below to get the message across as quickly as possible (guys, please let me know if I don't have this exactly right, I'll update it).

Donate some money to a charity that is targeting the relief of victims of Hurricane Sandy. Take a photo of the receipt and post it somewhere on the 'net that can be viewed (obscure any sensitive personal info!), then tweet the URL along with a hash-tag of #CFHourCares.


"Too-hard basket"

G'day:

Update:
This survey is now complete. The results can be found here.

Yesterday I nudged my readers about the survey I'm doing about CFScript improvements in CF11.  I had some feedback overnight from Charlie (in the comments below) and another person saying much the same thing: the survey is a bit hard to fill out.  Indeed the anonymous comment in the survey answers was precisely:

God that was hard to complete. You should have grouped tags from the same family into one. e.g. all the cfform tags as 1 option.

Thursday, 15 November 2012

Custom tags: nesting

G'day:
I meant to write this one ages and ages ago, back when I did the previous article on looping with custom tags. As I said in that one, I think custom tags are a great concept, but have been a bit eclipsed by all the non-UI-centric things that have been added to ColdFusion in recent years, and they've fallen out of fashion a bit. I think they still have a place in CFML's arsenal, and do things in a way that is more elegant that other more recent alternatives, when used appropriately.

Nudge: CFScript enhancements in ColdFusion 11 survey

G'day:
This is just a brief nudge. A coupla weeks back I wrote an article asking where any focus on improving CFScript's coverage of CFML tags should be applied for ColdFusion 11, and this contained a survey to gauge what people thought were important omissions, or what they thought was unecessary in CFScript.
Update:
This survey is now complete. The results can be found here.

Tuesday, 13 November 2012

Plug: Learn ColdFusion in a Week

G'day:
Every man and his dog have mentioned the new resource that was launched within the last week: learncfinaweek.com. Except me.  Well I'm remedying that now.

Do we know if ColdFusion 10 update 4 actually does fix these performance/scaling problems?

G'day
I'm still too busy with other stuff to write an article with any meat on it, I'm afraid.  Although that one about rationalising the useage of trailing slashes kept at least me amused for a coupla days. But I'm easily amused.

But here's a formalisation of a thought that's been lodged in my brain for a week or so now.

Thursday, 8 November 2012

/>

G'day:
It's been a quiet week on the blog front this week sorry... this is down to it being a pretty busy week in general for me.  Nothing exciting... just too much work, so little motivation to spend even more time in front of the screen when I get home.  And, to be frank, I've not been in the mood to write anything on the train in the morning either. This isn't for a lack of stuff to write, it's just what I've got in the list of things to write about takes research and... well... a bunch of actual work to get the thing ready.

So this is a bit of a filler article.

Saturday, 3 November 2012

CFML: Application.cfc-set mappings don't work in onApplicationEnd

G'day:
Well this was not what I was intending to be looking at this evening, but I made the mistake of  looking at StackOverflow and didn't understand what I was reading about mappings and onSessionEnd and ColdFusion 8, so looked into it.


I don't really care about quirks of CF8: the boat's pretty much sailed on any problems anyone finds with that.  However I wanted to make sure it wasn't still happening in CF9 or CF10.

The original problem is that ColdFusion mappings that are set in Application.cfc don't seem to exist by the time onSessionEnd() runs (this is on ColdFusion 8).  Here's some test code and the results:

<cfcomponent output="true">
    
    <cfset this.name = "testMappings">
    <cfset this.sessionManagement = true>
    <cfset this.applicationTimeout    = createTimespan(0,0,0,20)>
    <cfset this.sessionTimeout        = createTimespan(0,0,0,10)>
    
    <cfset this.mappings = structNew()>
    <cfset this.mappings["/test"] = "C:\temp">
    
    <cfset testExpandPath("Pseudoconstructor")>
    
    <cffunction name="onApplicationStart" returnType="boolean" output="true">
        <cfset testExpandPath("onApplicationStart")>
        <cfreturn true>
    </cffunction>

    <cffunction name="onApplicationEnd" returnType="void" output="true">
        <cfargument name="applicationScope" required="true">
        <cfset testExpandPath("onApplicationEnd")>
    </cffunction>
    
    <cffunction name="onRequestStart" returnType="boolean" output="true">
        <cfargument name="thePage" type="string" required="true">
        <cfset testExpandPath("onRequestStart")>
        <cfreturn true>
    </cffunction>

    <cffunction name="onRequest" returnType="void">
        <cfargument name="thePage" type="string" required="true">
        <cfset testExpandPath("onRequest")>
        <cfinclude template="#arguments.thePage#">
    </cffunction>

    <cffunction name="onRequestEnd" returnType="void" output="true">
        <cfargument name="thePage" type="string" required="true">
        <cfset testExpandPath("onRequestEnd")>
    </cffunction>

    <cffunction name="onSessionStart" returnType="void" output="true">
        <cfset testExpandPath("onSessionStart")>
    </cffunction>

    <cffunction name="onSessionEnd" returnType="void" output="true">
        <cfargument name="sessionScope" type="struct" required="true">
        <cfargument name="appScope" type="struct" required="false">
        <cfset testExpandPath("onSessionEnd")>
    </cffunction>


    <cffunction name="testExpandPath" returntype="void" access="public" output="true">
        <cfargument name="message" required="true" type="string">

        <cfset var path  = expandPath("/test")>
        <cfset var fullMessage = "#message#: #path#">
        <cfoutput>#fullMessage#<br /></cfoutput>
        <cflog file="testMappings" text="#fullMessage#">
    </cffunction>

</cfcomponent>

Pseudoconstructor: C:\apps\adobe\ColdFusion\8\instances\CF801\cfusion.ear\cfusion.war\test
onApplicationStart: C:\temp
onSessionStart: C:\temp
onRequestStart: C:\temp
onRequest: C:\temp
test.cfm: C:\temp
onRequestEnd: C:\temp
onSessionEnd: C:\apps\adobe\ColdFusion\8\instances\CF801\cfusion.ear\cfusion.war\test
onApplicationEnd: C:\apps\adobe\ColdFusion\8\instances\CF801\cfusion.ear\cfusion.war\test

Firstly, it's completely legit that the mapping doesn't work in the pseudoconstructor.  See my article on how the settings set in the this scope work if you're not sure why.

However to me it's a bug that they aren't still around in onSessionEnd() and onApplicationEnd().  Someone at Adobe clearly thinks so too, as the behaviour has been modified (partially) in CF9:

Pseudoconstructor: C:\webroots\CF902\test
onApplicationStart: C:\temp
onSessionStart: C:\temp
onRequestStart: C:\temp
onRequest: C:\temp
test.cfm: C:\temp
onRequestEnd: C:\temp
onSessionEnd: C:\temp
onApplicationEnd: C:\webroots\CF902\test

onSessionEnd() has been fixed, but not onApplicationEnd().  You'd think that if someone took the time to fix one of these, they might check the other one too eh?  Apparently not.

It's the same behaviour in ColdFusion 10.  But Railo (4.0.013) works fine: the mapping is still available in onApplicationEnd().

I've raised a bug for this: 3358817.

The work around - such as it is - for this is to set the mappings in CFAdmin: then they work fine.  Not much of a work around, but it might help some people.

Righto.

--
Adam

103*

G'day:
(People in USA will probably not get the cricket score reference in the title of this one).

I just noticed I made it past 100 articles.  When I first started this, I had plans for about half a dozen articles, and was worried what I was gonna blather on about after that. I also thought my attention would wander fairly quickly and I'd get bored of writing stuff up.  It seems not so far.

I've still only got plans for about a dozen articles ahead of where I am now, but fortunately Adobe, Railo, and the CFML community manage to keep me intrigued / bemused enough to inspire me to have more stuff to write about every other day (or so).

Cool.

Anyway, cheers for sticking with me.

--
Adam

Oh FFS: Updater 4 hosed my Apache config

G'day
Well here's irony.  I did not follow my own instructions and did not take a back-up of anything before running the new updater. And now my Apache config is hosed, and I am feeling rather dumb.  And rather annoyed at the Adobe ColdFusion team. Or whichever of them are responsible for WSConfig, anyhow.

Friday, 2 November 2012

ColdFusion: Problem with session replication with CF10 clustering

G'day:
This is a quick one, just an appendix to yesterday's article about ColdFusion 10 instance clustering. You might recall I was having problems getting sessions working, and that lead on to a discussion about how to get session replication working on a CF10 cluster.

Well I think I have spotted a problem.

Here's the cluster-edit screen on ColdFusion 9 (9.0.2):



And here's the equivalent screen on ColdFusion 10 (10.0... oh, I dunno... I've got updater 2 installed):


Do (maybe) install the new ColdFusion Updater 4

G'day:
This is a follow-up to my earlier article "DON'T Install the new ColdFusion Updater 3".

Update 4 is now out (accompanying blog post from Adobe).

I was gonna say "DO install the new ColdFusion Updater 4", but... do you know what?  Unless there's something really important you need in it, my advice would be to wait for other people to install it first, and see how they go.

Comments

G'day:
Hey, a bunch of people - including myself - have been caught out by a quirk of how the Disqus commenting system that I'm using on this blog works.  If you want to get notifications of responses to any comments you make, you must make the comment via the "Register with Disqus" option (the next step after "Or pick a name..."), rather than the other "Connect with..." options like Twitter, Facebook etc.  I think this is inadequate, and I am doing two things about this:

  1. Hitting Disqus up to see if there's a way around it (although I've read a bunch of their docs and googled rather a lot, and it seems not), and if not;
  2. migrating the comments onto a different system.
But in the interim, if you want to know if anyone has responded to your comments, you need to use the Disqus option.  Sorry.

Righto.

--
Adam

Thursday, 1 November 2012

Things I'd never looked at before: ColdFusion 10 instance clustering

G'day:

This might well be one of those "stating the obvious" kinda posts, but this one's all about me deciding to have a look at what the "Cluster Manager" option in CFAdmin in ColdFusion 10 is all about.  I've never looked at it before, so I'm pig-ignorant about it.  Perfect for the topic of a blog article then, eh?  Heh.

Where to focus Adobe's efforts to improve CFML's CFScript coverage

G'day:
It's time for another survey. This time it's about where Adobe should focus its improvements to CFScript for ColdFusion 11.

Update:
This survey is now complete. The results can be found here.

CF11 is around the corner, so this is perhaps a good time to think about where we (as the community) think efforts should be put into improving CFML.  I've always been a huge "advocate" of CFScript for non-view code, and have always preferred it to tags.  I think tags have their place, but that place is seldom in business logic; they're great for view logic though (ie: mungled up with mark-up).