templates.community.html Maven / Gradle / Ivy
                 Go to download
                
        
                    Show more of this group  Show more artifacts with this name
Show all versions of spincast-website Show documentation
                Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
                
            {#==========================================
Community
==========================================#}
{% extends "./layout.html" %}
{% block sectionClasses %}community{% endblock %}
{% block meta_title %}Community{% endblock %}
{% block meta_description %}Forum and support for the Spincast framrwork{% endblock %}
{% block scripts %}
{% endblock %}
{% block body %}
    
    
    
    
        
        
        
        
            
                
                
                    
                    Forum / Help
                
                
                    The best place to get help, to make suggestions, or simply to get in touch, is the 
                    Spincast Google Group.
                
                
                    We're also scanning for questions using the #spincast tag on Stack Overflow.
                
             
            
            
                
                    
                    Developers
                
                
                
                    
                        
                        Contribution Guide
                    
                    
                        
                            - 
                                Contributions and suggestions are appreciated!
                            
 
                            - 
                                Use this Formatter (Eclipse export).
                                
                                    - 
                                        Instructions
                                        for Eclipse users
                                    
 
                                    - 
                                        Instructions 
                                        for IntelliJ IDEA users
                                    
 
                                    - 
                                        Instructions
                                        for Netbeans users
                                    
 
                                    - 
                                        If you use another IDE, or a plain text editor, look at the Spincast's core and 
                                        default plugins and follow the same standards.
                                    
 
                                
                                The only potentially controversial thing about this formatter is that we don't add a space after the 
                                if, for, etc. keywords:
                                if(someCondition) {
    // blabla
}  
                                Not :
                                if (someCondition) {
    // blabla
}             
                                Also, the max number of characters per line is 130. Use a widescreen monitor please.
                             
                            - 
                               Sometimes, formatters do crazy things and, other times, you simply don't want a section
                               of your code to be automatically reformatted. In those situations, you can use
                               
// @formatter:off and // @formatter:on to disable the
                               auto formatting:
                               // @formatter:off
String sql = "SELECT color " +
             "FROM napoleon_horses " +
             "WHERE color='white'";
// @formatter:on
                             
                            
                            - 
                                Unit/Integration tests are required.
                            
 
                            - 
                                Java 7 compatibility is required. No 
lambdas or other Java 8 specific constructs in the core and
                                in the plugins.
                               
                            - 
                                Use Guice and make everything injectable and swappable.
                            
 
                            - 
                                Prefer short methods that can easily be overrided. If some part of a method
                                could possibly be tweaked by a user, extract it to a separated method.
                            
 
                            - 
                                No 
private methods. Use protected for a method that shouldn't be public.
                             
                            - 
                                Member variables should be 
private, but a public or
                                protected getter should exist for them.
                             
                            - 
                                Prefer constructor injection, with 
final member variables, when possible.
                             
                            - 
                                Interfaces must begin with a 
"I" (IServer for example). Don't use
                                "Impl" as a suffix for concrete classes. (Well, ok, this one may be controversial too!)
                             
                            - 
                                Avoid one-liners. Use meaningful variable names. Don't be afraid
                                to be verbose if it makes your code easier to understand. "Always code as if the guy who ends 
                                up maintaining your code will be a violent psychopath who knows where you live. 
                                Code for readability."
                            
 
                            
                            - 
                                Comments in code are encouraged. Use the standard 
/** comment */ style for the 
                                Javadoc. You can use this style for comments which are not Javadoc:
                                
                                //==========================================
// This is a comment
//==========================================
String hello = "World";
  
                                But regular comment style is ok too :
                                
                                // This is a comment
String hello = "World";
  
                             
                            - 
                                All text based files must be 
UTF-8 encoded.
                             
                            - 
                                In fact, use 
UTF-8 everywhere an encoding is involved!
                             
                            - 
                                Newlines are 
"\n". No Windows's "\r\n" newlines.
                             
                            - 
                                Always use braces, even for a single line 
if condition.
                                Don't do this:
                                if(someCondition)
    // no braces... :-(  
                             
                            - 
                                Always assume a date to be 
UTC if no timezone is specified. If you
                                need to store a date, store it as UTC. Only when displaying or outputting the
                                date will you use the user's timezone, if available.
                             
                            - 
                                For your tests, try to use the same technic as the existing Spincast core tests. You 
                                probably want your test class to extend 
DefaultIntegrationTestingBase
                                or, at least, SpincastGuiceBasedTestBase. Make sure you understand our custom
                                SpincastJUnitRunner JUnit runner, which creates one instance
                                of a test class only! For our unit tests, we often start an Undertow
                                server instance even if it could be done without one: 
                                Undertow is very fast to boot.
                             
                            - 
                                Always keep the documentation in sync with your code.
                            
  
                        
                        
                            If you're able to live with those decisions, you're good to go! 
                            
                            Thank you for your contributions! 
                            
                            
 
                        
                    
                
             
            
        
    
    
 
{% endblock %}    © 2015 - 2025 Weber Informatics LLC | Privacy Policy
 Community