“Always develop as if the person who will be using your program is a violent psychopath… that knows where you live.”
~ Martin Golding
Mike Brunt just posted the latest in a series of articles about high-availability web site architecture, with the conclusion that “the most effective Load Balancing in a Cluster is Round-Robin with Sticky-Sessions, if it is necessary to preserve state in a single user session.”
The later portion of which would seem to be an interesting qualification.
After all, why would someone use memory-based sessions in an application meant to reside in a high-availability environment
So there I was, sitting back and reading Doug Boude’s recent post on The Model-Glue Event Lifecycle in Layman’s Terms. Good article, I thought. Nice descriptions. Then one paragraph jumped out at me and I had a sudden realization: OMG, we’ve regressed back in time.
Here’s the relevant portion of the paragraph: “The value “firstname” that we’re retrieving from ViewState is a value that was placed in the Event Bucket at some point previously in the event lifecycle, likely [sic] by one of our broadcasts. Are you seeing the beauty of the Event Object yet?”
And that’s when it struck me. For all of our MVC object-oriented posturing, here all we’ve done is to go back in time. Back when the web didn’t exist. Back when people programmed in arcane languages like BASIC and COBOL. And back when global variables ruled the land.
How often have you seen (or written) code like the following:
<cffunction name="getProductInfo" returntype="struct"> <cfargument name="sku" type="string"> <cfif not structKeyExists(application.products,arguments.sku)> <cfset application.products[arguments.sku] = this.loadProductInfo(arguments.sku)> </cfif> <cfreturn application.products[arguments.sku]> </cffunction>
Typical “if it doesn’t exist make one” test, right? Now, how many people know that under the right circumstances, this function can blow up with an error?
Here’s another take on the upgrade in ColdFusion pricing. The author compares CF, PHP, and .NET, and makes the claim the ColdFusion is worth the money because you’re more productive in it than in comparable languages. But is that true?
Thus far I’ve helped install two of the largest ColdFusion-based content management systems for two different clients, and in comparing both one thing is evident: they both just love structs.
Structs are used to return content. They’re used to hold site definitions. Section definitions. Generated page information and definitions. Arrays of structs hold navigation lists. Flags. Constants. Paths. Titles. Keywords. Anything and everything.
In fact, even when a database query returns, say, information about the current site (name, domain, url, etc.), in both systems that information is quickly transfered to a struct and it, not the query, is cached.
Why? Glad you asked:
Brian Kotek recently wrote on the fusebox5 list a short discussion on using session facades. In short you’re making a component to encapsulate gets and sets to the session structure. Why do this? Well, it turns out that there are two really good reasons: his and mine.
I read a post on Radical Bender that got me thinking about “professional” ColdFusion developers and their skill sets… or lack thereof.
In it, Ben was complaining about taking a ColdFusion competency test. To quote, “…the bulk of the test has to do with only the most OBSCURE parts of ColdFusion, the ones that very few people use, let alone use often. There were some things in there that in my seven years of ColdFusion experience, I’ve never used. EVER. I’ve never done JRun integration or used the Flash Remoting software or COM objects or WDDX or the Verity engine. I know OF all these things, but I’ve never had to use any of them in my life.”
Continuing, he says, “That ended up being about 90% of the test. Almost nothing on, oh, I don’t know, MAYBE THE ACTUAL FREAKING CODE THAT YOU USE EVERY DAY!”
Ryan Stewart comes back from MAX with an article discussing ColdFusion’s future. In particular, he talks about how ColdFusion now falls under the Platform Business Unit, which puts it in the same organizational unit at Adobe as Flex, Flash Player and AIR.
One of the key results, he explains, is that now ColdFusion should have an “even closer integration with Adobe’s products.” But is that really such a good thing? Ryan obviously seems to believe so, but I’m not so sure.
My name is Michael Long, and I'm a technology consultant and specialist in web architecture, web design, and internet software development.
From mainframes to minis, from servers to personal computers to tablets, I've spent years designing the systems, writing the applications, and managing the teams that bring concepts and ideas to life as useful, profitable applications.