Design Techniques and CodingStandards for J2EE Projects
As J2EE applications tend to be large and complex, it's vital that we follow sound OO design practice, adopt consistent coding conventions, and leverage existing investment – whether our own or that of third parties. Inthis chapter we'll look at each of these important areas in turn.The first two concern code quality, at object-design and code level. What are we trying to achieve? What isgood code? These are a few of its characteristics:
❑
Good code is extensible without drastic modification. It's easy to add features without tearing it apart.
❑
Good code is easy to read and maintain.
❑
Good code is well documented.
❑
Good code makes it hard to write bad code around it. For example, objects expose clean,easy-to-use interfaces that promote good use. Both good code and bad code breed.
❑
Good code is easy to test.
❑
Good code is easy to debug. Remember that even if a piece of code works perfectly, it's still a problem if it doesn't favor debugging. What if a developer is trying to track down an error inimperfect code, and the stack trace disappears into perfect but obscure code?
❑
Good code contains no code duplication.
❑
Good code gets reused.
Add a Comment
santurileft a comment
santuri replied: