Site maintenance can be a costly resource hog. It can cause downtime — lots of it, if not done properly.
Downtime for site maintenance is a life-draining experience…
- It draws your team’s attention away from other vital work.
- It also cuts off vital revenue streams.
- It eliminates any efficiencies created by your app or site.
This all adds up to money, unearned or wasted. Sometimes, lots of it.
Thankfully, ColdFusion has a litany of built-in tools, “hacks” and is so easy to use that makes maintenance a breeze.
That’s because Adobe designed the ColdFusion Markup Language (or CFML) and its development platform to be stable, efficient, and cost-effective.
My maintenance ritual for ColdFusion apps include:
- Updating ColdFusion to the latest version.
- Reading logs and metrics and making adjustments.
- Optimizing my database and SQL.
Whether that be through its tags-based syntax or wide range of customizable tools, CFML was built on a solid foundation that requires less maintenance than other programming languages.
That doesn’t mean maintenance-free. Apps, like all other things men have ever engineered, designed, and run, will need to undergo regular maintenance.
As the CIO, it’s your choice between using your IT team to do it in house or to bring in a fresh pair of eyes via a ColdFusion consultant (I can obviously make a strong case for the latter).
Whichever you choose, your site won’t be down for maintenance too long — if at all.
Let’s take a peek at the process!
Update your ColdFusion to the latest version
All maintenance work for ColdFusion apps starts the same way — at least for me. I check if the client is running the latest version of ColdFusion. It seems rudimentary, right? Yet you’d be surprised…
Without naming names, I’ve had some clients call me in to work on apps running on a decade-old version of ColdFusion! I had to remind myself that iteration of ColdFusion even existed.
I do my best to convince them to upgrade. There are almost no downsides! The most recent version includes modernizations that will give you the best tools and capabilities. (That is, until ColdFusion 2020 comes out… soon.)
This includes tools to help eliminate dubious code and sniff out potential problems, like Security Code Analyzer, and productivity boosts such as containerization and cloud capabilities you cannot get on older versions.
It sounds like an easy decision, right?
Those already running the latest version of CF should still check to make sure they’ve downloaded all the latest updates, to get critical patches and security fixes.
Because it’s pretty silly even starting maintenance work if your CF is still vulnerable to known security issues, some of which can be several years old.
Reading logs and metrics and making adjustments
Too often, consultants or CIOs start their maintenance work by turning to a list of known issues and bugs, and squashing them one at a time. But there’s a better way, which integrates the data and tools available both within ColdFusion, and reliable third-party gadgets.
Logs and metrics
Your app’s logs and metrics provide a big picture view of how the app is working over time. Too often, CIOs and their IT teams merely glance at them quickly. I look at logs and metrics to get a granular sense of what an app is doing behind the scenes.
Out of the box tools
Built-in tools like Server Monitor, and the oft-neglected CF Stat, give me a holistic idea of what’s going on within the app.
I then top it all off with FusionReactor, which is another efficient tool for dissecting an app’s performance.
One nifty solution I’ve found often works: deploying testing and mocking tools like TestBox and MockBox.
TestBox focuses on Behavior Driven Development, while MockBox lets you see how your app would behave “out in the wild.”
Occasionally deploying these tools in tandem during the maintenance process gives you a good idea of how your tweaks and fixes are working, or could be even better.
ColdFusion’s scalability lowers the odds of a crash from unexpected demand for your app. Still, you may have to tweak it a bit to make sure your app is ready for a popularity boom.
I often tell clients looking for ColdFusion help to test an app’s load with realistic expected use, then add some. Especially if your popularity has grown, you will need to scale up to avoid a crash during peak use.
Check your garbage collection
My friend and fellow ColdFusion consultant Mike Brunt often says garbage collection is a key way to see how the “engine” of your app is performing. (He explains the process on his blog, CFWhisperer.)
I agree. Be sure your team or consultant knows how to “read the tea leaves” or Garbage Collection correctly. Too much garbage piling up, or too frequent garbage collections, could affect an application’s performance.
Optimizing your database and SQL
The interplay between your code and your data is a major source of friction. Too often, I see clients neglect one over the other, only to find themselves in a frustrated middle where nothing works right — neither the app, nor the queries, or the speed. Nothing’s perfect.
The ideal is to find the sweet spot that lets your database and Structured Query Language work optimally. It makes your app zippy and effective. There are a few simple tricks:
- Review your indexes. Make sure all tables process data quickly and can expand. (Not sure how this is done? I’ll help you).
- Check out ColdFusion guru Gert Franz’s presentation for database tips. It’s rather intensive and extensive and includes:
- Avoid QoQ (Queries of Queries), and queries in general.
- Minimize database calls.
- Use lists, not arrays.
Every money-making machine needs to be spruced up now and then. Your ColdFusion apps and sites are no different.
Maintain and adjust your ColdFusion app frequently and precisely, and you’ll avoid many of the headaches and crashes your competition experiences.