{"text_format":"2","workbook":"xlsx","n_sheets":4,"sheets":["前端控件命名","页面名称命名","前端js规范","后端命名规范"],"not_rendered":{"charts":0,"images":2,"macros":0,"external_links":0,"defined_names":1,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"run_cost":"one","rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"前端控件命名","index":0,"n_rows":94,"n_cols":4,"rows_kept":94,"cut":false,"hidden":false,"merged":[[82,2,82,6],[83,2,83,5]]}
[null,"按钮"]
[null,null,"查询","btn_search业务名"]
[null,null,"选择","btn_select业务名"]
[null,null,"导出","btn_exp业务名"]
[null,null,"打印","btn_print业务名"]
[null,null,"浏览","btn_scan业务名"]
[null,null,"新商品","btn_new业务名"]
[null,null,"复制","btn_copy业务名"]
[null,null,"添加","btn_insert业务名"]
[null,null,"编辑","btn_upd业务名"]
[null,null,"删除","btn_remove业务名"]
[null,null,"保存","btn_save业务名"]
[null,null,"取消","btn_cancel业务名"]
[null,null,"确定","btn_confirm业务名"]
[null,null,"上传","btn_upd业务名"]
[]
[null,"控件","控件名称_业务名称"]
[null,null,"ActiveX","act_       "]
[null,null,"Anchor","btn_       "]
[null,null,"Applet","apl_      "]
[null,null,"Article","atc_       "]
[null,null,"Aside","asd_       "]
[null,null,"Audio","aud_    "]
[null,null,"AutoComplete","acp_      "]
[null,null,"Calendar","cal_     "]
[null,null,"Canvas","cnv_      "]
[null,null,"Chart","cht_       "]
[null,null,"Checkbox","cbx_       "]
[null,null,"CheckCombobox","ccb_       "]
[null,null,"DatePicker","dap_       "]
[null,null,"Editor","edt_       "]
[null,null,"Flash","fla_       "]
[null,null,"Fliptoggle","fpg_       "]
[null,null,"FloatingLayer","flt_      "]
[null,null,"Footer","fot_      "]
[null,null,"Fusionchart","fch_      "]
[null,null,"Gauge","gau_      "]
[null,null,"Generator","gen_       "]
[null,null,"Grid","grd_     "]
[null,null,"GridView","grd_      "]
[null,null,"Group  ","grp_      "]
[null,null,"Header","hed_     "]
[null,null,"IFrame","ifm_      "]
[null,null,"Image","img_       "]
[null,null,"InputBox  ","ibx_      "]
[null,null,"InputCalendar","cal_     "]
[null,null,"Menu  ","meu_    "]
[null,null,"MultiSelect ","msb_     "]
[null,null,"Multiupload ","mpd_      "]
[null,null,"Navigation","nav_    "]
[null,null,"Output","opt_     "]
[null,null,"PageControl","pgc_   "]
[null,null,"PageInherit     ","pai_      "]
[null,null,"PageList","pgl_      "]
[null,null,"Radio   ","rad_     "]
[null,null,"Repeat  ","rep_   "]
[null,null,"RoundedRectangle  ","ror_    "]
[null,null,"ScrollView","scv_      "]
[null,null,"SearchBox","srb_   "]
[null,null,"Secret","sct_    "]
[null,null,"Section","sec_    "]
[null,null,"SelectBox","sbx_    "]
[null,null,"SlideHide","sdh_     "]
[null,null,"Slider ","sld_   "]
[null,null,"Span","spn_     "]
[null,null,"Spinner  ","spi_    "]
[null,null,"Switch ","swt_    "]
[null,null,"TabContainer     ","tct_  "]
[null,null,"TabControl","tac_      "]
[null,null,"TableLayout      ","tbl_    "]
[null,null,"Tag   ","tag_    "]
[null,null,"Textarea ","txa_     "]
[null,null,"Textbox  ","tbx_     "]
[null,null,"TreeView","trv_    "]
[null,null,"Trigger  ","tri_   "]
[null,null,"Upload    ","upd_     "]
[null,null,"Video","vdo_    "]
[null,null,"WFrame  ","wfm_       "]
[null,null,"WindowContainer     ","wdc_     "]
[null,null,"XHTML   ","xmh_     "]
[null,null,"XSL  ","xsl_   "]
[]
[null,"注：控件命名需导入文件"," Project - Properties - Component ID Rule - Import"]
[null,null,"文件目录：Partner\\Doc\\共享文档\\UI界面\\控件命名规则.wqp"]
[]
[]
[null,"datagrid列名","和数据库字段保持一致"]
[]
[null,"dataCollection ","dlt_业务名"]
[]
[]
[null,"submisssion","sub_业务名"]
[]
[null,"页面Popup 命名：","Pop_页面名称"]

{"sheet":"页面名称命名","index":1,"n_rows":5,"n_cols":4,"rows_kept":5,"cut":false,"hidden":false,"merged":[]}
["文件夹","包名","页面命名","数据库名称"]
["system","系统","login","登陆"]
["system","系统","menu_add","菜单添加"]
["system","系统","user_list","账户管理"]
["system","系统","user_edit","账户管理"]

{"sheet":"前端js规范","index":2,"n_rows":49,"n_cols":4,"rows_kept":49,"cut":false,"hidden":false,"merged":[[43,0,48,0],[0,1,0,2],[41,1,42,3]]}
[null,"<script  type=\"javascript\"><![CDATA["]
[]
[null,null,"\t\t/*******"]
[null,null,"\t\t*   Screen Description: 具体业务"]
[null,null,"\t\t*    Author: 作者"]
[null,null,"\t\t*    Date ： 日期"]
[null,null,"\t\t*/*******"]
[null,null,"\t\t"]
[null,null,"\t\t/*******"]
[null,null,"Global  Variable declare(全局变量定义代码)"]
[null,null,"var  pageFunc = {};"]
[]
[null,null,"\t\t/*******"]
[null,null,"Page Initialize(分页信息初期化代码)"]
[null,null,"var  pageFunc = {};"]
[null,null,"\t\tpageFunc.onLoadComplete = function(){};"]
[]
[null,null,"\t\t"]
[null,null,"\t\t/*******"]
[null,null,"Submission Event(submission处理代码)"]
[null,null,"scwin.submissionId_submitdone = function(e) {}"]
[]
[]
[null,null,"\t\t/*******"]
[null,null,"DataList Event(datalist事件处理代码)"]
[null,null,"\t\t"]
[null,null,"\t\t"]
[null,null,"\t\t"]
[null,null,"\t\t/*******"]
[null,null,"User Event Function(点击事件处理代码)"]
[]
[]
[null,null,"\t\t/*******"]
[null,null,"Business Function(具体业务代码)"]
[]
[]
[null,null,"\t\t/*******"]
[null,null,"OnLoad Function(初期化加载代码)"]
[null,null,"pageFunc.onLoadComplete();"]
[]
[null,"  ]]>"]
[null,"新增js方法请在这里声明，方便开发人员参考,"]
[]
["以后全局使用的工具js方法，请在CommonUtils中配置，所有页面引入js的方式是引入 common_base_script.jsp,该页面引入了大量的常用的js，不必自己引入js，导致js冲突","表单验证formValidate","前端 form表单 验证 一律使用 CommonUtils.formValidate()","var ruleObj = {username:{required:true}, password:{required:true}};\nvar messageObj = {username:{required:\"请输入用户名\"}, password:{required:\"请输入密码\"}};\nCommonUtils.formValidate(\"form\", ruleObj, messageObj);"]
[null,"自定义 正则表达式 验证jQuery.validator.addMethod()","jquery.validate-method.js 请在这里写正则表达式，添加自定义验证方法","jQuery.validator.addMethod(\"isIntEqZero\", function(value, element) { \n         value=parseInt(value);      \n         return this.optional(element) || value==0;       \n    }, \"整数必须为0\"); "]
[null,"alert 提示 alertMsg()","不要用js自带的alert， 一律使用CommonUtils.alertMsg()","用法请看方法注释"]
[null,"显示若干秒的toast 提示，后自动消失,toastMsg()","CommonUtils.toastMsg()","用法请看方法注释"]
[null,"confirm 确定框confirmDialog()","CommonUtils.confirmDialog()","用法请看方法注释"]
[null,"div文字展开收缩overTexts()","CommonUtils.overTexts()","用法请看方法注释"]

{"sheet":"后端命名规范","index":3,"n_rows":114,"n_cols":1,"rows_kept":114,"cut":false,"hidden":false,"merged":[[0,0,0,8]]}
["统一使用“驼峰法”"]
["  类名：第一个单词首字母大写，驼峰式"]
["  方法名:第一个单词首字母小写，驼峰式"]
["  变量：第一个单词首字母小写，驼峰式"]
["  类静态成员命名——全大写，以下滑线连接 "]
["包规范"]
["com.ssm.controller.system.MenuCtr.java"]
["   商品--item"]
["   联盟--union"]
["   库存--stock"]
["   销售--sale"]
["   配送--deliver"]
["   客服--cs"]
["   清算--account"]
["   SCM--scm"]
["   供应商--vendor"]
["   系统--system"]
["@RequestMapping(\"system/MenuCtr\")"]
["异常处理：所有异常进行了统一处理，所有异常都是往上抛，在controller中要继承com.ssm.common.exception.ExceptinHandler"]
[]
["l  Datasource引用Jboss的JNDI内"]
["com.ssm.service.system.dto(前端相关数据数据结构)"]
["com.ssm.service.system.bean(数据库对应映射)"]
["com.ssm.mapper.system.MenuMapper.java，selectXXXByYYYY，insertXXXByYYYY，updateXXXByYYYY"]
["mybatis\\mapper\\MenuMapper.xml(与接口保持一致)"]
["com.ssm.service.system.impl.MenuServiceImpl.java"]
["com.ssm.service.system.MenuService.java(接口)，selectXXXByYYYY，insertXXXByYYYY，updateXXXByYYYY"]
["com.ssm.util.*;工具类，不需要数据库帮忙"]
["com.ssm.common.*;公共功能；如异常，权限"]
["l  Java泛型使用。泛型代码。"]
["l  DTO的字段命名规则，驼峰模式。"]
["l  CTR的@RequestMapping配置带中分类path"]
["l  Const类，合并到一个地方。不用的删除。使用的留下。Const字段。大写，"]
["l  系统配置如jdbc.properties，读取。如redis的需要放在一个文件内。"]
["l  Util内，Helper命名。按功效区分。String字符串操作【分割/拼接/替换】，StringFormate，加密解密，日期操作等，"]
["l  mybatisSQL格式化"]
["    a)         列前“，”；"]
["    b)         And，from，where 等关键字换行"]
["    c)         Sql大写。"]
["l  缩写名词表，如dd表示直配送"]
["l  不希望看到，System.out.pritln, 改为log4j or其他。"]
["l  提交的代码，格式化。"]
[]
[]
["代码注释，可以说是比代码本身更重要。这里有一些方法可以确保你写在代码中的注释是友好的："]
["不要重复阅读者已经知道的内容"]
[]
["能明确说明代码是做什么的注释对我们是没有帮助的。 "]
["Java代码 "]
["// If the color is red, turn it green"]
["if (color.is_red()) {"]
["  color.turn_green();"]
["}"]
[]
["要注释说明推理和历史"]
[]
["如果代码中的业务逻辑以后可能需要更新或更改，那就应该留下注释： "]
["Java代码 "]
["1. /* The API currently returns an array of items "]
["2. even though that will change in an upcoming ticket. "]
["3. Therefore, be sure to change the loop style here so that "]
["4. we properly iterate over an object */ "]
["5.  "]
["6. var api_result = {items: [\"one\", \"two\"]}, "]
["7. items = api_result.items, "]
["8. num_items = items.length; "]
["9.  "]
["10. for(var x = 0; x < num_items; x++) { "]
["11. ... "]
["12. } "]
[]
["同一行的注释不要写得很长"]
["没什么比拖动水平滚动条来阅读注释更令开发人员发指的了。事实上，大多数开发人员都会选择忽略这类注释，因为读起来真的很不方便。 "]
["Java代码 "]
["1. function Person(name) { "]
["2. this.name = name; "]
["3. this.first_name = name.split(\" \")[0]; // This is just a shot in the dark here. If we can extract the first name, let's do it "]
["4. } "]
["function Person(name) {"]
["  this.name = name;"]
["  this.first_name = name.split(\" \")[0]; // This is just a shot in the dark here. If we can extract the first name, let's do it"]
["}"]
[]
["要把长注释放在逻辑上面，短注释放在后面"]
[]
["注释如果不超过120个字符那可以放在代码旁边。否则，就应该直接把注释放到语句上面。 "]
["Java代码 "]
["1. if (person.age <21) { "]
["2. person.can_drink = false; // 21 drinking age "]
["3.  "]
["4. /* Fees are given to those under 25, but only in "]
["5. some states. */ "]
["6. person.has_car_rental_fee = function(state) { "]
["7. if (state === \"MI\") { "]
["8. return true; "]
["9. } "]
["10. }; "]
["11. } "]
[]
["不要为了注释而添加不必要的注释"]
[]
["画蛇添足的注释会造成混乱。也许在学校里老师教你要给所有语句添加注释，这会帮助开发人员更好地理解。但这是错的。谁要这么说，那你就立马上给他个两大耳刮子。代码应该保持干净简洁，这是毋庸置疑的。如果你的代码需要逐行解释说明，那么你最需要做的是重构。 "]
["Java代码 "]
["1. if (person.age >= 21) { "]
["2. person.can_drink = true; // A person can drink at 21 "]
["3. person.can_smoke = true; // A person can smoke at 18 "]
["4. person.can_wed = true; // A person can get married at 18 "]
["5. person.can_see_all_movies = true; // A person can see all movies at 17 "]
["6. //I hate babies and children and all things pure because I comment too much "]
["7. } "]
[]
["注释要拼写正确"]
["要多多实践"]
["要审查别人的注释"]