It is important to get used to improving Code coding efficiency. Experience:
1. Clarify the requirements before writing code (this is critical): How many functions can be used to successfully convert the business?
2. Design
Clarify the Business Objects, from large to fine-grained design, and see what design patterns are used to implement the Program (there is a set of ideas in the design patterns, so be sure to understand the design patterns and use them again! Cannot be forcibly used to use the design mode)
After clarifying the code, write out the code function framework. Note that you cannot write the detailed functions at this time. You only need to write the code interface and the overall interaction method.
Check to see if there are any problems. No problem. Fill in the content in the function framework for implementation.
3. Implementation
The code implementation starts from the background code, finishes the background code, and then interacts with the foreground for debugging.
4. debugging
Debugging is the most difficult step. The server is started frequently and the cache is cleared frequently! In the debugging process, various small problems will affect your efficiency! (If the server reports an error, a window pops up in eclipse! Do not clear the cache, cache issues, etc.), the solution is as follows:
4.1 It is not easy to update the code!
Updating code is risky. Updating code may result in program errors and Service Startup failure! You must wait until your code is finished, update it, and upload it! If there is an intersection with other modules, let the colleague write and update the interface in step 2!
4.2 cache problems:
Code: After completing step 3, some resource files or code errors may not be compiled. To prevent code problems with bulid, we recommend that you clean the code first and then bulid it! Note: Do not use auto bulid when cleaning
4.3 start the service
Before starting the service, it is best to clear and delete the project to be deployed in the server, as if this project has never been deployed.
4.3.1 manual cleanup may also affect work efficiency. You can write a bat or RD command to clear the server cache to completely delete the cache.
4.3.2. Here we talk about services, and there are some areas where optimization efficiency can be achieved!
Have you found that the project is deployed on the server in Eclipse? Sometimes it jumps in the window! Tomcat 7 is used recently. It often reports the thread Optimization Problem and jumps a breakpoint to let you pass it! Or, the background automatically prints the information and jumps out of another window. You have to minimize this window! It is inconvenient for you to write code for debugging and affects your efficiency without knowing it!
We recommend that you detach the server from eclipse, deploy the project independently, and enable remote debugging in eclipse!
4.3.3 clear browser cache
After the service is started, start the browser. We recommend that you use Firefox during the development process. Firefox has a very useful function. The private mode (CTRL + Shift + p) is a clean browser.
5. debugging is complete, code is updated, conflicts are resolved, and functional code is uploaded at one time.