Version 2, last updated by at 24 Mar 01:16 UTC

1.1. Entity naming conventions

  • Singular: single item, row, entity, object…
  • Plural: collection, a table, a list, an array…

    For example: article vs articles

1.2. Class & file naming conventions

Name your classes ComComponentBaseSomething and put them in components/com_component/bases/something.php

Example :

  • ComGrocerModelFruits goes in /components/com_grocer/models/fruits.php
  • ComGrocerFilterFruitid goes in /components/com_grocer/filters/fruitid.php
  • ComGrocerControllerFruit goes in /components/com_grocer/controllers/fruit.php
  • ComGrocerDatabaseTableFruits goes in /components/com_grocer/databases/tables/fruits.php

Exceptions :

The views are an exception to the above rule. A view's filename uses the document type that is being used to render the view.

The class ComGrocerViewFruitHtml will render the HTML document type for the fruit view, and should be placed in the file /components/com_grocer/views/fruit/html.php

Likewise you can put:

  • ComGrocerViewFruitJson in /components/com_grocer/views/fruit/json.php
  • ComGrocerViewFruitOpenflashchart in /components/com_grocer/views/fruit/openflashchart.php
  • …etc

Add your own formats at will.

1.3 Formats

Nooku will by default use the HTML format, but it also has built-in support for JSON and CSV. This means that you can append &format=json or &format=csv to almost any URL to get it's data in JSON or CSV format instead.