Contents
Here at TeraTech, No Nonsense November is a time for us to get real with issues that plague the successful use of CFML. One of the biggest issues can be with your management systems.
Are you using a homegrown code framework that just isn’t cutting it? Are you being torn apart in testing? Perhaps, it’s just your deployment and change tracking processes that are slowing you down.
Well, I got news for you. You can change this for the better. These are not “unfixable”.
Let’s take a look at 5 different areas that you can improve to bring more efficiency and consistency to your programming life.
- Code Frameworks
- Content Management
- Modern Testing Environments
- Deployment Issues
- Change Tracking Management Systems
#1. Code Frameworks
“We're also seeing a lot of people on the other end of the spectrum who are what I'd call the legacy ColdFusion developers: people who learned how to use ColdFusion in maybe 2000, or 2001. They learned how to use the CF include tag and maybe custom tags, and they kind of stopped learning at that point. They're not doing object-oriented development, they're not following best practices, they're not using MVC frameworks.”- Nolan Erck, Owner and Chief Consultant at South of Shasta Consulting
From CF Alive episode, “059 Migrating legacy CFML to MVC (Model View Controller) with Nolan Erck“
According to the State of the ColdFusion Union 2018, most CFers prefer a homegrown code framework. But, the most commonly used third-party code framework application is ColdBox (followed by FW/1 and Fusebox respectively). There are a few advantages of using a third party framework over a homegrown system. For example, you can save time and resources by using a third-party app. Also, third-party apps are already tried and tested and are regularly updated with new features and bug fixes. Plus if you have problems, there are many other CFers you can ask about how to do a particular thing in that framework.
Let’s take a look at the most popular CF framework, ColdBox, and see what it can do for you. Code Frameworks help keep CF alive by saving CFers precious resources and making coding easier.
“Being willing to make the best of a tool that you know, rather than looking for the next silver bullet.” –Nathaniel Francis, ColdBox Alliance Partner
From CF Alive episode, “008 The Best REST You’ve ever Had: ColdBox REST with Nathaniel Francis“
ColdBox
So, what is ColdBox? ColdBox is a convention-based HMVC (Hierarchical Model View Controller) framework used specifically for CFML. It provides a team standard when working developmental projects. Also, it has a modular architecture. This allows for construction of hierarchical MVC apps instead of large applications. It is also incredibly easy to install especially if running CommandBox. All it takes is a simple one line command.
#2. Content Management Systems
A CMS (Content Management System) is a software application that helps to manage your digital content. This being said, having a good CMS is very important and makes CF more alive. Here’s how content management can help any CF project.
- Update your Website on your own Terms
- You no longer need to rely on third-party applications or hosts to update your web app. Simply update as you see fit.
- Extreme Ease of Use
- No need to understand in-depth language programming to build a project. This is great for CF beginners learning to build their own web apps.
- Make Simple Changes without Full Redesign
- A CMS will allow you to cherry-pick exactly what needs to be changed without doing a project overhaul.
- Access most up-to-date Web Design Features
- Constant updates to the CMS will make sure you have the most modern availabilities for your application.
- Manage your Entire Marketing System
- A good CMS will have tools for SEO, email marketing, social media marketing, and blogging. Some will even allow you to collect fees and donations, create event registration forms, and store member info.
ContentBox
ContentBox is an open-source modular CMS engine from Ortus Solutions that allows you to create websites, blogs, wikis, web apps, and RESTful web services. ContentBox can be deployed to any CFML engine or Java servlet container. It is built with an open-source MVC framework foundation (ColdBox). It is simple to install with one line on ComandBox’s CLI. ContentBox also provides modularity. Using CommandBox and ForgeBox, you can install modules and extend your app in seconds. ForgeBox modules include themes, widgets, ColdBox modules, ContentBox modules, and more. A number of built-in interception points also come with ContentBox. Along with these features, ContentBox utilizes the use of CFCs (ColdFusion Components) due to its CFML abilities. On top of all this, ContentBox is Docker friendly. It has its own Docker image which can distribute to multiple replicas with ease. Here are a few benefits of combining Docker with ContentBox:
- Embedded Database or connect to any SQL database
- Image and Application Health Checks
- SSL Support
- Distributed caching
- Distributed sessions
- Data persistence
- Custom data mounts
As of June 2018, ContentBox 4.0 was released as its latest version. One of the major developments was that Lucee 5 now powers the CLI. All third-party libraries were also upgraded. These include:
“We've got some massive applications that are being built, that are driving business and really critical business for heavy hitting companies, right. And I think that's where I'm proud to be a part of this whole initiative and I think that ColdFusion is certainly not dead and it's growing for us. And it is a technology that I think people need to try it before they go ahead and put it down.” – Elishia Dvorak, Technical Marketing Manager at Adobe
From CF Alive episode, “030 Everything CF Summit That You Need to Know, with Elishia Dvorak”
#3. Modern Testing Environment
Using a modern testing environment is critical to keeping CF alive and maintaining efficiency within your projects. The lack of a mature testing environment can lead to absolute chaos during the run-up to deploying new code. Minimize the amount of resources you will spend going back to revise broken code. This also prevents established bugs from spreading by detecting them early. There are many quality improvements that are made through using modern testing such as:
- Code Coverage
- Automated Testing
- Code Review
- Bug Modeling and Prevention
Use portable testing environments — such as CF Builder– as well. The benefit to using portable environments is making the reuse of the development environment configuration much easier.
A typical set up includes:
- A staging server where you test (ideally using Docker to mirror your production setup)
- A Continuous Integration tool such as Jenkins that automatically pushes new changes for testing
- Automated testing using TestBox
- Automatic reporting of any bugs and preventing buggy branches being merged into production code
#4. Deployment Issue Summary
A successful deployment is one that is stress free and goes smoothly. Everything should work fine. An unsuccessful deployment has constant bugs or the app is crashing. This is made even worse when different versions of code overwrite each other. The top two issues of CFers in relation to testing and deployment are:
- Too Many Bugs
- No Formal Testing
Be sure to properly test your app to catch the bugs before they get to production.
Continuous Integration (CI) Deployment Tools
According to the 2018 State of the CF Union, 44% of CFers polled do not automate or use CI deployment tools. If you are not automating your builds, you are missing out on saving time and improving your deployment and testing process. Because at the click of a button you can update your staging or production code directly from your source code repository. Never again will you forget to update all the files on your server. Plus if you spin up a new server it can be automatically set up exactly the same way as your other servers.
For those who do CI, Jenkins is the most popular program.
Other options include:
#5. Change Tracking Management System
A great way to make CF more alive and efficient for your project is to use a change tracking management system. Why do so though? If you just fix bugs as they are reported without tracking, it is easy to forget to fix some of them. Or prioritize the ones you do fix. You also can have a hard time figuring out who on your team fixed which bug a few weeks later when it causes an unexpected problem. Small changes can soon add up to a large amount of extra effort and time.
Popular change trackers among CFers include:
A new kid on the block of bug trackers is The Bug Squasher . I interviewed the founder Kirk Deis about bug tracking in general and his tool in this episode Better Bug Squashing (New Issue Tracking Tool) with Kirk Deis
What You Get With a Great Issue Tracking System
- Different access levels for clients, testers, developers, and managers
- New issues can be classified as bug reports
- Change requests available that include the date/time reported, who reported it, severity description of the issue, details on how to reproduce it, and screenshot upload
- Create a unique ID to reference the issue
- Assign issues to developers
- Auto status change of an issue between new, fixed, tested, out of scope.
- Workflow can automatically email the issue submitter and assigned developer on a status change
- Allow comments on the issue as the status changes
- Keep a history of edits to the issue
- Report on all open and closed issues by status, severity etc. Graphs of the number of issues per week
Remember to pay attention to these five areas, and your development experience should run much smoother. For those of you still not using ColdBox and ContentBox (or any of Ortus’s Box apps), you are seriously missing out on the “proper” CFML experience. Also, don’t let a sloppy change management system hold you down. Come on, you’re better than that. If you are looking for a way to revamp your ColdFusion or Lucee… here’s a great place to start.
And to continue learning how to make your ColdFusion apps more modern and alive, I encourage you to download our free ColdFusion Alive Best Practices Checklist.
Because… perhaps you are responsible for a mission-critical or revenue-generating CF application that you don’t trust 100%, where implementing new features is a painful ad-hoc process with slow turnaround even for simple requests.
What if you have no contingency plan for a sudden developer departure or a server outage? Perhaps every time a new freelancer works on your site, something breaks. Or your application availability, security, and reliability are poor.
And if you are depending on ColdFusion for your job, then you can’t afford to let your CF development methods die on the vine.
You’re making a high-stakes bet that everything is going to be OK using the same old app creation ways in that one language — forever.
All it would take is for your fellow CF developer to quit or for your CIO to decide to leave the (falsely) perceived sinking ship of CFML and you could lose everything—your project, your hard-won CF skills, and possibly even your job.
Luckily, there are a number of simple, logical steps you can take now to protect yourself from these obvious risks.
No Brainer ColdFusion Best Practices to Ensure You Thrive No Matter What Happens Next
ColdFusion Alive Best Practices Checklist
Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.
√ Easily create a consistent server architecture across development, testing, and production
√ A modern test environment to prevent bugs from spreading
√ Automated continuous integration tools that work well with CF
√ A portable development environment baked into your codebase… for free!
Learn about these and many more strategies in our free ColdFusion Alive Best Practices Checklist.