Basic Architecture
Main Files
Coldbox is a CF / Boxlang application which means it operates like any other CF / BoxLang application.
Application.cfc
Index.cfm
Pages Vs Routes
Pages - Traditional web page structure where there needs to be a file located at the address in the URL
Routes - The URI is a pattern which tell the web server what code to run.
In ColdBox, routes can be implicit or explicit. Implicit routes allow the URI can be formatted in a certain way and ColdBox will by convention run a particular piece of code. Explicit routes are defined in the ColdBox app and allow more fine tuned control over access and other aspects of the request. We are going to focus almost exclusively on explicitly defined routes using the built in Rest Handler.
Main Folders
Views - Visual pages
Routes - defined URI patterns which trigger certain code to run
Handlers - Usually the code which runs when a route is hit. This usually handles issues such as authentication, data validation and other preliminary tasks before handing the request off to a model which constitutes the main processing the request needs.
Models - The main workings of the site
Modules - Collections of routes, views, handlers, models and other ColdBox artifacts which can be packaged as a unit and installed or removed on its own apart from the rest of the application.
Last updated