Showing posts with label Community Members. Show all posts
Showing posts with label Community Members. Show all posts

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

Monday 19 November 2012

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.


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.

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.

Wednesday 31 October 2012

ColdFusion shared hosting

G'day
Sean made an interesting comment on yesterday's article about enhancing logging in ColdFusion.  It's unrelated to that particular topic, but it's worthy of discussion, so I'm going to lift it out and replicate it here, and then put my oar in.


Here's a direct link to the original comment (and my response, and Sean's follow-up) is here.  I'm going to abridge things here, just to focus on what I want to discuss.  I will not abridge it in such a way as to change the context of what either of us were saying.

Monday 29 October 2012

@CfmlNotifier

G'day:
I've finally sussed out how the Twitter & Bitly APIs work, and found time to knock-together a Twitter-based ColdFusion / ColdFusion Builder bug notifier.  It polls the Adobe bugbase every coupla hours and see if there's been any new activity since its last poll, and updates its Twitter account's status with the bug headline and a link to it.  So if you want to keep track of new bugs in the bugbase, then "follow" CfmlNotifier.

Wednesday 24 October 2012

Sending "Tweets" via ColdFusion (via Twitter4J)

G'day:
I'm writing an application than needs to send Twitter status updates.  This is an augmentation of the ColdFusion Bugs RSS feeds I have (in the box on the right); I'm gonna send tweets out when a new bug is raised as well.  Or that's the idea.

To do this, I need to work out how to send Twitter status updates (which sounds much less daft than "tweets") from ColdFusion somehow.

This is probably well-trod ground, but the CF-based resources I initially found are all out of date, so I thought I'd post the results of my investigations here in case they're helpful to anyone.

Sunday 21 October 2012

CFML: Organise yer apps properly

G'day
This is kinda a follow-up / continuation of the article I wrote the other day on how a request/response comes together, from the client browser initiating it, through to ColdFusion servicing it, and back to the client browser again.

It also stems from me opting to rebuild my PC over the weekend (started on Friday... it's pretty much done now: Sunday afternoon), and therefore reinstalling ColdFusion and getting all my apps up and running again. For those that had a laugh about me running Vista before, I've just upgraded to Windows 7, which garners less derision from those who... for some reason give a shit about that sort of thing.

Sunday 14 October 2012

I've picked a framework. Well: you've picked it for me (UPDATED)


G'day:
Right, so it's 07:45 on Saturday, I've been up since 05:00, and I'm at LHR sitting at the gate for my fortnightly trip to Ireland to see my son. And I've got an age to wait before boarding, so I'm gonna get as much of my article written as I can on which framework you've decided I should use (based on me following the groupthink).

Firstly: thanks everyone for filling-in my frameworks survey: it got over 50 responses - and fairly quickly - which is great. I've parked it now.

Here's the analysis of the breakdown.

Oops
Thanks to Seb (in then comments) for pointing out some errors in my analysis.  It seems that in the process of transferring data from various devices and apps I'd copy and pasted some stuff incorrectly.  And I concede I did not recheck them before committing them, which is a bit of a schoolboy error.  I'm glad someone is paying attention to what I'm doing (as I'm clearly not!).

So, anyway, I'm updating the results below (and will indicate clearly where they've changed).

One thing to note... the bottom line now has me using a different framework than I had indicated I was going to yesterday...


Thursday 11 October 2012

Thanks Dave Harris: a footnote about getMetadata()

G'day:
I'm following up on some comments people have left against various articles I've written recently: cheers for the thoughts / advice / general input, everyone.

I've updated my article about creating a query and populating it with data in one fell swoop in CF9 to reflect a tip Brian Swatzfager offered me, and tested out some UTF-8 stuff that Nik Stephens reminded me of in my article questioning what Adobe were thinking with their implementation of pageEncoding.  Thanks for the input you fellas.

However something Dave Harris (with whom I used to work, back in NZ) said in response to this article about my expectations of how getMetadata() works warranted a brief article of its own, to get it onto people's radar.

CFML: Clarification (in my mind) as to how this.[various settings] work in Application.cfc

G'day:
This might be another one of those "Adam states the obvious" articles. Sorry, but I freely admit two things:
  1. not to know everything already;
  2. to be a bit slow on the uptake sometimes.
So if you fall into those categories too, then maybe this will be worthwhile to read. Apologies to the rest of you.


One of the good things about helping out out on various ColdFusion forums is that the problems people have are not necessarily based on things I find myself doing on a regular basis, so encourages me to consider different approaches to things, and to think outside my own personal box. And this means I broaden my exposure to various facets of ColdFusion that I might not normally be exposed to. I would say I've learned more about CF by helping people solve their challenges than I have from my day-to-day work or any amount of reading blogs or articles detailing other people's investigations. That's not to say you should immediately stop reading... hey... aah... come back!

Ahem. Anyway.

Yesterday a person with the rather interesting name of Aegis Kleais was having a challenge with application-specific custom tag paths. The full thread is here, but it's long and drawn out, so I'll summarise it all below to save you... um... clicking on a link and reading the original.

Oh, before I start, I'd like to personally acknowledge Jason Dean's help and persistence on the forums. Jason's one of the more-clued-up ColdFusion community members out there, so it's an excellent asset to Adobe's forums that he mans-the-pumps there (as it were). I also like Jason's style because - and he might disagree with me here - he can be almost as grumpy as I tend to be, and doesn't shy away from having and expressing a strong opinion when he has one.  Cheers Jason.

Right, what was Aegis asking about?

Aegis (I'm gonna steer clear of personal pronouns unless I get the wrong gender...) was investigating the usage of per-application custom tag paths.  Just some background here.  In the olden days (like up to and including CFMX7 I think) the only place one could set a custom tag path was in CFAdmin, which is a server-wide setting.  These days they're settable in Application.cfc, with the this.customTagPaths setting.  Aegis was leveraging this application-specific approach and had mapped a directory, then called a custom tag on a subsequent line of Application.cfc.  But it was erroring: it just wasn't finding the custom tag file.  If the tag was placed in the same directory as Application.cfc, it ran fine. If the tag call was placed in one of the event handlers within (eg: onApplicationStart() or onRequestStart()), it worked fine.  So it wasn't a syntax or pathing issue.  Weird.  I verified this behaviour on CF8->CF10, and Railo too.

This initially flumoxed me, and I was about to suggest it was a bug when something occurred to me, and I had a watershed moment when I suddenly worked out how Application.cfc works in regards to all those this-scoped settings we use.

I thought about any other code I might run:

component {
    this.foo = "bar";
    
    // other stuff here
    
}

That code sets a variable, this.foo.  That's all it does: sets a variable.  No other action takes place.  I might subsequently do something with that variable that makes excellent stuff happen, but that's not what's happening there.

So what's this code doing:

component {

    this.name            = "myApplicationName";
    this.customTagPaths    = "/path/to/the/custom/tags/";

    public void function onApplicationStart(){
        // stuff
    }
    
    // etc

}

We all recognise this as an Application.cfc file, but it's still just some CFML code, so what is this line of code doing:

    this.customTagPaths    = "/path/to/the/custom/tags/";

It's setting a variable.  That's all it's doing.  It does not say this:

    setCustomTagPaths("/path/to/the/custom/tags/");

If it was saying that, we could reasonably conclude that subsequent to that line of code any custom tag calls would find tags in  /path/to/the/custom/tags/.

But all it's doing is setting a variable.

So I found myself thinking, "OK, what's going on then?  How does this all work?"

It occurred to me that it seems like - under the hood - the ColdFusion server is doing this (pseudocode):

appSettingAndHandlers = new Application() // ie: instantiating Application.cfc

theApp.setName(appSettingAndHandlers.name) // because name was set as this.name, it's exposed as a public variable
theApp.setCustomTagPaths(appSettingAndHandlers.customTagPaths) // use the exposed value for customTagPaths to actually make the custom tag paths
//etc

if not theApp.started() then
    theApp.start()
    appSettingAndHandlers.onApplicationStart()
/if
// etc

So what happens is - the same as any other CFC instantiation - the "calling code" (which is within the inner workings of the ColdFusion server) instantiates Application.cfc, which causes all the pseudo-constructor code to run, and then it accesses the settings created in that code to perform various other actions / config / settings etc.  But the crux is that just like when we instantiate a CFC then use it, all the pseudo-constructor code completes before anything is done with the values. This makes sense. Doesn't it?

This actually explains a situation  had in the past wherein I was creating an application-specific mapping with this.mappings, then trying to use a path leveraging that mapping in my ormSettings.cfcLocation value.  And for the same reasons, this did not work.

Anyway, with a combination of Aegis's own investigations, and guidance from Jason any myself,the problem was sorted out.  And I now know something new.

Cool.

--
Adam

Tuesday 9 October 2012

Missed marketing opportunity?

G'day:
This is more on the "CF10 in the UK" thing that I wrote about recently.  First things first, I'm gonna reproduce a comment Rakshith made against one of the other articles here, so as to clarify things:

Hey guys, I was not referring to UK when I said 'over there'. UK was never in the context of this conversation. I was referring to <cfmldeveloper>.<com> and not UK. My bad that I should have just said <cfmldeveloper>.<com> than saying 'over there'. Sorry for the confusion.

P.S. I have better access to data than anyone could possibly have to make a ridiculous claim that Adam is the only in UK using CF10 :)

Friday 21 September 2012

expandPath() weirdness

G'day
I had an odd one today.

I was getting some weirdness with this code:

dir            = expandPath(".");
baseDir     = expandPath("/");
relativeDir    = replace(replace(dir, baseDir, ""), "\", "/", "ALL");
cfcPath = replace(relativeDir, "/", ".", "ALL");


Wednesday 19 September 2012

RSS feeds again

G'day:
I blame Simon for this post ;-)

OK, so I've turned the full feeds back on, but I've made a coupla smaller feeds as well.  Here're the details (also to be found on the right-hand side bar):

The default feed is the one provided by BlogSpot by default, which lists the last n articles (I didn't count how many), and provides the full text.

The other two are provided by Feedburner, and just give the last ten full articles, or the first 500 chars of those articles, respectively.

I hope this covers all the bases for everyone (when I say "everyone" that's bigging-up the half dozen people who read this thing ;-)

I'll have a proper article up at some stage later today.  I meant to write something decent yesterday, but got bogged down on the Railo forums all afternoon, "politely discussing" [cough] some vagaries of Railo I'd found. This was basically the follow-up from that previous article I wrote about the member function methods Railo has for arrays (arrayFindAll(), arrayReverse() (RAILO-2070), and arraySort() (RAILO-2069: already fixed!)), and some back and forth on Railo's <cfdump>.  Inspiring stuff.

But first I need some breakfast (am not working today).

Righto.

--
Adam

Tuesday 18 September 2012

Bloody RSS feed (and bloody stupid me)

G'day:
The guys @ CFHOUR pointed out to me that I had my RSS feedback configured incorrectly, in that it was spewing out each entire article instead of just the "above the fold bit".

Friday 14 September 2012

Improving CFML's documentation

G'day
I started rambling on in response to a thread on the Railo newsgroup, but after I'd typed about 500 words I thought it was getting a bit long for a forum response, plus it's relevant to more than just Railo anyhow, so I'd centralise it here, and put a summary on the forum and a link back to here.

The gist of the bit of the discussion I was interested in is this bit:

Alan Holden said:
On the documentation front... and this transcends Railo a bit:

I wish there was a "CFML Rosetta Stone". It would be something like CFDocs, but with a matrix architecture so you could quickly x-reference a tag or function across ACF, Railo and OpenBD (& even desktop, cloud, Jakarta, Tomcat versions, etc). This would help us develop apps that worked across the spectrum, help us solve those "it worked here, why not here?" bugs, and thereby help to advance CFML in general - to the benefit of all.

Unfortunately, this will probably remain a wish for some time... for it would probably need to be housed and managed separately, and would take a little chunk of time (and money) to develop and maintain.

Saturday 21 July 2012

Joe Rinehart's thought-provoking video

Joe Rinehart released a very forthright and thought-provoking video about what he perceives to be some significant issues with ColdFusion as it stands today.  If you've not watched it already, here it is:


And the URL is: http://www.youtube.com/watch?v=I1KjX5NOD7c.

I've taken the liberty of transcribing the "script" of the video here (well: I couldn't be bothered doing a 100% transcription, so it's a bullet-pointed transliteration/paraphrase), as a basis for a discussion.  I hope you don't mind Joe, and if you do: let me know and I can work out an alternative approach.  But just to be clear, the text in the grey box below is Joe's good work, not mine.  I was just the typist.