ADR-018 — Naming Convention (Hybrid Option C)
Status: Approved | Date: 2026-06 | Scope: All plugins
Context
FacturaScripts uses its own naming style — lowercase Spanish column names (codcliente, idempresa),
abbreviated PascalCase PHP classes (FacturaCliente, EditCliente). The early obeliOmed plugins
mixed camelCase columns (idPatient, appointmentDate) with FS conventions, creating inconsistency
at every join boundary.
Decision
Adopt a hybrid convention (Option C) that is internally consistent within obeliOmed while accepting the FS naming as-is at join points.
| Element | Convention | Example |
|---|---|---|
| obeliOmed tables | obelio_<plugin>_<entity> snake_case English singular | obelio_scheduling_appointment |
| obeliOmed columns | snake_case English | appointment_date, id_patient |
| PHP classes | PascalCase English | Appointment, AppointmentRoom |
| PHP methods | camelCase English | getNextAppointment() |
| PHP variables | camelCase | $patientName |
| Constants | SCREAMING_SNAKE | STATUS_IN_WAITING_ROOM |
| PHP files | Match class name | Appointment.php |
| XML views | Match FS pattern | EditAppointment.xml, ListAppointment.xml |
| CSS classes | obelio- prefix kebab-case | .obelio-appt-card |
| Translations | English phrase as key | "Appointment date": "Fecha de cita" |
| Code comments | English (mandatory) | See ADR-030 |
| FS core joins | Accept FS naming as-is | JOIN clientes ON clientes.codcliente = ... |
Legacy oft_* tables are renamed to obelio_* in planned refactor migrations (see ADR-025).
Consequences
- Internal consistency across all obeliOmed plugin code
- Clear visual boundary between obeliOmed tables (
obelio_*) and FS core tables (clientes, etc.) - Developers from modern PHP backgrounds find the code readable
- FS community developers see slight divergence from FS conventions in plugin-specific code