Wheels-The Fast & Fun
CFML Framework!

Build apps quickly with an organized, Ruby on Rails-inspired
structure. Get up and running in no time!

Latest From the Wheels Dev Blog

How OO Almost Destroyed a Business

I stumbled across an honest account by Marc Funaro about how OO almost destroyed his business. He spares no detail in the post, but I still think it is worthwhile to read in its entirety as a reality check for yourself. Dynamic languages like PHP and CFML have been on a quest over the past few years to be more "Java-like," adding more object oriented capabilities. These features bring a lot of promise for your code to become self-documenting and organized. But there have been undercurrents by pragmatists who contest that these features add unnecessary complexity for languages that were "fine just the way they were." As I've progressed through my career with ColdFusion, I've started agreeing more with the pragmatists. While ColdFusion experts have been arguing about "XML versus no-XML" over the past year, I've strongly desired getting my work done so I could feel some accomplishment and have a fresh breath of air away from my computer from time to time. With my personal experience, this is where ColdFusion on Wheels has entered and really brought the fun back into ColdFusion development. One thing that Wheels has done for me is use CFCs to organize my code and make database queries easier. But at the same time, I don't feel like I'm wasting too much time worrying about the design of my objects. It all just flows and works organically, and it all works that way simply by following conventions that we've laid out for you. I will forever be amazed at what David Heinemeier Hansson has accomplished by implementing the concepts of Ruby on Rails and what these concepts accomplish for me in my life as a CFML developer through my use of ColdFusion on Wheels. If you at all have felt CFML lose its magic in a way that Marc Funaro described so well, give Wheels a try. The more you uncover about our framework, the more it just makes sense. Our framework considers what ColdFusion as a platform does well and sticks with that. ColdFusion returns recordsets lightning-fast, so Wheels's findAll() methods return recordsets instead of CF's notoriously slow objects. (It also uses objects to represent data when that makes sense.) Wheels also helps you easily understand where your URLs point to in your code with its controller conventions. And hell, I'll even offer up the fact that Wheels's default URL behavior doesn't even give regard to the underlying platform. Having URLs that end with .cfm, .aspx, .jsp, etc. do nothing to contribute to the overall user experience anyway. These sentiments bring me a lot of hope for Wheels's role in the CFML community. We're pushing forward and helping you develop beautiful code using the best platform for developing web applications, period.

December 24, 2009 by Chris Peters

CFWheels 2.1 Released

Today sees the release of CFWheels 2.1. Only a couple of bug fixes since the beta, so please refer to the changelog for a list of all changes.

Download now (zip)

If updating from CFWheels 2.0.x:

  • replace your wheels folder from the one in the download, and
  • outside the wheels folder, ensure you've got a file at events/onabort.cfm and create it if needed.
  • rename any instances of findLast() to findLastOne() (this has been changed due to Lucee 5.3 having a new inbuilt function called findLast() which clashes with the wheels internals)

Happy Easter, and stay safe!

April 12, 2020 by Tom King

Wheels 0.9.1 Available

We are excited to announce the availability of ColdFusion on Wheels 0.9.1. I personally can tell you that the core team and community have really outdone themselves with this release. It is a giant step toward an impending release candidate. Here is a brief listing of what Wheels developers gain from this release:
  • Ability to set global defaults for most functions' optional arguments
  • Upgrade-friendly configuration settings
  • Support for using multiple data sources (set on a per-model basis)
  • Ability to group view helpers by controller
  • Support for sending multi-part emails (HTML and plain text in same email)
  • New PluginManager plugin that helps you find and install plugins
  • Improved Railo support
  • Lots of bug fixes and other minor improvements
Review the Upgrading to Wheels 0.9.1 chapter to see what you would need to change in your application when upgrading. Because of the big changes to the way that configurations are done, we figured this would be a good time to finish the chapter on Configuration and Defaults. More reference chapters and documentation on the functions in the Wheels API are in the works, so stay tuned.

December 27, 2009 by Chris Peters

ColdFusion on Wheels at cf.Objective() 2011

  If you're attending cf.Objective() 2011, you'll have a couple opportunities to learn more about ColdFusion on Wheels. You'll also have access to a couple prominent members of the Wheels community at the conference, so be sure to say hi!

Wheels Events Scheduled for cf.Objective() 2011

Simplifying Development with ColdFusion on Wheels: An Introduction

Speaker: Chris Peters If you're new to the ColdFusion on Wheels framework and want to give it a try, then this presentation is for you. This session will cover an overview of the conventions that the framework assumes and live coding demos of the built-in ORM, controller, and view layers. Learn how features like validation, callbacks, nested properties, filters, verification, and partials help you start coding now and clean up and refactor as you go.

Introducing ColdFusion On Wheels (Pre-conference)

Speaker: Mike Henke You’ll spend the two days working through a single concept by creating a simple blog system and learning the basics of ColdFusion On Wheels including:
  • Models, Views, and Controllers
  • Data Structures & Relationships
  • Routing
  • Migrations
  • Views with forms, partials, and helpers
  • RESTful design
  • Using Wheels plugins

March 31, 2011 by Chris Peters

CFMeetup - Intro to Wheels ORM Thurs Jan 21 6pm EST

What: "Intro to Wheels Object Relational Mapping (ORM)", with Mike Henke WHEN: Thurs. Jan 21, 6:00pm US ET (UTC/GMT-5) MEETING URL: http://experts.acrobat.com/cfmeetup/ DURATION: Approx. 1 hour Meeting will be recorded. URL will be posted after meeting at http://recordings.coldfusionmeetup.com ABOUT THIS SESSION: Our 6pm (US ET) talk on Thursday Jan 21 will be "Intro into Wheels Object Relational Mapping (ORM)", with Mike Henke. (For an introduction to CFWheels, see the recording of the talk earlier this month by Chris Peters. More at http://www.meetup.com/coldfusionmeetup/calendar/12231118/.) TOPIC DESCRIPTION: (provided by the speaker) An overview of Object Relational Mapping (ORM) and how is it used in Wheels. Learn how ORM simplifies your database interaction code. Mapping objects in your application to records in your database tables is a key concept in Wheels. We will take a look at exactly how this mapping is performed.

December 20, 2010 by Mike Henke

CFWheels Added to the htmx Server-Side Examples Page

Back in March we published an example app where we took the TodoMVC spec and built a reference implementation of the app with CFWheels and htmx. Here is a quick graphic of the UI of the app.

Todo app implemented with CFWheels and htmx

This app has now been added to the list of Server-Side integration examples on the htmx website.

htmx at it's core is html over the wire. Instead of returning JSON from backend APIs and consuming them with Javascript to build page interactivity, htmx takes a different approach. It expects actual html snippets to be returned that are swapped into the DOM. How it does it, is by extending html with a handful of additional attributes, that probably should have been there in the first place, which enable any HTML element to issue an AJAX call to the backend, specify what triggers the call, and specify how the returned HTML should be added to the DOM.

We'll be doing more with HTMX in the future so it's great to get CFWheels on the radars of the htmx project.

June 17, 2022 by Peter Amiri

New Documentation: Sending Files

Per whipped up a quick chapter on Sending Files with Wheels's sendFile() function. You may feel that sending non-HTML files to the browser is a trivial task, but this functionality makes securing those files dead simple. Thanks, Per!

December 01, 2008 by Chris Peters

Debugging plugin performance in CFWheels 2.x with FusionReactor

The Issue

Shortly after the release of CFWheels 2.0, we started to get reports of slower running requests under certain conditions. For instance, a page which might have had 1000 calls to `linkTo()` could take anything from 1-2ms to 5-6ms a call, which, after 1000 iterations, is one hell of a performance bottle neck. In 1.x, the same call would be between 0-1ms, usually with a total execution time of sub 200ms. 

This behaviour was something which could be proven by a developer, but not everyone was seeing the same results: what was the difference? Plugins (or rather, plugins which override or extend a core function, like linkTo()). To make matters worse, the performance degradation was doubled for each plugin, so you might get 1-2ms for 1 plugin, 2-4 ms for adding another plugin and so on.

So what was causing this?

Enter FusionReactor

We approached FusionReactor, who were kind enough to give us a temporary licence to help debug the issue (it's great when companies support open-source!). So next up were some tests to help diagnose the issue.

Installing FusionReactor was really simple. As we use CommandBox locally, we could just utilise the existing module via install commandbox-fusionreactor to bootstrap FusionReactor onto our local running servers, which gave us access to the FR instance, already plumbed in. As we were looking for a specific line of code, we also installed the FusionReactor Lucee Plugin and configured it track CFML line execution times using the CF line performance explorer.

This was instantly illuminating, and tracked the problem to our new pluginrunner() method. When we released CFWheels 2.0, there was a fairly heft rewrite of the plugins system. It was designed to be able to allow for plugins to be chained, and execute in a specific order, so you could hypothetically have the result from one plugin overriding the previous one in the chain.

The way it did this was by creating a "stack" of plugins in an array, working out where it was in that stack, and executing the next plugin in the stack till it reached the end. It did that via a combination of callStackGet() and getFunctionCalledName() function to do the comparison.

As you can see from the screenshot below, the line debugger clearly highlights this. This app had four plugins, two of which extended core functions.

Example of FR Lucee 4 Line Debugger

callStackGet() gets invoked 2364 times in this example, but appeared performant, only causing 10ms execution time. getFunctionCalledName() is called the same number of times, but has a total execution time of 2242ms(!). We had our potential culprit. Either way, it was looking like the combination of calling the stack and trying to find the calling function name which was causing so much pain. I suspect it's to do with how Java deals with this: I think it might be calling a full stack trace and writing it to disk on each call - at least that was the hint from FusionReactor's thread profiler (I'm sure those who have a better understanding of Java's underlying functions will chip in).

After some deliberation, we decided to revert this behaviour in CFWheels 2.1 back to how it used to work in 1.x, as the vast majority weren't using it, but were being affected by it. We'd seen no plugins in the wild which used this behaviour either, which was largely undocumented.

Obviously thanks to FusionReactor for helping us out - hopefully this gives some insight into just one of the ways FusionReactor can be used. Maybe one day I'll understand Java stack traces - maybe.

March 05, 2020 by Tom King

ColdFusion on Wheels 1.1.6 Released

Another round of enhancements and bug fixes has been fixed and incorporated into version 1.1.6 of ColdFusion on Wheels. Download it today to increase the stability of your Wheels applications. Upgrading from 1.1.x is easy. Download the zip file, extract it, and replace your application's wheels folder with the new wheels folder from the zip file. Read on for details from the CHANGELOG.From the CHANGELOG for version 1.1.6...

Model Enhancements

  • validatesUniquenessOf only selects primary keys - [Jordan Clark, Don Humphreys]

View Enhancements

  • Allow removal height and/or width attributes from imageTag when set to false - [downtroden, Tony Petruzzi]
  • Allow delimiter to be specified for stylesheets and javascripts - [Derek, Tony Petruzzi]

Bug Fixes

  • hasChanged was incorrectly evaluating boolean values - [Jordan Clark, Don Humphreys]
  • Do not perform update when no changes have been made to the properties of a model - #786 [Mohamad El-Husseini, Tony Petruzzi]
  • OnlyPath argument of urlFor does not correctly recognise HTTPS urls - [Andy Bellenie, Tony Petruzzi]
  • Pagination clause wasn't enclosed - [Karl Deterville, Tony Petruzzi]
  • Pagination endrow was incorrectly calculated - [Karl Deterville, Tony Petruzzi]

October 20, 2011 by Chris Peters

Welcome to Our Community

Welcome to Our Community - a place where like-minded people connect, share ideas,
and grow together in a positive and supportive environment.

Explore community
Wheels.dev Community

Top Contributors