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
3
votes
1 answer

How do I render pages with "file" extensions like xml, json, csv, etc. in CFWheels with the file type in the URL?

I can't seem to figure out how to create pages in CFWheels with clean URLs that contain "file" extensions. I'd like to be able to do the following: http://www.example.com/products.xml http://www.example.com/products.json As apposed to…
Micah
  • 1,221
  • 17
  • 42
3
votes
3 answers

cfWheels - creating an object related objects

I have a new model myModel that I'm creating with a one-to-many relationship to a bunch of sub-models mySubModel that are being created at the same time. when I try to save the model:
Daniel
  • 34,125
  • 17
  • 102
  • 150
3
votes
3 answers

java.lang.OutOfMemoryError when saving a huge amount of records

I have a problem with saving a huge amount of records to database using CFWheels. Here is an example:
balytskyi
  • 303
  • 3
  • 10
3
votes
1 answer

ColdFusion Query Loop Next Value

Hello I have query array with values cat_1 abc cat_1 bbb cat_1 ccc cat_2 abc cat_2 ooo cat_3 ppo now I have to display this array in the following manner cat_1 abc bbb ccc cat_2 abc ooo cat_3 ppo I have using a table with associations to…
Saad A
  • 1,135
  • 2
  • 21
  • 46
3
votes
5 answers

How can i split up a component using cfinclude and still use inheritance?

UPDATE: Seems that railo doesn't have this issue at all. UPDATE: I'm voting to close this issue as i as feel people are focusing more on the whole "does someone have a better idea splitting up large components" part of this question (which i should…
rip747
  • 9,375
  • 8
  • 36
  • 47
3
votes
1 answer

Send query to CFWheels selectTag form helper, or list with commas in string elements

I have a query that returns names in , format such as SELECT instructor_DBID, last_name + ', ' + first_name as instructor_name, hid …
abalter
  • 9,663
  • 17
  • 90
  • 145
3
votes
1 answer

Where to put queries (especially long ones) in a CFWheels project

(wheels novice here) I'm trying to figure out the best place to put a number of large and/or complex queries that are used in the controllers function for the view. I have a view calendar.cfm, and a controller with the function:
abalter
  • 9,663
  • 17
  • 90
  • 145
3
votes
1 answer

CFWheels: Using SQL Functions in WHERE clause?

I faced an issue while trying to use SQL function in where clause of CfWheels's findAll() method. The confusing thing here is that…
Anurag
  • 1,018
  • 1
  • 14
  • 36
3
votes
2 answers

Dynamic route creation in cfwheels?

from a little knowledge of chwheels i have, i know that routes are stored in the application scope i.e. in application.wheels.routes to be precise. It also maintains the route position in application.wheels.namedroutepositions. Now i have added…
Tushar Bhaware
  • 2,525
  • 1
  • 16
  • 29
3
votes
1 answer

Alternative to preserveData attribute of cfform in cfwheels startFormTag()

There is an attribute called preserveData in the cfform that preserves the values of various controls after form submit. Is there any attribute to get the same functionality in startFormTag() in cfwheels. If not, then, I think, cfwheels should…
Pankaj
  • 1,731
  • 1
  • 13
  • 15
3
votes
1 answer

Converting from ColdFusion Fusebox 5.5 noxml

I have a large Adobe ColdFusion 9 site that uses the no XML version of Fusebox 5.5. The site does not currently use CFCs in the model. The choices have been narrowed down to either CFWheels, Coldbox, or FW/1. My question is, which of those three…
3
votes
1 answer

cfwheels - updating nested properties with a composite key table

I'm trying to get a better setup working for updating a model with nested properties. Right now in my edit view I define the textFieldTag manually to create the params struct by setting up the name as…
Daniel
  • 34,125
  • 17
  • 102
  • 150
2
votes
2 answers

How do I add a dynamic sitemap.xml to a CFWheels application?

How do I configure CFWheels to display the following XML at http://mydomain.com/sitemap.xml?
Micah
  • 1,221
  • 17
  • 42
2
votes
3 answers

How do you acquire the rewritten CFWheels URL of an given page?

CFWheels has the URLFor() function for getting the internal URL based on supplied arguments. Is there a way to get the internal URL without supplying any arguments? For example: Given a user navigates to "http://somedomain.com" or…
Micah
  • 1,221
  • 17
  • 42
2
votes
2 answers

cfwheels nested properties issue

I'm trying to get this to work... I have a five tables that I"m trying to tie together: properties, languages, propertyLanguages, buildings and buildingTranslations properties,languages and propertylanguages is a typical many-to-many relationship…
Daniel
  • 34,125
  • 17
  • 102
  • 150
1
2
3
10 11