Commit 058f0629 by Robbie Hott

Modified coding specifications to include text about data storage classes

parent a63d5aab
...@@ -2,18 +2,16 @@ ...@@ -2,18 +2,16 @@
All code generated by the SNAC project will be written in one of the following languages. All code generated by the SNAC project will be written in one of the following languages.
* PHP 7 (preferred) * PHP 7
* PHP 5
* Java * Java
* XSLT * XSLT
## Coding Style Specifications ## Coding Style Specifications
Source code must match the following style guidelines: Source code must match the following style guidelines:
* 4-space tabs with literal spaces * 4-space tabs with literal spaces
* Maximum line-length of 100 characters * Maximum line-length of 140 characters
* Variables and Class names follow standard camel casing syntax, with descriptive names * Variables and Class names follow standard camel casing syntax, with descriptive names
* Class names start with upper-case letters * Class names start with upper-case letters
* Variable and field names start with lower-clase letters * Variable and field names start with lower-clase letters
...@@ -21,10 +19,14 @@ Source code must match the following style guidelines: ...@@ -21,10 +19,14 @@ Source code must match the following style guidelines:
* Filenames must match the name of the class defined within (exactly) * Filenames must match the name of the class defined within (exactly)
* Directory structure must mirror the namespace structure (PHP) * Directory structure must mirror the namespace structure (PHP)
Data storage classes, i.e. those in the `src/snac/data` directory, must have `toArray()`, `fromArray()`, and `equals()` methods. *Note: any update to the data fields in a data storage class must also include an update to these three methods.*
## Test-Driven Development ## Test-Driven Development
Each class that is written should have matching and appropriate unit tests written. For PHP code, those tests will be executed using the [PHPUnit](https://phpunit.de/index.html) unit testing framework. Each class that is written should have matching and appropriate unit tests written. For PHP code, those tests will be executed using the [PHPUnit](https://phpunit.de/index.html) unit testing framework.
Data storage classes must also have tests for their `equals()` methods that test both equality and non-equality.
## Internal Documentation of Code ## Internal Documentation of Code
All code will be internally-documented using [Javadoc](http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html) style documentation, which has been ported to PHP as [phpdoc](http://www.phpdoc.org/docs/latest/guides/docblocks.html) and XSLT as [XSLTdoc](http://www.pnp-software.com/XSLTdoc/). Tools to generate documentation from the code is also available for [Java](http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html), [PHP](http://www.phpdoc.org/), and [XSLT](http://www.pnp-software.com/XSLTdoc/). All code will be internally-documented using [Javadoc](http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html) style documentation, which has been ported to PHP as [phpdoc](http://www.phpdoc.org/docs/latest/guides/docblocks.html) and XSLT as [XSLTdoc](http://www.pnp-software.com/XSLTdoc/). Tools to generate documentation from the code is also available for [Java](http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html), [PHP](http://www.phpdoc.org/), and [XSLT](http://www.pnp-software.com/XSLTdoc/).
...@@ -38,9 +40,6 @@ All code will be internally-documented using [Javadoc](http://www.oracle.com/tec ...@@ -38,9 +40,6 @@ All code will be internally-documented using [Javadoc](http://www.oracle.com/tec
* *
* Paragraphs describing the file * Paragraphs describing the file
* *
* License:
* ....
*
* @author Robbie Hott * @author Robbie Hott
* @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause
* @copyright 2015 the Rector and Visitors of the University of Virginia, and the Regents of the University of California * @copyright 2015 the Rector and Visitors of the University of Virginia, and the Regents of the University of California
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment