Basic skeleton

<?php
/**
 * Copyright (c) 2011 Laposa Ltd (http://laposa.co.uk)
 * Licensed under the New BSD License. See the file LICENSE.txt for details.
 *
 */

class Onxshop_Controller_Component_New extends Onxshop_Controller {

    /**
     * main action
     */

    public function mainAction() {

        //write here

        return true;

    }
}

Practical examples

laposa/github/controllers

Please note that each controller have it's associated template file (HTML code).

Notes:

Filenames shouldn't be using hyphens, use underscores instead.

You should never see any SQL code in the controller, SQL should be only in models.