FOR ARCHIVAL PURPOSES ONLY

The information in this wiki hasn't been maintained for a good while. Some of the projects described have since been deprecated.

In particular, the "Ushahidi Platform v3.x" section contains information that is often misleading. Many details about this version of Platform have changed since.

This website is an extraction of the original Ushahidi wiki into a static form. Because of that, functions like logging in, commenting or searching will not work.

For more documentation, please refer to https://docs.ushahidi.com

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: psr-0 -> psr-4, include fs paths, JS style

...

Ushahidi consists of two parts: a core application in the src/ directory and a delivery layer in the application/ directory. The delivery layer is currently built using the Kohana Framework and has slightly different coding standards than the rest of the application. The Kohana coding standards are documented in the Kohana user guide. The rest of the application uses PSR-2 code style, but uses tabs instead of spaces to prevent mixing tabs and spaces across the application.

...

Class names in the core application are autoloaded using PSR-04 and all exist with within Ushahidi namespaces, and the files are all located within the src/ directory.

...

  1. CamelCased class names should be used when it is undesirable to create a new directory level.
  2. All class file names and directory names must match the case of the class as per PSR-04.
  3. All classes should be in the classes directory. This may be at any level in the cascading filesystem.

...

Javascript should follow the Airbnb Javascript Style Guide with a few exceptions

  • Whitespace
    Use tabs for indentation. Smart Tabs are allowed
  • Braces
    Braces use BSD/Allman style to match the Kohana coding style

  • Modules
    We're currently not enforcing a strict module structure, but are mostly using RequireJS CommonJS style modules

    • Module file names use PascalCase to match Kohana PHP file names

Concerns:

  • The Google JS coding style says "Because of implicit semicolon insertion, always start your curly braces on the same line as whatever they're opening" - as far as I can figure, after reading this and this, this is rubbish so sticking with current style.
  • Kohana insists PHP constants be upper case, including TRUE and FALSE. Javascript doesn't recognise these if uppercase - this might be worth changing style for.

All JS should also pass in JSHint (with our .jshintrc).

...