Information Technology Reference
In-Depth Information
2. Discover objects, do not invent them. Objects should be obvious and necessary.
If you are forcing them, then they are most likely not correct.
3. Using a standard naming convention. These vary from project to project, but
some common practices consist of using nouns as class names and attributes.
Using verbs for method names is also common.
4. Modern languages and toolkits provide almost every data structure and low
level component you can imagine. Use them. These classes built into the
language are widely understood, documented, and implemented. There is no
need to rebuild something that is already proven and readily available.
8.9 Chapter Summary and Conclusions
This chapter focuses on object design. Object design is adding details to the
requirements analysis and making implementation decisions. The process of object
design serves as the stepping stone to implementation. This phase closes the gap
between the application objects and the off-the-shelf components by identifying
additional solution objects and refining existing objects. At the end of this step
there should be a complete design that is ready to be implemented.
Objects are categorized in a few different groups. Application objects, also called
''domain objects'', represent concepts of domain that are relevant to the system.
Solution objects represent components that do not have a counterpart in the appli-
cation domain, such as persistent data stores, user interface objects, or middleware.
Inheritance is embodied by all object-oriented languages. It provides a crucial
and necessary mechanism to promote reusability. The focus of inheritance during
object design is to reduce redundancy and enhance extensibility.
A clear and concise design revolves around well enumerated and documented
interfaces to the outside world. Whereas internal components are not seen or
directly manipulated (this does not mean that they should not be thought out) by
the end user interfaces. This can make or break a project in terms of usability.
Interface specification activities of object design include:
• Identifying missing attributes and operations
• Specifying type signatures and visibility
• Specifying invariants
• Specifying preconditions and postconditions
The class implementer is responsible for realizing the class under consideration.
Class implementers design the internal data structures and implement the code for
each class. Class extenders may invoke operations provided by the class of
interest, and they focus on specialized versions of the same services.
A constraint is a restriction on one or more values of (part of) an object-oriented
model or system. The context definition of an OCL expression specifies the model
entity for which the OCL expression is defined.
Search WWH ::




Custom Search