|Version 12 (modified by jannekevdp@…, 6 years ago) (diff)|
GSCF Development Guidelines
- for fancy user interface widgets such as accordion or tabs, we use jQuery ui (http://jqueryui.com/). Currently the CSS and JS of jQuery UI 1.7.2 (theme Pepper Grinder) are put into the /js/ and /css/jquery-ui/ folders. To use for example the accordion widget for a div with id 'idAcc' in you GSP, specify in head:
We use Nimble (which is in it's turn based on Apache Shiro): http://sites.google.com/site/nimbledoc/home (License: Apache 2.0). Authentication tags can be found at http://sites.google.com/site/nimbledoc/developer-documentation/authentication-and-access-control-tags-supplied-by-nimble.
- images are stored in /images/* and images should be grouped in logically named directories (for example: /images/icons/famfamfam/*)
- whenever images are used, optimize them for the web (in Photoshop: file --> Save for Web & Devices --> jpeg 80%)
- we develop using the NetBeans IDE tightly integrates with Groovy & Grails (install the Groovy & Grails plugin)
Tabs & Indentation
- use the following settings for tabbing and indentation
- Commit logical changesets
- When you commit a change to the repository, make sure your change reflects a single purpose: the fixing of a specific bug, the addition of a new feature, or some particular task. Your commit will create a new revision number which can forever be used as a "name" for the change.
- if you break the repository you have to get cake!
- In Java, naming conventions for identifiers have been established and suggested by various Java communities such as Sun Microsystem, Netscape, Ambysoft and etc. A sample of naming conventions set by Sun Microsystem are listed below:
|Identifier Type||Rules for Naming||Examples|
|Classes||Class names should be nouns, in mixed case with the first letter of each internal word capitalized. Try to keep your class names simple and descriptive. Use whole words-avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form, such as URL or HTML).||class Raster;class ImageSprite?;|
|Methods||Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized.||run(); runFast(); getBackground();|
|Variables||Except for variables, all instance, class, and class constants are in mixed case with a lowercase first letter. Internal words start with capital letters. Variable names should not start with underscore _ or dollar sign $ characters, even though both are allowed. Variable names should be short yet meaningful. The choice of a variable name should be mnemonic- that is, designed to indicate to the casual observer the intent of its use. One-character variable names should be avoided except for temporary "throwaway" variables. Common names for temporary variables are i, j, k, m, and n for integers; c, d, and e for characters.||int i; char c; float myWidth;|
Note: while class names start with an uppercase character, instances of classes are variables and hence start with a lowercase character.