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
1
vote
1 answer

cfwheels Find Records and Output as JSON Encoded

I am new to ColdFusion, currently using CFWheels Framework. I have a snippet that send a ajax request from the view using jquery post with two parameters name and time. $(".building").on("blur", function() { $.post("index.cfm/audit/building",…
Saad A
  • 1,135
  • 2
  • 21
  • 46
1
vote
1 answer

How to enable URL rewriting in cfwheels 1.4 on iis 7.5?

I use cfwheels 1.4 on Railo 4.2.2.004 on windows server 2008R2 with IIS 7.5 and can't get URL rewriting to work. In config/settings.cfm I have set(URLRewriting="On"); My web.config looks like this
Thorsten
  • 223
  • 3
  • 13
1
vote
2 answers

Display Folder Contents External of CFWheels Influence

My host provider has CFWheels set up as the root www folder I can access. However, I am trying to add a folder that is independent of the framework. In folder foo/ I added a blank application.cfc as told here in the folder. But, when I upload the…
justacoder
  • 2,684
  • 6
  • 47
  • 78
1
vote
1 answer

What are the shortcomings of CFhttp tag over CUrl utility?

This is a conceptual question, but after goggling and searching through online resources, I cannot find an answer to this small question. Any help would be appreciated. Thanking in advance. The question came up when I was using the eNOM API to…
Anurag
  • 1,018
  • 1
  • 14
  • 36
1
vote
1 answer

ISAPI Issues with CFWheels

I am working with a brand new instance of IIS on Windows Server 2012 and I am having trouble getting my CFWheels app to work. The issue it seems to be with ISAPI filters and isapi_redirect.dll because it's trying to find the file in the wrong…
Geo
  • 3,160
  • 6
  • 41
  • 82
1
vote
1 answer

CFWheels "Hello Database" in true MVC format

The "Hello Database" example at cfwheels.org includes only a controller and views. What would the app look like if it included a model? Total beginner here, and I want to know when and how to use a…
abalter
  • 9,663
  • 17
  • 90
  • 145
1
vote
1 answer

invoke component method through form returns Wheels.ViewNotFound

I've been searching for hours for an answer to this issue and have been unable to find an answer that works for me anywhere. I have been using the same method to invoke actions from cfc's, but in this instance it doesn't seem to work. This is CF9…
1
vote
1 answer

CFWheels not adding automatic validatesPresenceOf to NOT NULL field

I added a couple columns to a table in MySQL: totalSavings DOUBLE NOT NULL DEFAULT 0 totalDebt DOUBLE NOT NULL DEFAULT 0 There are several other columns in the table configured in a similar manner, and CFWheels is appropriately adding a…
Chris Peters
  • 17,918
  • 6
  • 49
  • 65
1
vote
1 answer

I need to directly open the edit form for a particular record in a jqgrid from another page

I need to open the edit form for a particular record in a jqgrid from another page. Do I need to capture the load event in jqgrid then pull the id out of the URL and manually select the record or is there an easier way? Due to paging the record is…
gnarbarian
  • 2,622
  • 2
  • 19
  • 25
1
vote
1 answer

What are some of the best practices while using CFWheels framework?

Although this is more of general question but it will extremely helpful for newbie like me to get the benefit from more experienced people on stackoverflow. I have read the ColdBox wiki ColdFusion best practices. I have searched same for the…
Tushar Bhaware
  • 2,525
  • 1
  • 16
  • 29
1
vote
1 answer

View - Controller Issue in CFWheels

I am using CFwheels for a site that I am creating and need to use a nested view. However, when I submit the form on the popup view, the component doesn't seem to work. Below is some test code that I am using (when I use the view in the popup as an…
Geo
  • 3,160
  • 6
  • 41
  • 82
1
vote
2 answers

Coldfusion OutOfMemoryError (CF9/Wheels)

I have a function which loops over a query and updates a database row for each item. After about 7000 iterations it's throwing an out of memory error - Java heap space. Is there anything obviously wrong with this code ?
1
vote
1 answer

CFWHEELS Asynchronous AJAX calls return wheels action not found

I seem to be encountering a situation where multiple asynchronous ajax call are causing cfwheels to return an action not found error. I noticed when I add async:false to my ajax call I get a successful response but when I don't add that I randomly…
osekmedia
  • 633
  • 7
  • 14
1
vote
1 answer

How do I return JSON from an action in CFWheels?

I've been reading a lot about returning JSON in CFWheels...it all looks straight forward, but all I ever get is a blank page with no JSON returned. I may be doing something really obviously wrong here. Here's my action: public void function ajax() {…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
vote
2 answers

How to redirect non-existent action in CFWheels?

I have a basic app going and I want users to be redirected to the main base action if an action they try to reach is not in the controller. I have some routes set up: addRoute(name="pinShow", pattern="pin/show/[key]", controller="pin", …
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140