Skip to content

Commit

Permalink
Comments and refactoring #8, #7
Browse files Browse the repository at this point in the history
- Cleaned DashboardLogic commenting
- Refactored all variables for AuroraCoreUI
- Removed unnecessarily commented stuff in AuroraCoreUI
- Added some comments to varibles of AuroraCoreUI
- Added CONTRIBUTING markup doc for coding style documentation
  • Loading branch information
sguergachi committed Oct 31, 2012
1 parent 132312b commit ffb3c3d
Show file tree
Hide file tree
Showing 4 changed files with 515 additions and 237 deletions.
122 changes: 122 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Official Aurora Coding Style Guide

This style of coding applies to all Aurora Engine based Java applications. <br>
This is currently a draft being put together for the first time.


***

## 1. Top of Class commenting:

* *Title* is the **Name of the Class**
* *Description* of the entire class, what it does, how it interacts with other classes etc.
* Below *dotted lines* add **name of contributors** to project.

/**
* .------------------------------------------------------------------------.
* | DashboardLogic
* .------------------------------------------------------------------------.
* |
* |
* | This Class is the Logic component of the Dashboard Screen. Its instanced
* | In DashboardUI.
* |
* | This class is supposed to handle all of the Long Processing of UI or
* | Actions generated by the Handler. Reusable processing and long logic
* | methods should go here.
* |
* .........................................................................
*
* @author Sammy Guergachi <sguergachi at gmail.com>
*
*/

## 2. Commenting Class Variables

Make a multiline comment above each variable decleration <br>
Just one simple sentence explaining what the variable is used for. <br>
**Note**: Only **1** space in between each variable and the attached comment.

/**
* Size Constant.
*/
private int infoFeedHeight;

/**
* Size Constant.
*/
private int bottomPaneHeightAdjust;

/**
* Size Constant.
*/
private int topPaneHeighAdjust;

/**
* Size Constant.
*/
private int topHeight;


## 3. Constructors

* *Title* is **Class name** with parameter **Type** in paranthesis
* *Description* includes what parameters are needed and what the constructor initializes
* Bellow *dotted lines* add the **parameter** name and Type


/**
* .-----------------------------------------------------------------------.
* | DashboardLogic(DashboardUI)
* .-----------------------------------------------------------------------.
* |
* | This is the Constructor of the Dashboard Logic class.
* |
* | The DashboardUI is required to make adjustments to the UI from the
* | logic.
* | The storage will be extracted from DashboardUI and initialized
* | here.
* | CoreUI will also be internally initialized here and extracted
* | from DashboardUI.
* |
* | NOTE: for Logic to work you must use the set(HandlerDashboardHandler)
* | method for the logic to be able to attach some handlers to UI
* | elements
* .........................................................................
*
* @param dashboardUi DashboardUI
*
*/

## 4. Inline commenting

For imporant comments regarding code behaviour use

/* Code Comment Here */

For unimportant side notes use

// Not important code here


## 5. Code Segmenting

To split code visually into sections use the following method.<br>

**Note**: must be cappital, must have 3 bars at the end, not 2 not 4. <br>
**Note**: must be **2** blank line after each section and at least **1** inbetween each section seperator

//----------------------------SECTION NAME--------------------------------//

/* Start typing code here */

//---------------------------------|||------------------------------------//


//---------------------------SECTION 2 NAME-------------------------------//
/* Etc. */

//---------------------------------|||------------------------------------//


Loading

0 comments on commit ffb3c3d

Please sign in to comment.