Chapter 2. How to Think in Terms of Objects

 <  Day Day Up  >  

In Chapter 1, "Introduction to Object-Oriented Concepts," you learned the fundamental object-oriented (OO) concepts. The rest of the book digs more deeply into these concepts. Many factors go into a good design, whether it is an OO design or not. The fundamental unit of OO design is the class. The desired end result of OO design is a robust and functional object model ”a system.

As with most things in life, there is no single right or wrong way to approach a problem. There are usually many different ways to tackle the same problem. So, when attempting to design an OO solution, don't get hung up in trying to do a perfect design the first time. What you really need to do is brainstorm and let your thought process go wild. Do not try to conform to any standards or conventions when trying to solve a problem, because the whole idea is to be creative. Thus, before you start to design a system, or even a class, think the problem through and have some fun! In this chapter we explore the fine art and science of OO thinking.

The move from the procedural world to an OO world is not trivial. Changing from FORTRAN to COBOL, or even to C, requires that you learn a new language; however, making the move from COBOL to C++, C# .NET, Visual Basic .NET, or Java requires that you learn a new thought process. This is where the overused phrase OO paradigm rears its ugly head. When moving to an OO language, you must go through the investment of learning OO concepts and the corresponding thought process first. If this paradigm shift does not take place, one of two things will happen: Either the project will not truly be OO in nature (for example, it will use C++ without using OO constructs), or the project will be a complete object-disoriented mess.

Three important things you can do to develop a good sense of the OO thought process are covered in this chapter:

  • Knowing the difference between the interface and implementation

  • Thinking more abstractly

  • Giving the user the minimal interface possible

We have already met some of these concepts in Chapter 1, and here we will now go into much more detail.

 <  Day Day Up  >  


Object-Oriented Thought Process
Object-Oriented Thought Process, The (3rd Edition)
ISBN: 0672330164
EAN: 2147483647
Year: 2003
Pages: 164
Authors: Matt Weisfeld

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