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
27
votes
6 answers

HTTP Error 500.19 with 0x8007000d on IIS7 "Malformed XML" in web.config

I'm forced to rebuild my machine from factory default. Everything should be the same, IIS version (7.5), OS (Windows 7), and my website files. However, something is different because after configuring my website and pulling the local site up in my…
Chris Geirman
  • 9,474
  • 5
  • 37
  • 70
8
votes
1 answer

Create an excel file export with non standard column names (with spaces) using cfwheels, coldfusion and cfspreadsheet

This is more of a how-to than an actual question. (I searched and couldn't find a solution, so I came up with this) I needed to create an excel file export that would allow users to : filter the data using a form, from the original table Export the…
Bob Marley
  • 238
  • 1
  • 9
8
votes
6 answers

How can I do a "deep compare" or "diff" on two Structs?

(This is a coldfusion question) I've got two different Structs that may or may not contain the same data, and I want to be able to see if they do! My Structs will always contain simple values (Numbers, Strings or Booleans) because they are being…
Jordan Sitkin
  • 2,303
  • 3
  • 26
  • 35
6
votes
0 answers

Tuckey URL Rewrite Filter with CF Wheels and ColdFusion 11

I took over an application which was built in CF Wheels in ColdFusion 10 and was designed to run on Linux. It uses the Tuckey URL Rewrite filter to clean up the URLs. I'm trying to set it up on a Windows machine and use ColdFusion 11, but I'm having…
el-kammino
  • 116
  • 3
6
votes
1 answer

Use java class in ColdFusion11 - The java object type is unknown for the CreateObject function

I have some code which works under Railo, but am trying to get this particular app working on CF10 and CF11 It's a cfWheels app, and I've got a BCrypt.class file in the /miscellaneous/ directory. In my /events/onapplicationstart.cfm file, I've…
Neokoenig
  • 1,102
  • 7
  • 16
6
votes
2 answers

Is it ok to store large objects (java component for example) in an Application variable?

I am developing an app right now which creates and stores a connection to a local XMPP server in the Application scope. The connection methods are stored in a cfc that makes sure the Application.XMPPConnection is connected and authorized each time…
Jordan Sitkin
  • 2,303
  • 3
  • 26
  • 35
6
votes
2 answers

Removing index.cfm from url with web config

quick question - Currently my urls look like this: index.cfm/camp/another-test I would like for them to look like this: camp/another-test I'm able to do this fine on apache with my .htaccess but I need to be able to do it on iis7 with the…
dspz
  • 61
  • 2
5
votes
2 answers

How to call a function from another function using the reference of object of a cfc?

Sorry about the question phrase. I couldn't find better way to describe it. But my problem is as follows: I have 3 cfc's namely settings.cfc, prices.cfc and helpers.cfc. These cfc's extend 4th cfc controller.cfc. The helper.cfc is as…
Tushar Bhaware
  • 2,525
  • 1
  • 16
  • 29
4
votes
2 answers

ColdFusion Converting Form Values into a Struct

I am building a form for my ColdFusion application using the naming format report[{field-name}] which when using RoR or CFWheels would give me a struct on the backend called report containing all of my field names. I am using FW/1 so all of my form…
Dave Long
  • 9,569
  • 14
  • 59
  • 89
4
votes
1 answer

Test Driven Development in OOP Frameworks

I recently starting learning test driven development, namely MXUnit, and I love the idea's behind it. I can understand the idea of using TDD with stand alone CFC's, but when it comes to using it with OOP based Frameworks, primarily FW/1 and…
Dave Long
  • 9,569
  • 14
  • 59
  • 89
4
votes
3 answers

Using hyphens in argument names

I am working with CFWheels and jquery mobile and am trying to pass some jquerymobile settings into a linkto call (mainly the data-icon attribute. I never new this before, but it appears to be that ColdFusion doesn't allow hyphens in argument names.…
Dave Long
  • 9,569
  • 14
  • 59
  • 89
4
votes
3 answers

Can I get robust XSS protection in CF11 that I can apply to an entire site without touching every query or input?

So I'm currently using CF11 and CFWheels 1.1, the "Global Script Protection"(GSP) server feature does an awful job of covering the XSS bases. I would like to extend it to block any and all tags/vectors for JS from being inserted into the database.…
gnarbarian
  • 2,622
  • 2
  • 19
  • 25
4
votes
2 answers

How to unit test redirects in cfwheels

What would be the correct way of unit testing a controller action that performs a redirect? UPDATE: I'm a core developer on the CFWheels project. The whole reason I'm asking this question is currently I'm working on enhancing the built in testing…
rip747
  • 9,375
  • 8
  • 36
  • 47
4
votes
2 answers

CFWheels - Should I be locally scoping my Wheels actions?

Say I have a very simple controller like so: In straight ColdFusion / Railo, I would be locally scoping all variables…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
4
votes
1 answer

CFWheels - Issue with filters 'except'. Conflicting action names

I have a filter setup that runs a function which checks if the user session is present on certain actions, like so;
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
2 3
10 11