I would like to know where I can find best practices documentation for Java for:
- Coding standards
- Error management
- Logging best practices
- Unit testing
- Properties
- Data access 开发者_如何学Python
etc.
Effective Java, Second Edition
After that, you can look at specific books for specific areas (such as unit testing). There are a lot of ways to do things in Java, so unlike say .NET, there is often no obvious first approach to many common problems - there are competing frameworks.
Beside good documentation (which you have to read, understand and keep in mind) I recommend using some static code analyzer tools which will 'inform' you 'just in time' on your porject if you violate some rules. Have a look at:
- PMD
- FindBugs
- Checkstyle
They all integrate to various IDEs and looking at their documentation (rule sets) is quite valuable.
But - they are just tools. You should always question their warnings - which in turn needs some experience.
精彩评论