编程知识 cdmana.com

Java programming specification

Naming conventions

Method name 、 Parameter name 、 Member variables 、 All local variables must follow the hump form

Domain model naming convention  
1) Data objects :xxxDO,xxx Data table name .  
2) Data transmission object :xxxDTO,xxx Name related to business area .  
3) Display object :xxxVO,xxx Generally the name of the web page .  
4) POJO yes DO/DTO/BO/VO Is called , Do not name as xxxPOJO.

Avoid using Apache Beanutils For properties copy.
【 recommend 】 Use with caution Object Of clone Method to copy the object .
explain : Object's clone Method default is shallow copy , If you want to achieve deep copy, you need to rewrite clone Method to copy the property object

————————————————————————————
————————————————————————————————————————————————————————————————————————

1.  Familiar with the business 、 Project architecture and development process 
 Master development tools ; Familiar with development 、 test 、 Online process 

 development tool : For example, I've always been used to using idea, Project building tools maven, And learned svn、git,navicat  Tools such as .
 Development   test   To   Online process 
( Requirements review )

  1. read “ Xuanwu intelligent risk control system ” Source code , Write an organization definition page

By reading the source code , be familiar with SpingBoot、Redis、DB To configure , Learn code specifications , Be able to maintain the organization independently crud Page development , In addition, I am familiar with DDD Domain model
————————————————————————————————————————————————————————————————
Code specification :
Method name 、 Parameter name 、 Member variables 、 Local variables are used uniformly lowerCamelCase style , Must follow the hump form
B)  Domain model naming convention  
1) Data objects :xxxDO,xxx Data table name .  
2) Data transmission object :xxxDTO,xxx Name related to business area .  
3) Display object :xxxVO,xxx Generally the name of the web page .  
4) POJO yes DO/DTO/BO/VO Is called , Do not name as xxxPOJO.

Programming protocol
POJO Class must be written toString Method .

Avoid using Apache Beanutils For properties copy.
【 recommend 】 Use with caution Object Of clone Method to copy the object .
explain : Object's clone Method default is shallow copy , If you want to achieve deep copy, you need to rewrite clone Method to copy the property object
————————————————————————————————————————————————————————————————————————
Institutional definition

Institutional definition , It is used to distinguish different requesters and verify access legitimacy under cloud service mode .
1. Organization list query

Organization list query page . This can be done through the name of the organization 、 Organization code query global organization list , The list information includes : Chinese name of the organization 、 Organization code 、 Organization status . Page interaction includes :
• Inquire about : The query “ Name of organization ” or “ Organization code ” Counterpart information . if ““ Name of organization ” or “ Organization code ” None of them are filled in , By default, the list of all organizations in the whole domain will be queried ;
• newly added : New institutional definition ;
• modify : Modify selected organization information ;
• Detailed : View selected organization details ;
2. Organization details definition

Define organization details :
• Institutional attributes include :
• Name of organization : Input box , String type , Required ;
• Organization code : Input box , String type , Required ;
•Token: Input box , String type , Required ;
• state : A drop-down box , take effect / invalid , Default effective ;
• Page interaction :
◦ Click on “ preservation ”: Required fields 、 Field type verification , Illegal input prompts the user to modify ;
◦ Click on “ return ”: Back to the institution list page ;
3. Related users and permission requirements
• System administrator : With global organization query 、 newly added 、 Authority to modify .
• Agency configuration manager : Only the information of affiliated institutions can be inquired 、 modify .
——————————————————————————————————————————————————————————————————
Problems encountered in the development process
Yes DDD Unfamiliar with domain models
————————————————————————————————————

DDD Domain model 

——————————————————————————

  1. Development dubbo Interface

Development dubbo Server interface and call code

——————————————————
newly added EID Inquire about

adopt EntityID Check membership number CustomerID
adopt CustomerID Inquire about EntityID
According to the actual query results .

版权声明
本文为[Z2Min_]所创,转载请带上原文链接,感谢

Scroll to Top