Questions tagged [cfwheels]

CFWheels provides CFML developers with a rapid MVC framework for increased productivity, organized code, and overall developer happiness.

CFWheels

CFWheels provides CFML developers with a rapid MVC framework for increased productivity, organized code, and overall developer happiness.

CFWheels is heavily based on Ruby on Rails, but it's not a direct port, and there are some things that have been changed to better fit the CFML language. The goal is to keep things simple and this shows in a lot of different areas in CFWheels.

Key CFWheels Concepts

1. Convention Over Configuration

Instead of needing to set up tons of configuration variables, CFWheels will just assume you want to do things a certain way by using default settings. In fact, you can start programming a CFWheels application without setting any configuration variables at all!

2. Beautiful Code

Beautiful (for lack of a better word) code is code that you can scan through and immediately see what it's meant to do. It's code that is never repeated anywhere else. And, most of all, it's code that you'll enjoy writing and will enjoy coming back to 6 months from now.

3. Model-View-Controller (MVC)

If you've investigated frameworks in the past, then you've probably heard this terminology before. Model-View-Controller, or MVC, is a way to structure your code so that it is broken down into three easy-to-manage pieces:

  • Model: Just another name for the representation of data, usually a database table.
  • View: What the user or their browser sees and interacts with (a web page in most cases).
  • Controller: The behind-the-scenes guy that's coordinating everything.

4. Object Relational Mapping (ORM)

The Object Relational Mapping, or ORM, in CFWheels is perhaps the one thing that could potentially speed up your development the most. An ORM handles mapping objects in memory to how they are stored in the database. It can replace a lot of your query writing with simple methods such as user.save(), blogPost.comments(order="date"), and so on.

161 questions
0
votes
1 answer

selectTag() is not prepending to label in CFWheels

In my CFWheels settings.cfm, I have the following code: set(functionName="selecttag", labelPlacement="before", prependToLabel="
", append="
", appendToLabel="",…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
0
votes
2 answers

Better way to use flash() in CFWheels?

Using the flash() in CFWheels is pretty straight-forward, but I'm at a point where I need to insert more than just one simple message. If I do 3 flashInsert() calls, only the last one ever gets shown in the output of flash(). As a work-around, I…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
0
votes
1 answer

CFWheels -Redirect user if params.key does not exist?

I have a basic controller action, which does a findByKey(). The URL would look like: /pin/show/45 However, if the '45' is not present (the params.key), I want to redirect them to just /pin/. At the moment, when no key is specified, it still seems to…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
0
votes
3 answers

Coldfusion Websocket Channel Listeners

I'm playing around with the Coldfusion Websockets and have been trying to follow this tutorial. However, I can't seem to get the channel listener part working for: "HelloWorld – Version 2: Using a channel listener". I have the code in the…
Guest
  • 381
  • 2
  • 7
  • 22
0
votes
1 answer

How to use hasManyRadioButton() in cfwheels?

The cfwheels documentation says that for using hasManyRadioButton() the property field is required. But in their example they haven't used property. Following is the example provided by cfwheels documentation.