JavaScud | Forum | JIRA | Blog |
  Dashboard > SpringSide > Home > SS20Codingstandard
  SpringSide Log In View a printable version of the current page.  
  SS20Codingstandard
Added by calvin, last edited by calvin on Oct 14, 2006  (view change)
Labels: 
(None)

1.注释

1. 注释一定要有意义,反对自动生成一堆空的标签如空的@return。

2. Java类J必须以@author 声明作者,但无需声明日期,日期由版本管理系统管理。 

2. 多点使用@see xxx.MyClass,@see xx.MyClass#find(String),{@link xxx.Myclass}联系相关联的类。

2.代码

     代码尽量使用开源Utils类,减少自行封装。

     尽量使用Spring的Assert系列函数对函数参数进行合法校验,如Assert.hasText(name)。

     所有重载函数必须声明@Override。

3.测试

    单元测试: 重要方法必须使用JUnit单元测试。使用EasyMock隔离。

    集成测试: 对主流程尽量配Selenium集成测试用例。

4.自动代码检查

   使用IDEA,PMD,FindBugs 三重检查。

5.可移植性

    保证在Tomcat 5.5, JBoss 4.0.4, Geronimo 1.1,Weblogic 9.2 上可部署。

Site running on a free Atlassian Confluence Open Source Project License granted to WebWork China. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.3 Build:#808 May 29, 2007) - Bug/feature request - Contact Administrators