Skip to content

Latest commit

 

History

History
24 lines (11 loc) · 1.19 KB

conventions.md

File metadata and controls

24 lines (11 loc) · 1.19 KB

8.0 XOOPS Coding Conventions

We don't want you to waste time when you program, so we follow the principles of Conventions Over Configuration.

Following these rules will also make easier to maintain your code in the future by other developers.

Database Conventions

  • if you have a User entity class, then pluralized forms of entity class names are used as table names, i.e. the table in the database should be named users by default.

  • Entity property names are used for column names.

  • Entity properties that are named ID or classname ID are recognized as primary key properties.

  • A property is interpreted as a foreign key property if it's named <navigation property name><primary key property name> (for example, StudentID for the Student navigation property since the Student entity's primary key is ID). Foreign key properties can also be named the same - simply <primary key property name> (for example, EnrollmentID since the Enrollment entity's primary key is EnrollmentID).

File and Class Name Conventions

  • For files that are uploaded by users, each module should use the /uploads folder