11.5 Conclusion

 < Day Day Up > 



11.5 Conclusion

It is important to write a conclusion for this chapter, as it might appear that the message is always to use composition when designing objects. If only one of the two mechanisms, composition or classification, is available, then this would be true. However, in many instances classification leads to better answers, and when it is used appropriately it is very powerful. Keep in mind, though, that it is easy to misuse classification. When designing a program, the designer must carefully think through how the implementation will be impacted by the design and not simply apply simple-minded tests such as the "is-a/has-a" test. The art of designing and implementing a program is not a simple task; if it were, we would have no need for programmers. So, the bottom line in any design is to implement a solution to the problem that you need to solve, not the one you want to solve or ones you create while solving the real problem. Be flexible. Not all problems can be solved with obvious solutions, and many attempts might be necessary to come up with a good design.



 < Day Day Up > 



Creating Components. Object Oriented, Concurrent, and Distributed Computing in Java
The .NET Developers Guide to Directory Services Programming
ISBN: 849314992
EAN: 2147483647
Year: 2003
Pages: 162

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net