Skip to content

Naming Conventions

nairdo edited this page Dec 1, 2012 · 11 revisions

When you write custom stuff please adhere to the rules below to avoid collisions with other developer's stuff. We've decided to standardize on using your church or organizations's domain name as the main naming prefix.

Component/Item Rule Example
Tables _<reversed domain>_<tablename> _com_mychurch_Book
Classes & Namespaces <reversed domain>.<classname> com.mychurch.Rock.Book
Assemblies <reversed domain>.<project>.dll com.mychurch.RockUtils.dll
Custom Block Location Plugins/<domain>/ Plugins/mychurch.com/
Custom API path api/<reversed domain>/ api/com.mychurch/

Custom Tables

Custom tables should be prefixed with an underscore followed by your reversed, lowercase domain name --replacing all dots with underscores.

Custom Namespaces, Classes, & Assemblies

Prefix your namespaces/classes, & assemblies with your reversed, lowercase domain name.

namespace com.mychurch.RockLibrary
{
    public class Book
    {
        public int Id { get; set; }
        // ...

Custom Block Location

Put custom blocks into the Plugins folder into a sub-folder named after your organization's domain name.

Custom API

When developing custom API extensions, developers must use a folder convention api/<com.domain>/ (such as api/com.ccvonline/) to avoid collisions with other custom developer APIs.

Clone this wiki locally