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
2 answers

How do I use WordPress alongside CFWheels?

Anyone with a bit of experience with CFWheels will know how awesome it is, but also how fiddly it is with its placement in the web root / sub-folders etc. I have a CFWheels website, that I would now like to place alongside a WordPress…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
vote
1 answer

CFWheels - Multi-step form?

I am wondering how one would setup a multi-step form in CFWheels. Clearly I would need to store form data in the session etc as I go, but I would like to know the best approach from a wheels perspective to do this the 'wheels way'. Do I have just…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
vote
2 answers

CFWheels - How do I increment a number in a database column?

Just wondering, with CFWheels ORM, how I go about incrementing a number in a column? In straight up SQL I would do something like: UPDATE table SET field = field + 1 WHERE ... I'd like to avoid "fetching" the value from the column and…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
vote
2 answers

CFWheels - Error inserting record with save() method

I get the following error on Railo with CFWheels when using save(): Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
vote
0 answers

Issue with getting struct keys in Railo

Building an application with Railo and cfWheels. I created a form with groups of radio buttons. Each group having the same name and the name being an array reference e.g (response[1]). There are 23 groups. Each time I submit the form and I fetch the…
yomexzo
  • 665
  • 1
  • 6
  • 22
1
vote
1 answer

cfwheels - deleting records with multi-level nested properties

I've got a model that has a nested property, which has more nested properties. Let's say house hasMany pets has many legs It works easily enough when there is just one level, but with two, I'm getting an error when deleting the pets, because the…
Daniel
  • 34,125
  • 17
  • 102
  • 150
1
vote
2 answers

How to rename the primary key field in CFWHEELS?

This is what I've tried... but for some reason "model("user").primaryKey() is still returning the old "User_Id" column... UPDATE The…
Joshua F. Rountree
  • 1,462
  • 2
  • 14
  • 30
1
vote
1 answer

CFWheels - How can I use the errorMessagesFor after a redirect?

Is there any way to use the #errorMessagesFor()# method after a redirect in the controller? Reason I ask is that I want the form to stay on the same page. I have a URL like: /link/submit/ With a form that posts to: /link/linksubmit/ But I want it…
1
vote
2 answers

CFWheels - How can I validate a form in a model then do a lookup and output a different message?

In my "link" model I have some basic validation, one of which is to check if the link the user is submitting is already in the database. If the link IS already submitted to the database, I want to let them know that and forward them to the link that…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
vote
2 answers

CFWheels - Validate two different forms using the same model

I'm new to wheels (and I'm sure I'll be posting here a lot) so bear with me. I have two forms "register" and "login" under the controller of "user". So my URL's look like. /user/register/ /user/login/ At the moment in my models folder I simply have…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
1
vote
2 answers

CFWheels - Record not being inserted

I'm new to CFWheels and frameworks in general. I'm following the screencasts on the Wheels website: http://cfwheels.org/screencasts/ I was following the tutorial exactly as is...the only difference is, where his table is named "people", mine is…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
0
votes
1 answer

Coldfusion 9 and MSSQL 2008 R2

Ok... developing a new website using CFWHEELS framework on CF9 & MSSQL 2008 R2 Everything is working fine except that after I insert some data to the DB and request the primary key it return invalid. At the begging I thought was a CFWHEELS bug so I…
Medrise
  • 81
  • 1
  • 1
  • 6
0
votes
2 answers

cfwheels and object helpers

I've got a set of processes I frequently do to a model that I keep redoing in the controller, and I'm wondering if there is a way to implement it through a function in the model, so that I can just call the model function pass some parameters and…
Daniel
  • 34,125
  • 17
  • 102
  • 150
0
votes
2 answers

CFWheels Error: Element RETURNVALUE is undefined in LOC

I have a legacy site using CFWheels v. 1.3.3 It's hosted using ColdFusion 2018. I haven't changed anything on the site for a couple of years and all appeared to be working fine until recently when I got this error: Error Occurred While Processing…
0
votes
1 answer

How do I fix cfWheels ERROR: Wheels.TableNotFound?

I am new to Cfwheels and MVC. Cfwheels website is up and running. I have successfully completed https://guides.cfwheels.org/docs/beginner-tutorial-hello-world . Now I am trying to just test the cfwheels to mySql database connection. I have NO…
Dan G
  • 11
  • 3