In summary, I suggest that the following idioms should be favored as the preferred style:
O'Hanley, John. (2008). Four harmful Java idioms, and how to fix them. JAVAWORLD from IDG. Retrieved on December 22, 2016 from http://www.javaworld.com/article/2077883/java-concurrency/four-harmful-java-idioms--and-how-to-fix-them.html?page=2
- Use a naming convention to distinguish three kinds of data, not two: local variables, fields, and method arguments.
- Prefer the package-by-feature style over package-by-layer.
- Prefer immutable objects over JavaBeans.
- Order items in a class in terms of decreasing scope, with private items appearing last.
O'Hanley, John. (2008). Four harmful Java idioms, and how to fix them. JAVAWORLD from IDG. Retrieved on December 22, 2016 from http://www.javaworld.com/article/2077883/java-concurrency/four-harmful-java-idioms--and-how-to-fix-them.html?page=2
No comments:
Post a Comment