1. Designing with Reuse in Mind
    1. Objects can be reused in different systems, and code should be written with reuse in mind.
    2. This is where much of the thought is required in the design process.
  2. Designing with Extensibility in Mind
    1. Making Names Descriptive
      1. Following a naming convention for your classes, attributes, and methods is a similar subject.
      2. Making names descriptive is a good development practice that transcends the various development paradigms.
    2. Abstracting Out Nonportable Code
      1. If you are designing a system that must use nonpotable, you should abstract this code out of the class.
    3. Providing a Way to Copy and Compare Objects
      1. How objects are copied and compared.
      2. You must make sure that your class behaves as expected. and this means you have to spend some time designing how objects are copied and compared.
    4. Keeping the Scope as Small as Possible
      1. Keeping the scope as small as possible goes hand-in-hand with abstraction and hiding the implementation
      2. Is to localize attributes and behaviors as much as possible.
    5. A class should be responsible for itself
      1. The class design guideline that all objecs should be responsible for acting on themselves whenever possible.
      2. Here is that the call is identical; the context of the shape dictates how the system reacts.
  3. Designing with Maintainability in Mind
    1. Using Iteration in the development Process
      1. Using an iterative process is recommended.
      2. Create the code in small increments and then build and test it at each step.
      3. This testing process is not simply confined to coding.
    2. Testing the Interface
      1. STRUBS: The minimal implementations of the interface.
      2. The implementation is nor necessary at this point.
      3. When the interface is complete and the implementation is under development , the database can then be connected and the stubs disconnected.
      4. As you find problems with the interface design, make changes and repeat the process until you are satisfied with the result.
  4. Using Object Persistence
    1. Serializing and Marshaling Objects
      1. We have already discussed the problem of using objects in environments that were originally designed for structure programming.
    2. Primary storage devices
      1. Flat file system: You can store an object in a flat file by serializing the object. This has very limited use.
      2. Relational database: Some sort of middleware is necessary to convert an object to a relational model.
      3. OO database: This may be more efficient way to make objects persistent, but most companies have all their data in legacy systems.
  5. Designing Error Handling into a Class
    1. Documenting a Class and Using Comments
      1. The topic of comments and documentation comes up in every programming books and article, in every code review.
      2. Many people have said all this before.
      3. One of the most crucial aspects of a good design, whether it's a design for a class or something else, is to carefully document the process.
    2. Building Objects with the intent to Cooperate
      1. When designing a class, make sure you are aware of how other objects will interact with it.
      2. This is a fact in the life of a class.
  6. Designing Robust Constructors (and Perhaps Destructors)
    1. A constructor should put an object into an initial, safe state.
    2. You also need to make sure the object is constructed properly in the default condition.
    3. The destructors include proper clean - up functions. This clean - up pertains to releasing system memory that the object acquired at some point.
  7. Identifying the Public Interfaces
    1. Minimum Public Interface
      1. Makes the class as concise as possible.
      2. The goal is to provide the user with the exac interface to do the job right.
      3. Creating a class is a business proposition, and as with all steps in the design process, it is very important that the users are involved with the design.
    2. Hiding the Implementation
      1. Has already been covered in great detail.
      2. A class is most useful if the implementation can change without affecting the users.
  8. Modeling Real - World Systems
    1. One of the primary goals of OOP is to model real-world systems in ways similar to the ways in which people actually thinks
    2. Designing classes is the object - oriented way to create these models.
    3. When creating classes, you should design them in a way that represents the true behavior of the object.