Sunday, July 17, 2011

05 MVC in ColdBox

This post continues with the project we set up in the create a ColdBox project post. It is basically an empty project with an advanced application type skeleton.

For now we will ignore all the advanced stuff and focus on how to handle a simple form in the MVC pattern as ColdBox has set it up. We will focus our attention on four folders in our new project:

Model
  • model folder
    The model folder will contain classes that define our business logic and persistence logic to name a few.
View
  • layouts folder
    The layout folder contains files that depict our general look and feel.
  • views folder
    Beside a general look and feel, each different page in your website will have different details to show. The views folder will hold files that generate those details and ColdBox will inject them into your layout files.
Controller
  • handlers folder
    The handlers folder will contain our workflow; it defines event actions that will usually be called by browser events. For the scope of this tutorial, it will only be called by browser events.

Lets put this to the test and try handling a simple form.

No comments:

Post a Comment