Skip to content
inghamn edited this page Oct 23, 2013 · 2 revisions

Controllers are responsible for populating the Templates. They must implement a default index() action to handle the base route of /controller.

The action functions to do whatever it is that needs to happen. Additionally, they should take the Template given to them and populate it with content.

Naming

Controllers are named a certain way so we don't have to spend a lot of code in the Front Controller to load them. They are usually named in the plural since that seems to lead to the most semantically readable code.

Examples:

  • ClientsController
  • LabelsController
  • PeopleController

In the routing, we are matching the names directly. We are not doing any inflections to change what's in the url to what the name should be, other than captitalizing the first letter.

  • /clients ==> ClientsController
  • /labels ==> LabelsController
  • /people ==> PeopleController

Developer Guide

Features

Principles

  • Coding Style
  • Accessibility (Section 508)
  • Progressive Enhancement
  • Unobtrusive Javascript

Tutorials

Clone this wiki locally