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

CFWheels - DeObfuscate ID on query paging?

I am obfuscating URL's in my app (which is great), but I'd like to disable this for pagination URL's because I'd like the user to be able to enter whatever number they like. Settings.cfm: Home.cfc…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
2
votes
2 answers

How to process 1 form across 2 controllers/models in MVC (CFWheels)?

I'm an old CFML developer, new to CF on Wheels and MVC programming in general. I'm picking it up pretty quickly, but one thing that isn't evident to me is how one can offer a form to optionally update multiple db table records (models). I'd…
Brian D
  • 833
  • 7
  • 11
2
votes
3 answers

CFWheels - How to have a form self post?

I'm new to wheels and still learning. It seems to me that every post of a form needs to call an action that maps to a method in the particular model. However, is it possible for a form to post to itself? What I want to avoid is people navigating to…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
vote
1 answer

CFWheels Nested Properties and hasManyCheckBox

I am trying to figure out how can I update the petevents table with several events. I get no error, but it is also not updating/inserting. Here are the relevant code snippets and the schema for the relevant tables follows. View
dbinott
  • 911
  • 1
  • 11
  • 36
1
vote
2 answers

cfwheels, getting errors from an unsuccessful model update

I'm trying to update a model with nested properties after an edit. The update fails, but I'm not getting any errors using #errorMessagesFor(objectName='myobject')#. Any idea how to get to the cause?
Daniel
  • 34,125
  • 17
  • 102
  • 150
1
vote
2 answers

ColdBox vs CFWheels

I am migrating a site built in Coldfusion (no framework) to a coldfusion framework. Right now it looks like a choice between ColdBox and CFWheels. The database is MS SQL. I was wondering if anyone has migrated an existing site over to either of…
redconservatory
  • 21,438
  • 40
  • 120
  • 189
1
vote
1 answer

How do I scope a variable so that its available to other functions in the same CFC (a CFWheels plugin)?

I want to add a variable that can be accessed by all functions in a plugin, but I'm getting a variable undefined error. Here's my plugin: component mixin="Controller" { public any function init() { this.version = "1.0"; …
Mohamad
  • 34,731
  • 32
  • 140
  • 219
1
vote
1 answer

Many to Many relationship with cfwheels without composite keys

I've been following the information from here: cfwheels.org/docs/1-1/chapter/nested-properties I've ended up downloading a sample application which breaks down at the same place code executes fine, in the sense that I get no errors, but the…
Daniel
  • 34,125
  • 17
  • 102
  • 150
1
vote
0 answers

Error when passing dynamic data in CFWheels application

I am just learning how to create CFWheels Application. I have set up my CFWheels application by following their documentation. In my Controller, I have this code component extends="Controller" { function hello() { } } In my view, I have…
user21423144
1
vote
1 answer

Validate Github Webhook HMAC Signature Lucee Coldfusion and CFWheels

I am trying to verify the signature of my webhooks from github. Following their documentation, there is only an example for ruby: post '/payload' do request.body.rewind payload_body = request.body.read verify_signature(payload_body) push =…
1
vote
1 answer

url rewriting with railo tomcat apache for cf wheels

I am new to cf wheels and would like to enable url rewriting. I have my wheels folder on a subdirectory at the root of my host. I believe I have my .htaccess file set up correctly but don't have the proper apache settings to enable url…
basil
  • 690
  • 2
  • 11
  • 30
1
vote
1 answer

How to reload Model methods on CFWheels?

I have a model like this: ... I am creating the…
Rodrigo R.
  • 25
  • 3
1
vote
2 answers

Add a custom method in a Model using CFWHEELS

I am trying to add a custom method on one of my CFWheels Model but I am not able to do this. I have been reading the documentation but still not found an answer. User.cfc component extends="Component" { ... function getCustomSearch(){ …
Rodrigo R.
  • 25
  • 3
1
vote
2 answers

Workaround issue of Helicon Ape .htaccess RewriteRule from modifying Content Type

Issue: Using .htaccess in IIS7.5 using Helicon Ape with the last RewriteRule which when left uncommented drops the Content-Type from the Response Headers as viewed by Chrome inspector (see example screen captures below). This occurs to the…
Micah
  • 1,221
  • 17
  • 42
1
vote
1 answer

Is this a good approach to dealing with tagging?

Can this code be optimized or re-factored? Is this an optimal approach to tagging? The following code is a callback in my posts model. It creates a record that associates a tag with a post in a QuestionsTags joiner table. When necessary, if a given…
Mohamad
  • 34,731
  • 32
  • 140
  • 219