ColdFusion on Wheels Blog


CFWheels has moved to GitHub Discussions

Although Google Groups has served us well over the years, it’s started to lose some essential abilities and it’s looking a little long in the tooth.

We have decided that it would be a benefit to the community to migrate to GitHub Discussions. GitHub Discussions allows us to bring our community closer to where the code lives.

“People around the world are turning to open source—and to GitHub. It is becoming not only the home for developers, but a platform where people in many roles, doing diverse work, come to learn, engage with the community, and contribute to projects that advance the greater good.”

GitHub Octoverse 2020 Report

The benefits of moving to Github Discussions are numerous, but at a glance, we look forward to having better syntax highlighting, marking comments as answers, flagging threads as Answered, easily turning a discussion into an issue, and many more.

The Google Group will remain available, but we have disabled posting to the group, and we’ll treat it as a read-only archive of past discussions.


CFWheels Announces a Bug Bounty

We are happy to launch a new program that we hope will lead to a more stable framework for all of us. Effective immediately we are launching our Bug Bounty program. When we first conceived of the bounty program we were looking at programs from IssueHunt and BountySource and the main goal was to widen the field of contributors to the CFWheels project as well as crush some of the long standing bugs in the framework.

Most of these bugs are edge cases that don’t effect the core functionality of the framework and for the most part users have found work arounds for. In the past it’s been difficult to dedicate our limited resources towards some of these bugs but now that we have a growing list of monthly sponsors we would like to launch out bounty program to compensate contributors who are willing to tackle some of these.

The easiest way to get started participating in this program is to visit the issues list and look for the $50 Bounty tag. Pick an issue that interests you, clone the repo, and start working on your solution. When you think you have a working solution create a PR and submit it for review. Please read the Contributing to CFWheels chapter in the guides or the contributing guidelines in the repository for details on how to contribute to the CFWheels project.

We look forward to see how the community responds to this bounty program. Depending on how things go, we can envision expanding this program to include enhancements as well as sponsorship of individual enhancements.


CFWheels 2.3.0 Released

This is the official v2.3.0 release. It is dropping a little over a week from Release Candidate 1. We simply wanted to make sure the new CI/CD workflow was functioning before calling the release final. We feel confident that we’re good to mark this release as final. There are no new enhancement or bug fixes in this release from 2.3.0.rc.1.

Download Zip

If updating from CFWheels 2.2.x:

If should be an easy upgrade, just swap out the wheels folder.

Changelog

Please refer to release 2.3.0.rc.1 for details.


CFWheels Guides Moved to GitBook

We are glad to announce that the CFWheels Guides have been moved to GitBook.com. The good folks at GitBook are proud to support CFWheels and have granted us an Open Source Community account. We have migrated all the guides from our old provider to GitBook and will be making some more changes as we review all the links now that the domain has been switched. A few things you’ll notice right off the bat.

There is now a PDF download link to the right of the screen when viewing the guides. The link allows you to download the section you are on or the entire CFWheels Guides. Which by the way, is nearly 300 pages long. There is also a new search feature that will allow you to find topics easier. But the biggest change comes from the fact that by moving to GitBook we were able to move the guides to GitHub as well.

In fact the guides have been added as a sub directory in the cfwheels/cfweels GitHub repository. By moving the guides within the codebase, you can finally include both code changes and documentation changes in the same PR. This will make the guides more accessible to our contributors and make it easier to keep the codebase and guides in sync.

Please have a look through the new guides and let us know what you think. Oh, and if you find something that needs to be updated, you know the drill, clone, edit, and submit a PR.


CFWheels 2.3.0-rc.1 Released

This version has been cooking for a while and there have been many contributors. But since this is my first release a the helm with a new CI pipeline in place, I felt more comfortable doing a Release Candidate first.

Download Zip

If updating from CFWheels 2.2.x:

If should be an easy upgrade, just swap out the wheels folder.

Changelog

View Enhancements

  • Adds association error support via includeAssociations argument #1080 – [Nikolaj Frey]

Bug Fixes

  • onerror handler should increase user defined requestTimeout value #1056 – [Adam Chapman]
  • deletedAt should also respect timestamp mode (UTC) #1063 – [David Belanger]
  • Fixes No output from Debug() usage in plugin test cases #1061 – [Tom King]
  • Development mode will now properly return a 404 status if view not found #1067 – [Adam Cameron, Tom King]
  • 404 status now properly returned without URL rewriting #1067 – [Adam Cameron, Tom King]
  • Internal Docs in ACF2018 should now not display duplicate categories [Tom King]
  • Internal Docs search now resets itself properly on backspace with empty value #982 – [Brandon Shea, Tom King]
  • ValidatesConfirmationOf() now correctly enforces prescence of confirmation property #1070 – [Adam Cameron, Tom King]
  • resource()/resources() now allows empty only property to utilise as non-route parent #1083 – [Brian Ramsey]
  • Handle XSS Injection in development enviroment – [Michael Diederich]
  • Fix params bug in CLI API [#1106] – [Peter Amiri]

Miscellaneous

  • Update Docker Lucee Commandbox version to 5.2.0 – [Adam Chapman, Tom King]
  • Minor internal obselete reference to modelComponentPath removed – [Adam Chapman, Tom King]
  • Minor visual fix for long migration logs overflow in modal (scroll) – [Brian Ramsey]
  • Add test suite for Lucee and H2 Database to the GitHub Actions test suite. – [Peter Amiri]
  • On going changes to update the H2 drivers [#1107] – [Peter Amiri]
  • Fixes some syntax formating introduced by cfformat [#1111] – [Adam Chapman]
  • Minimum ColdFusion version is now ColdFusion (2018 release) Update 3 (2018,0,03,314033) / ColdFusion (2016 release) Update 10 (2016,0,10,314028) / ColdFusion 11 Update 18 (11,0,18,314030) #923 – [Michael Diederich]
  • Wheels save(allowExplicitTimestamps=true) doesn’t produce the expected result [#1113] – [SebastienFCT]

Potentially Breaking Changes

  • Automatic Time Stamps: the deletedAt column was using the server’s local time for the timestamp while createdAt / updatedAt were using the timestamp selected for the timestamp mode. The default for CFWheels’ timestamp mode is UTC and therefore all future deletedAt timestamps will be in UTC unless you’ve changed the default. Please review any SQL that uses deletedAt for datetime comparison.

CFWheels Fully Embraces ForgeBox Packages

As you may know, many years ago CFWheels embraced the distribution of Plugins via ForgeBox packages instead of maintaining our own directory. But the framework itself remains illusive. There was some work done in the last few months to put up packages for the framework but those packages were being maintained by hand which made them a show stopper for a long term solution.

Well, thanks to a new CI workflow based on GitHub Actions we now have the building and publishing of the packages fully automated. Giving credit where credit is due, the new workflow borrows heavily from the ColdBox workflow. It used GitHub Actions, Ant, and CommandBox to automate the process.

So what does all this mean for you, let’s cut to the chase. This means you can now install a fresh copy of the framework using the following command:

box install cfwheels-base-template

This will pull down a copy of the latest stable release of the template files and then pull down a copy of the latest stable release of the framework via package dependencies. In fact the CI workflow mentioned about publishes two packages cfwheels which is the core framework directory and cfwheels-base-template which is all the other files you need to scaffold the framework.

We’ve even backfilled all the prior released versions of the framework all the way back to version 1.0.0. So you can install a particular version of the framework using the following command:

box install [email protected]

In addition you can install the bleeding edge which includes all the work in process towards the next major release using:

box install cfwheels-base-template@be

And if you ever just need to get a copy of the latest framework files simply use the following command:

box install cfwheels

All this means that upgrading to a newer version of the framework should be much easier going forward. Frankly you should just need to modify the version of the dependency in the box.json file and issue a box update command. But we’ll document that more fully when we make our next release.

For now please feel free to play with all this package goodness and let us know if we fumbled anything.


CFWheels Joins Open Source Collective

We are happy to announce that CFWheels has joined Open Source Collective. According to their website, Open Collective enables all kinds of groups to raise, manage, and spend money transparently. We’re also in good company in the collective. Other projects hosted by the Open Source Collective include Lucee, WebPack, PHP Foundation, Vue, LinuxServer, ESLint, Bower, Svelte, and the list literally goes on and on.

So what does this mean for CFWheels. Well, it allows us to finally be able to accept donations from our community. Many of you have offered your donations to us in the past but we really had no good way to do accept them legally. Plus we felt strongly that as an open source project we needed to adopt an open and transparent accounting practices. As a member of the collective, you’ll be able to donate and see every dollar we raise and what it is spent on. Creating a sustainable ecosystem is important for the long term viability of the CFWheels project. So how do you donate, visit Open Source Collective directly or any of our GitHub projects and look for the Sponsor this project link in the right side bar.

We’ve already received our first monthly donation and we are truly grateful. These funds will allow us to offer bounties for small issues or bugs, commission larger works, and pay for marketing, logo, or branding services.


Getting the Example App Up and Running

Have you looked at the CFWheels Example App lately? If you’re wondering, wait, there is an example app?, you’re not alone. Tom has done a great job putting the CFWheels Example App together but historically getting it up and running was somewhat difficult. It requires a database to be setup, a datasource to be defined, and migrations to be run.

With the help of our new templating structure and some improvements to the CFWheels-CLI commands, getting the Example application is a piece of cake. All you need to do is issue three commands inside a CommandBox shell and the app magically opens up in your browser.

So lets get started:

wheels g app name=example datasourceName=exampleh2 template=cfwheels-template-example-app --setupH2
package install
server start

So what do those commands do for us. The first line is the longhand way to install a fresh CFWheels app using one of the published templates from Forgbox.io. This command gives the application a name, sets up a datasource, and configures it to use the built in H2 database in the Lucee CF Engine. (Are you wondering, wait, Lucee has a built in database engine?) The next line installs all our development and production dependencies into our application directory. Lastly we start the Lucee server and the application launches in our default browser.

You’ll initially see the installation verification screen.

Once you click on the Reload button, the application will reload and launch the Example App.

At this point you can login using one of the default user ID listed below.

user: admin@domain.com
user: editor@domain.com
user: user@domain.com
user: user2@domain.com
user: user3@domain.com (Pending Verification)

All of them have the password set to Password123!

I hope you enjoy playing with this Example App and it serves as a learning tool as it was intended. Please share your experience in the comments below.

EDIT: The Lucee server that starts up will have cfwheels set as its admin password.


TodoMVC Implementation with CFWheels and HTMX

Recently I’ve been playing around with HTMX and really starting to love it. So what is HTMX? From their website:

htmx gives you access to  AJAXCSS Transitions,  WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext

Introduction to htmx

And also:

Why should only <a> and <form> be able to make HTTP requests?
Why should only click & submit events trigger them?
Why should only GET & POST methods be available?
Why should you only be able to replace the entire screen?

By removing these arbitrary constraints, htmx completes HTML as a hypertext

Motivation behind htmx

So what does this all mean? Well, in its simplest form, it means being able to build modern web applications with the UX that users have come to expect, with the HTML, CSS, and the backend technology of your choice which in our case is CFML and CFWheels.

So I decide to see if I could build the TodoMVC project using no hand written JavaScript and only relying on HTML, CSS, and CFWheels. I downloaded the template project and took a look at the application specs to get an idea of what to implement.

Here is the video of the running app:

So if you want to run the app locally, you’ll need to have Commandbox installed and the CFWHeels CLI commands for CommandBox installed as well. With those two items taken care of, launch a CommandBox and issue the following commands.

wheels g app name=todo datasourceName=todo template=cfwheels-todomvc-htmx --setupH2
package install
server start

Let’s look at those lines and talk about what they do. The first line wheels g app will download the template app from Forgbox.io and create a CFWheels application and name it todo. It also create a H2 database and configures the datasource for you. The next line will install all the dependencies of our app. These include, a few CommandBox modules to make development easier, the CFWheels core framework directory and place it into the wheels folder, and install the H2 drivers into our Lucee server for out application. The last line will start our Lucee server. I’ve also added a setting to automatically run the Database migrations on application startup so the database schema is created.

You can checkout the code on GitHub. Let me know what you think.

EDIT: The Lucee server that starts up will have cfwheels set as its admin password.


Changing of the Guards at CFWheels

Hello everyone,

I was waiting to have more of my thoughts and plans ironed out before posting this message, but due to the intense interest from the community I’ve decided to post what I have, however premature.

As many of you know we have had some changes in the CFWheels core team. Several of the core team members, have decided to reduce their level of administrative involvement in the project and have stepped down from the core team. I have volunteered to take the reins of the project and we are in the middle of passing the baton as it were.

So what does this mean for the CFWheels project? 

Well, the fact that there is a transition in place at all, means the project will continue to live on. The CFWheels project has been around since 2005 and during that time different individuals have held the reins and guided the project along. This time is no different. I hope to be as worthy of a steward as those that have come before me.

So what are my thoughts for the future of the project?

From an administrative perspective I want to see what structure to adopt. Whether it is the core team structure we have had in the past or perhaps a more advisory committee structure would be better. We need to take stock of all the code in flight at the moment and try to get a roadmap sketched out. Setting up a funding structure for the project vis-á-vis Patreon.com, IssueHunt.io, BountySource.com, or OpenCollective.com. And finally looking at the legal structure of the project and if there is a need to formalize that by creating a LLC or 501.C corporation. 

At this point I have more questions than answers but I welcome your feedback and look forward to your support.