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 model.
http://cfwheels.org/docs/1-3/chapter/beginner-tutorial-hello-database
To make sure this is a programming question, what would the model code look like in the Hello World app? I'm guessing just a line or two.
First of all, the example app follows all conventions and it is very simple application so there is no need to use model.
But if you want to use model for that then it would go like this:
In model folder,
create a CFC file with name User.cfc and add following code in it
<cfcomponent extends="Model">
<cffunction name="init">
</cffunction>
</cfcomponent>
You can see there is nothing in the init function as there is no need to do anything as of now. But in case you want something you can add
<cfset table(name="users")>
in the init function.