Contributing
There are various ways to contribute:
-
Join the mailing lists and answer
questions raised by users.
-
Participate in discussions around new features, bugs and documentation.
-
Report bugs and features on JIRA.
-
Contribute new controls, features and patches to JIRA.
Click Extras
Click Extras provides a place for people to contribute their own code to the
Click project and have it package with the standard distribution. Contributed
code will be subject to review and may require modifications before it is
included in the Click distribution.
Design
One of the overriding design principles with Click is to keep it simple, this
makes the code easier to understand and more reliable.
Another guiding principle is YAGNI (You Ain't Going to Need It), or don't build
it until you really really need it. Click is trying to provide an 80/20 rule framework
where 80% of peoples needs are meet by a framework which is only 20% in size.
When developing Click Extras contributions please follow these principles.
Auto File Deployment
To make preconfigured resources (templates, stylesheets, etc.) available to web applications
Click automatically deploys configured classpath resources to the /click
directory at startup (existing files will not be overwritten).
To enable your controls to deploy resources on startup place the resources
in the Click Extras JAR directory 'META-INF/resources/'. See the section
Deploying Custom Resources
for more information on resource deployment.
Coding Style and Practices
Click follows the Sun conversions for Java code style. Other style conventions
and practices include:
- indents are 4 spaces wide and no tabs are used
- public and protected visibility members require Javadoc
- private and package visibility members do not require Javadoc
- favour the use of unchecked RuntimeException and avoid creating new Exception classes
- check method parameters and throw IllegalArgumentException if parameters are null or invalid
- avoid creating any more classes than you need to get the job done
- localize control messages in the classes properties files
- use the Context.getLocale() method to obtain a users locale
- before checking in code run the Ant task: ant format-java