Atitit. 软件设计 模式 变量 方法 命名最佳实践 vp820 attilax总结命名表大全
7. #====normal naming + anno 2
8. #----jsp页面的名称,最好不个mod_list.jsp 2
1. #====提升抽象层次
$(def),abstr,arr,average,base,call,Chain closure,controllor/c,dao/dal,data,data2,dic,each,Element,exec,execute...,fac,flag,fun,handle,handler,helper,helper,helper,int/i,invoke,item,lst,list,manager,manager,max,min,mp,map,,num/n,obj/o,process,Pattern,record,ret/return,req,request,resp,response,run,service,service,sort,str/s,sum,sum,svs/service,succes,tmp等,total,util,util,util,x(util)
我通常把那些公共的,并且只有静态函数,没有实例,没有属性的类放到util里,Helper是有实例的,有属性的这样的类.
2. #----使用通用单词
作者:: 老哇的爪子 Attilax 艾龙, EMAIL:1466519819@qq.com
转载请注明来源: http://blog.csdn.net/attilax
3. #===使用术语..
4. #===使用缩写
5. #====自己最孰的语言(diaglog??)
6.
7. #====normal naming + anno
#就是“how”,而非“what
8. #----jsp页面的名称,最好不个mod_list.jsp
中间好行...放的个root哈面儿也ok..到个一达挨直了..
9. 名词优先与动词
世界大部分语言都是名词优先前置,因为可以食物化。。
10. 变量的常用前缀
@ 猴头儿,,,sql黑头
$ 美元字符, php 黑头
# 井字 模板黑头通常
%% 百分号,, bat黑头..
11. 常用命名表 (277 个item)
A , abs , abstr , Abstract , act , Action , active , Adapter , add , After , Ajax , alias , any , Api , app , append , args , Argument , Arr , Asyn , attibute , attr , auth , base , basic , Bean , bin , bind , Block , box , Bridge , Btn_click , buffer , Builder , bundle , cache , calc , call , callback , Caller , Chain , channel , Class , client , close , closure , Cmd , Code. , Collection , Command , complex , configer , conn , Context , Context , Controller , converter , cookie , Core , Creator , Dal , Dao , Data , decoder , Decorator , def , default , define , Delegate , dic , dir , dispatcher , Dsl , Dwr , each , editor , element , encoder , End , engine , Entry , enum , Err , Except , Exception , Exe , Exec , exp , expression , ext , Extends , Fac , Facade , Factory , File , fill , Filt , Filter , Final , finder , Finishi , fix , flag , foreach , Form , frag , Front Controller , fun , future , gene , general , get , getInstance , global , Grep , Gui , handle , Handler , Hash , helper , holder , icon , impl , Implements , info , ini , Inject , Interface , Interpreter , Interrupted , Invocation , Invoke , Ioc , Item , Iterator , Join , jump , Key , lazy , List , listner , loop , manager , Map , map , map , mask , max , max , menu , Merge , meta , min , Mod , model , Modules , monitor , Mvc , n , New , node , node , notify , num , O , o , obj , Object , Observer , option , parallelograme , Param , parse , parser , Pattern , pattern , persistence , Platform , plugin , pool , Process , prop , property , Proto , provider , Proxy , queue , quit , rec , Receive , record , Recv , reduce , ref , refer , reflect , reg , regExp , regur , renderer , report , req , Request , resolver , resource , resp , response , result , Return , run , S , Safe , scanner , schema , scope , script , selector , Send , sequence , server , Service , session , Set , sign , simple , Singleton , skeleton , sort , Split , Sql , Start , State , statment , Str , strategy , stream , struct , sub , succes , Sync , T , table , Target , task , temp , Template , thread , thumb , tmp , token , tool , total , trace , transaic , traverser , Trig , Trigger , Txt , Type , ui , union , Unsafe , util , util , utils , Val , var , variable , view , view , Visitor , Warp , Warpper , where , with , x , yield ,
12. 参考
atitit.软件开发里面的变量命名最佳实践o7.txt