ColdFusion Muse

Muse Review - Intro to HTML 5 With Ray Camden at Cfobjective

Sitting in on the first third of Ray's HTML 5 intro. He has a "buttload" of code (his word - one wonders about the capacity but I digress) and with his usual efficiency he has posted all his sample code on github here. Great quote from Ray.

"Whenever I hear descriptions of HTML 5 it reminds me of a drug commercial. It's one sentence of benefits followed by 2 minutes of horrible side effects."

Instead of focusing on esoteric things like canvas, Ray's preso spends a lot of times on form features. This is one of the best things about HTML 5. There are simple and straightforward ways to make forms more usable. A great example is the autocomplete implemented entirely on the client side and entirely without Javascript.

<input type="text" name="foo" list="gurus">
<datalist id="gurus">
<option>Ray</option>
<option>Ben (the elder)</option>
<option>Ben (the younger)</option>
<option>Sean</option>
<option>Muse</option>
<option>
</datalist>


The really cool thing is that datalist is ignored by older browsers and picked up by more modern browsers. It sures beats having to gin up some Ajaxian bindings (not that there's anything wrong with that). There's still be times when you need use Ajax for autocomplete when you have a query to run or a huge dataset. But it sure makes those simple select fields easier and provides a great user experience. Remember you have to have that Doctype added so your browser knows to try to render in HTML 5.

As usual Ray teases out some of the most practical and useful tidbits - things that can be used immediately. Make sure and check out the excellent samples at github. Ray also recommends Can I Use - a great site to test your HTML version code.

Muse Reviews - Key Note, Day One at Cfobjective

Rakshith Naresh and Hemant Khandelwal from Adobe did an outstanding job at the keynote. They are not the most compelling speakers but like a lot of engineers their eyes light up when they engage on the topic of their favorite technology (in this case ColdFusion 10). I was impressed by the litany of efforts and initiatives they have underway - and the general direction of the platform. Key notes (some of this old news):

  • Extensive HTML 5 support (video, sockets, canvas, charts)
  • Major security enhancements
  • Better update and upgrade paths with automatic install and rollback from within the admin.
  • More thought and effort toward expanding the number of developers through extending Java skills as well as supporting the community through events like CF Objective.
I'll have more to say throughout the week as I visit some workshops. Best quote was from Ben Forta (via video) who said "ColdFusion supports HTML 4, HTML 5,...every version of HTML. ColdFusion supports HTML 6 and it's not even been invented yet".

The big news or announcement was that ColdFusion 10 will be available on the AWS cloud as an AMI in the near future in both medium and large instances with a price point of 60-80 dollars per month. The Muse thinks this will make a VPS deployment within reach of some folks who currently suffer through shared CF hosting nightmares.

Cfobjective - the Social

Cf.Ojective - the Social

Last night was the reception for Cfobjective. I met some old friends as well as some fantastic new folks. CF Webtools standouts Ed Bartram, Jason Durham and Denny Springle were all there schmoozing with the geek crowd. Dan Skaggs spoke with me about an interesting new product that I'll have to keep an eye on. I met a fellow named Steve who was originally from Ireland but his brogue was slightly disappointing (come on Steve - don't assimilate!). I spent some time With Jordan and Mike the guys from the outstanding Vivio Tech (check them out if you don't already know who they are - they have a booth). I caught up with Dan Vega. I met Steve Withington (again) and finally ended up the night hob-knobbing with Charlie Arehart, Scott Strutz (or Nathan Strozz... something with a single syllable "st" sound) and (a new frend) Darren Pywell who brought us Fusion Reactor.

Like most geek crowds we are a largely male audience, but this year's conference features a lot more women than I remember. Actually that could be my imagination but it's helped along by the fact that virtually all of them sat at the same table. That's one single table (if that gives the rest of you an idea of volume). The rest of the room gave them about 10 foot of padding and I saw many a male developer circling carefully. The Muse - who's lack of inhibition is exceeded only by a lack of modesty (and who's old enough to have fathered most of the folks here)- sauntered up and chatted with them for a while. By the time I left the reception they had at least one non-estrogen dominant member (I'm going on looks here) so perhaps they were making progress... or perhaps he was an unwelcome intruder (ticks are bad in MN). I couldn't tell.

In any case it's shaping up to be a fantastic conference and CF 10 is all the buzz. I'll be checking in throughout the day so keep an eye out for new tidbits. Remember, I'm wandering around in a Red shirt trying my best to be gregarious. Make sure and say hello!

Muse Abroad - the Ugly ColdFusian

Muse readers - next week I'll be in Minneapolis MN at the Cf.objective conference. I'll be waxing eloquent in the ad hoc room (TBD) about 2 topics near to my heard. The first is web sockets and the second is consulting. It seems like that's something these conferences could do well to address as the employment landscape changes. Indeed if you are a consultant, freelancer, company owner or whatever and you want Muse tips on getting paid, landing contracts, selling yourself and your technologies, saving troubled customers, getting beyond your skill set, hiring your first and tenth employee etc. - come to that one for a lively discussion. If you are a corporate lackey you can come too, but we may look at you suspiciously out of the corner of one eye.

I also have a new plan for cfobjective this year. Since I actually don't do a lot of hard core programming any more I'm not going to dig into a specific topic and try to gain a lion's share of expertise. Instead my plan is to:

  • Flit from room to rom and booth to booth and pick up as much general knowledge and witty banter as I can.
  • Tweet copiously from the conference about everything and anything of interest to me. My twitter handle is @cfwebtools and the hash tag for cf.objective is #cfobjective.
  • Blog a few times per day. Naturally these will not be my typical wordy tomes of dubious length. Instead I plan on a few paragraphs highlighting various workshops or interesting thoughts or even people I've met who are blog-worthy.
Of course I will mention names and companies so if you want to give me a heads up about your workshop so I can stop in and say something nice (and the Muse is always positive - no worries there), let me know. I'll be happy to oblige.

If you are going to be at CF Objective and would like to chat about consulting, working for CFWT, the next big thing, why CF is dead (again - Lord Beric eat your heart out), or anything else I'd be thrilled to meet you and hear about your latest project or pet mice or see your knitting or whatever. I'll make it a point to wear a RED SHIRT every day. I'm 6', a little pudgy, balding, with lovely blue eyes (says my wife), a little too verbal and over-confident, and I'll be hanging around everywhere like a ubiquitous traveling salesman. So don't be shy - if you see me give a shout! Let's have a drink, pants Ray, make fun of Mark Drew's accent or at least put soap in the hotel fountain or something. Don't leave me hanging.

Datasource Attribute in Application.cfc

You may know about the "datasource" property in ColdFusion 9. It allows you to create a variable in your Application.cfc file called "datasource" and then skip the "datasource" attribute of your query tags. That's pretty neato. Here's how it works. In the Application.cfc properties...

<!---Application.cfc--->
<cfscript>
    this.name = 'mort';
    this.sessionmanagement = true;
    this.datasource = 'myDsn';
</cfscript>
....
Then in any component that is "inside" of my application "mort" above I can do something like this:
<!--- myMethods.cfc --->
<cffunction name="getAllUsers">
    <cfset var 'myQry = ''/>
    <cfquery name="myQry">
        SELECT username, email
        FROM     users
    </cfquery>
    <cfreturn myQry/>
</cffunction>
Do you notice what is missing? There's no "datasource" attribute in the cfquery tag. ColdFusion automatically picks up the datasource from the Application.cfc instead. It's a nice time saving effort that reduces code and allows for fewer mistakes. Good for multi-tenant code too.

A Minor Detail

There is one issue that I was made aware of with this approach. Super genius guru Phillip Senn had a head scratching problem where he would set this variable in Application.cfc. Periodically he began getting and error which said:

The value of the attribute datasource, which is currently "" is invalid.
He tried some different things - working with the application names and extended properties of the Application.cfc but nothing seemed to help. Finally he ran the var scope checker which identifies places where un'varred variables exist inside of CFCs. He found several un'varred variables. After he fixed them the problem went away.

So if you are using this Application based this.datasource approach and you get some random errors where the variable seems undefined - or seems defined as a blank string - start looking for vars that are not properly scoped within your components. It may just fix you right up.

Able Commerce 5 on CF - Email Problem

A while back a product called "Able Commerce Builder" (ACB) was a popular (or pseudo popular) platform for CF folks. This would have been as far back as 1999. At some point they hired one of those developers who believe his technology choices are up there with the Scripture and the Holy Grail – but "he chose poorly".

He rewrote the entire application in Java with a ColdFusion facade. He moved everything into objects and the code became a byzantine maze of object instantiation and java arrays and objects and looping. Of course none of ColdFusion's strengths were on display (easy to read code, modifiable queries, list handling, looping and outputing, query objects etc. Thankfully ACB moved on to .NET and left CF behind - and good riddance! They were giving it a bad name. I trust their new platform was written by actual .NET developers - let's hope anyway. I wish them well.

Over the past couple of days ACB on CF has risen its ugly head again. I've been trying (with the help of super Tech Kevin Fatkin at Edge Web) to fix an issue with an ACB server. After an upgrade of the JVM and some hotfixes on a CF server running ACB, the customer discovered email had suddenly stopped going out. The fix for that is simple right? Check out the cfmail tags, double-check resolution, run a few telnets etc. Install a cert etc. Ah... if it were only that easy. In fact ACB under the hood (in keeping with its face melting decision making) reinvented the wheel and deployed its own Java based mail classes. Something changed, email is not going out, and we can't modify it the code in any real way. It's enough to make me want to have my leg chewed off by a Laplander. Fortunately if you have this problem we actually did find a solution.

[More]

A Whole Heaping Helping of Normal

When I'm called into a data center or large application to look at a ColdFusion performance problem I often find myself in a "war room" with highly skilled technicians and admins who may or may not know much about the JVM runtime. One of the things that require experience is knowing what normal memory patterns look like for a typical production heap. Windows admins will often go directly to the task manager or resource monitor to examine memory usage. If they are uninitiated the first thing they say is "Wow... Jrun is using a lot of memory." This often doesn't sit right to them, particularly if the site is idle. So this post is to help those windows folks (and Linux as well) to an understanding of what normal heap activity looks like.

[More]

DB Indexing Matters: Using the "Database Engine Tuning Advisor - MSSQL 2008

Here's a Muse mantra you can hang your hat on (and your overalls and duck suite as well). Application performance starts at the database. Sure JVM tuning is important. So is networking, processor power, memory, file i/o and keeping cousin Eustace from pressing the red button on the front of the server. It's all important and it all has a place. But as someone who does an interminable amount of application tuning I can tell you that after setting an appropriate heap size 8 out of 10 performance issues are DB related. And 8 out of 10 DB performance problems are related to indexing. So the first thing a Muse troubleshooter does is check for appropriate indexing.

This is often a matter of pouring over the longest page requests or queries and making educated attempts at new indexes (or removing and changing old ones). But more often than not it's simply a matter of informing the client there is no indexing and some will need to be added. This begs the question, why don't developers think about indexing when they create table schemas? Surely they can't all have come from enormous shops with in-house DBA's (who are just as likely to forget indexing in my experience). In this post I'm going to share a helpful tip for those of you lucky enough to be using MS SQL Server. The specifics below are for MSSQL server 2005 or 2008, but there is a version of this tool in the MSSQL 2000 profiler as well.

[More]

You Might be a Muse All-Star

About twice a week I have a developer send me an email chatting about their current job and wondering if they should send me a resume. The answer is always yes! Send me a resume! I mean... what could it hurt? Generally I will walk you through our CF Testing procedure and "pre-qualify" you to work on the CF Webtools (CFWT) team. Then if I have openings you might get an offer, but even if I do not have openings I can guarantee that sooner rather than later I will have openings. With 27 developers you can bet we will be looking for new CF Talent - and other talent as well. In fact, let's play "...you might be a Muse all-star".

  • If you think pouring through the latest CF 10 docs looking for "hidden gems" is the equivalent of a day at the Louvre... you might be a Muse all-star.
  • If you have turned down a night out so you could sit at home and migrate a fusebox app to FW/1... you might be a Muse all-star.
  • If you have traveled more than 50 miles to attend a meeting just because Ray Camden, Sam Farmer, Ben Forta, Ben Nadel or Sean Corefield was presenting ... you might be a Muse all-star (extra points if it was actually a webcast).
  • If you have made more than 2 useful comments on this blog... you might be a Muse all-star.
  • If you have a technical blog that I've ever linked to... you might be a Muse all-star.
  • If you have ever refactored an entire CFC service layer "just so you could see what it looked like in pure cfscript"... you might be a Muse all-star.
  • If you love frameworks but are not married to any one of them... you might be a Muse all-star.
  • If you like ribbing windows experts (or mac experts or Linux experts) but can still be friends with them... you might be a Muse all-star. (If not move back home you still need your mother)
  • If your skill set is eclectic enough to include high level skills in at least 3 IT areas including ColdFusion... you might be a Muse all-star.
  • If you think "exercising your right to vote" has something to do with the CF 10 bug list... you might be a Muse all-star.
  • If your mouth waters just a little when you hear about a programming problem that someone couldn't solve... you might be a Muse all-star.
  • If you like other developers, other people, communities both real and virtual and hob knobbing with folks who are experts at something other than IT... you might be a Muse all-star.
  • If you are ready for a change that includes well supported SDLC infrastructure, full time remote development (live where you want to), great flexibility, benefits, and a terrific community of developers... you might be a Muse all-star.

As of right now the Muse is looking for ColdFusion developers and IOS/Android developers. We are giving special consideration to any developer with a high level skill set in ColdFusion and either .NET or PHP (not dabblers - you have to be good at both). Our sales projections show us growing to add at least 4-6 developers by the end of this fiscal quarter. So if you are in the market to make a change, or if you are a contractor who loves working from home but is tired of having to gin up your own work, do please send me your resume. You can send it to jobs@cfwebtools.com or send it to mkruger - or tweet me at @cfwebtools and let me know you want to explore the possibilities.

Class Compiling Fun with ColdFusion

ColdFusion is Java - most people know this in the abstract sense. In sales meetings with the non-initiated I speak about ColdFusion as a layer of Java Services like mail, networking, jdbc, and compiling coupled with a language and syntax that offers faster development and better maintenance. I keep the conversation firmly rooted in Java because in reality this description is spot on. With the advent of ColdFusion 10 my case will be bolstered by TomCat as well - making it even easier to sell (and frankly it's not very hard if you know what you are doing).

Since it is Java you probably already know that ColdFusion takes your CFML code and compiles it down into Java Classes. In the days of CF 6 (back when I had more hair) you could use a command line to pre-compile CFML and even save off the .JAVA files. I'm not sure if you can still do that but it was a neat trick. Every time you run a cfm or cfc file ColdFusion checks (assuming trusted cache is off) to see if the file has changed and recompiles it if needed. You can see this happening with a little effort. The easiest way is to go to the /cfclasses folder for the instance you are using and delete all the class files that are there. Then run a CF page. You should see class files show up for every page and each function within the page.

Knowing (or not knowing) how things really work is very important to a high skill set developer. It amazes me to no end when developers profess they are "uninterested" in certain things regarding the technology they work with. I can't imagine Tony Stewart being uninterested in the bore size of his cylinders or the torque of 4rth gear or whatever. I'm sure Tiger Woods has more than a passing knowledge of how golf balls and clubs are made and customized. Indeed the more broad your knowledge and the more eclectic your skill set the more likely it is that you are an effective troubleshooter. The Muse (for example) has more than a little networking, hardware and server config experience. Often this is the difference between many hours of fruitless searching and a fast "Aha!" moment. With that in mind I'd like to share a little tidbit I picked up along the way (on StackOverflow from ColdFusion/Flex developer Sean Coyne of n42designs.com) having to do with compiling. It started with an error I have seen many times... "Routines cannot be declared more than once". I'm sharing this because I thought the work around was unique and I had not seen it before.

[More]

The Muse on the Radio

I was privileged to appear on a local radio show called "Success in Action" on Saturday March 25th). The host is popular local business Coach Jim Barger. He works for "Action Coach" - an organization with which I was unfamiliar. But I found his low key approach (devoid of the usual Rah-Rah marketing hype) refreshing, and he had many insightful comments for me both on and off the air. The show explores strategies for successful business growth. It was fun and exciting to be able to talk about where we have been and where we are going. Check it out.

Email Follies - How to Make E-friends and Influence E-people

Note - this is not a technical post. It's strictly intended to make people laugh or at least chuckle. And for the record I like cats.

In a recent meeting with a group of mad guitar players (meaning they have a high skill level - not that they are angry) it was suggested that I write a quick post on email etiquette for posterity. Going around the circle it became clear that each of these "normal users" - that's how us tech types think of everyone else - had stories of emails that were unintentionally vague, ambiguous, redundant and also said the same thing twice. So I thought I'd put my pen to paper so to speak and try to give my take on the proper use of email.

[More]

Web Sockets - Going Where No Muse Has Gone Before

You might wonder where I've been holed up for more than a month. Never fear - I'm still slogging away. My current project is a dashboard for CF Webtools that tracks all of our consulting activity. CF Webtools runs a custom tracking and management system as a core component of our business. This system has many cool features that have evolved over the years for tracking hours, performance, tasks, groups of tasks, assignments, productivity, estimates, deadlines etc. Myself and my VP, Jason Herbolsheimer (a brilliant programmer and manager who you would all know and love if he would ever blog), have spent thousands of hours on it to make it fit our business model of transparency, measurable productivity and cash positive block hours.

The reports and features it contains are useful, but a bit of a hodgepodge. Meanwhile, over time my role has changed considerably. Other than troubleshooting, mentoring and experimentation I'm not involved in day to day tasks directly with our clients any more. But I still monitor our overall productivity closely. Indeed, now that I'm a step back from the work I have a much better sense of what we are accomplishing and where our weak spots are. In the past I have used cfcharts called up on internal pages to show hours and individual developer performance but 3 things had changed.

  1. We now have many more developers to track (29 at last count).
  2. With 3000+ consulting hours per month the system receives a constant stream of updates, notes etc.
  3. I have a fancy new set up with 3x27 inch monitors plus a 46 inch wall mounted monitor that looked lonely and I wanted some fancy-pants dashboard to display
Ok, that last reason is simple hubris but still, it was good enough to boot me down the path. But I had some decisions to make.

[More]

Muse Rant: Open Letter to Sales People

In the immortal words of John Cleese "And now for something completely different." Please note that this post is intended to be funny. As a geek with a sort of geek sense of humor I have to say that up front or some folks may miss it. The Muse does not typically castigate sales people over the phone unless they are calling from a NY boiler room (the stock kind - I actually have an affinity for maintenance people). I'm generally nice with the goal of getting off the phone as quickly as possible. But I suppose some of these things are bubbling along inside of me all the same. If this gives you a laugh then I'm pleased, but I am not setting out to offend anyone. If you are trying to make a living calling folks to sell them something you might want to stop here unless you have a thick skin. I know you are just trying to make a living and I wish you success (but don't call me... please don't call me!!). And now....

[More]

Performance Tip - CF Builder 2 Plugin on Windows 7 64 bit

The Muse is a slow moving tools user. I just switched to CF Builder about a year ago in fact. Before that I was using CF Eclipse. I still use the venerable Homesite for quick troubleshooting on production servers or to review code. I'm using it to write this blog in fact. I have written my blogs in hand coded HTML for many years - which I'm sure, explains the copious amounts of in-line CSS throughout. But I'm a full convert to CF Builder now and have been for some time. All my "Code-for-production" work is done using CFB with integrated SVN through a local environment. Recently on one of the email lists I follow I heard a tip from mad-genius Kevin Miller (Websolete.com).

Like the Muse, Kevin runs CF Builder 2 on Windows 7 64bit as a plugin against a heavily customized version of eclipse 64bit. Also like the Muse he finds it to be an underachiever. CFB (or perhaps it's just 64bit Eclipse and we are throwing CFB in there unnecessarily) tends to use way more processor than seems necessary and at times seem to lag and catch up like a fat man at a marathon. On rare occasions when I'm editing large files or (in particular) browsing files on the network it simply peters out and needs to be defibrillated - also like the fat man I suppose. Of course I have edited the eclipse.ini file and I run a large heap. I've experimented with different GC's and other params. In the end I just kind of assumed that.... well that it was a dog like many Java desktop apps (don't judge me). And at age 46 I've learned to settle for a lot of things, so I was reasonably content to simply live with it. I know - it sounds horrible when I write it down like that (doh!).

But Kevin suggested switching from javaw.exe to the jvm.dll by adding the "-vm" switch. I had assumed that "javaw.exe" was necessary because it builds a Windows GUI. But that "GUI" is not the Eclipse gui (at least I don't think so). More likely it is that annoying system tray thingy that keeps begging me to let it spout all the wonderful things Oracle is doing while it upgrades my SDK. Anyway, with a little trial and error I found that Eclipse runs splendidly using the jvm.dll and I'm having fewer lags and problems with. Kevin's post is here if you want the full story. Let me add to his comments that I had a bit of trouble finding the right "jvm.dll". The first one I tried was apparently 32 bit. The one I needed was in the jre6 folder - which eventually I found installed elswhere on my machine. Thinking back I think the SDK install does ask for a specific location for those files - so that makes sense.

Once I had right path I opened my eclipse short cut and added..

eclipse.exe -vm "C:\Program Files\Java\jre6\bin\server\jvm.dll"

...to the target area so that I'm using it each time I open eclipse. Note the necessary quotes around the path. They are needed because of the space in "program files". As always I count on my readers to add to the conversation - just be nice. Remember I grew up on Andy Griffith, not South Park. So let's leave Kenny alone on this post. On the other hand Aunt Bee is fair game.

More Entries




Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.