Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Naming and Syntax Convention

lu40 edited this page Sep 20, 2016 · 8 revisions

Here is a small overview on our naming convention. Older code fragments of the repository don't respect it yet.

Type Format Example1 Example2
Functions and methods camelCase toggleChecked hasRoleUser
Handlebars.Helpers camelCase
Messageformat-keys context.nearerCtxt.shortenedText profile.group.draftError course.event.edit.dateStart
HTML Class hyphens event-detail-descr kiosk-events-ongoing
HTML Class for event-handlers "js-" in front and hyphens class="button-delete js-delete-comment"
HTML ID camelCase eventTitle
  • Indent using tabs.
  • use American English for variable naming and UI-text.
  • Use feature-branches: develop new features in dedicated branches.
  • Delete code, don't comment it, we have version-control.
  • Use descriptive variable-names and explain non-obvious code with comments.
  • No TODO/FIXME-comments, make issues instead.
  • Don't hesitate to create lot of issues if you see things that should be done or discussed.