Guideline: Import Dependency in Design
var backPath = './../../../';
var imgPath = './../../../images/';
var nodeInfo=[{view: "view:_LVCagP5WEdmAzesbYywanQ", path: ["_LVCagP5WEdmAzesbYywanQ", "_zRigkAILEdq-_NKqZM1EhA", "_QV4x0AISEdqTna4sZVFRow", "_kjFBYN7HEdm8G6yT7-Wdqw", "{8CDAEAD4-5E84-4F50-87FD-3240ED047DE7}", "5.099920218485599E-305"]}, {view: "view:_FCx1oN7CEdmsEI4YDGX2ag", path: ["_FCx1oN7CEdmsEI4YDGX2ag", "_Jvt1cAIaEdqEutyfYo0quQ", "_EOvXUN7HEdm8G6yT7-Wdqw", "_kjFBYN7HEdm8G6yT7-Wdqw", "{8CDAEAD4-5E84-4F50-87FD-3240ED047DE7}", "5.099920218485599E-305"]}, {view: "view:_FCx1oN7CEdmsEI4YDGX2ag", path: ["_FCx1oN7CEdmsEI4YDGX2ag", "_Jvt1cAIaEdqEutyfYo0quQ", "_jijhYAIaEdqEutyfYo0quQ", "_mTMIkN7REdmjRZts2c4ZjQ", "{8CDAEAD4-5E84-4F50-87FD-3240ED047DE7}", "5.099920218485599E-305"]}, {view: "view:_FCx1oN7CEdmsEI4YDGX2ag", path: ["_FCx1oN7CEdmsEI4YDGX2ag", "_jD8dUAIbEdqEutyfYo0quQ", "_2ClPcDIcEdqDs_9ORT1Rig", "5.099920218485599E-305"]}];
contentPage.preload(imgPath, backPath, nodeInfo, '', false, false, false);
Guideline: Import Dependency in Design
Import Dependency is an inter-package relationship. This guideline introduces this relationship.
Relationships
Related Elements
Design Model
Main Description
Explanation
Handling import dependencies between packages is an important aspect of structuring an object model. A package depends
on another if any of its classes have relationships that are navigable to classes in the other package. To express such
dependencies you use the import dependency from one package to the package on which it depends.
Dependencies between packages are expressed by import dependencies.
Use
You evolve import dependencies in the following manner:
Before you start working with the object model, make outlines of dependencies for use as guidelines during the
work.
When the model is completed, use it to show the dependencies actually there. This entails updating the import
dependencies in the object model.
If you divided the model into packages early on, use the import dependencies to show where dependencies are
allowed.
How packages depend on one another affects a system's tolerance to change. An object model will be easier to change
if you:
Reference a minimum number of contained classes from outside each package. If you reference many classes, the
package may have too many different responsibilities and should be divided into two.
Make each package depend on few other packages.
Test each package separately. This means that you should be able to test a package by simulating the package on
which it depends. You should not require other packages to be completely or almost completely implemented. If you
can test a package separately, system development and maintenance for each package will be easier.
Place general parts of the object model in separate packages on which other packages depend. If there is such a
package, pay strict attention to release handling, since several parts of the system may be affected by changes to
the package.
Example
Suppose you find something in common for the classes Customer Panel and Operator Panel in the recycling
machine. You assign these general services to a new class, Panel that you place in a new package, Panels.
The other two classes may then refer to this class to use the general services. Because the classes belong to two
separate packages, the two packages will depend on the new package. This elimination of redundancy implies that changes
to the common functionality only needs to be done in one place.
© Copyright IBM Corp. 1987, 2006. All Rights Reserved.
contentPage.onload();
Wyszukiwarka
Podobne podstrony:
terminarz Importy rzymskie w Barbaricum 2015function import request variablesimportant!importimporttemplate import export (2)importimportEKSPORT I IMPORT SUROWCÓW MINERALNYCHimportcategories468 Wycena towarów z importuwięcej podobnych podstron