Java Reference
In-Depth Information
A
NECDOTAL
EVIDENCE
:
“We should connect via interface version
12.23.345.” “You can't change that field length without six levels of man-
agement approval, because you will break everyone.” “We can have the
nine-digit
ZIP
code ready for testing in two years.”
S
YMPTOMS
,
CONSEQUENCES
:
Multiple versions of the same interface is a
tell-tale characteristic. Interface support that significantly lags the capabilities
of both the client and server systems is another symptom of this problem.
XML Misuse
R
ELATED
ANTIPATTERNS
:
This antipattern is a subset of the Golden
Hammer antipattern in
AntiPatterns
, since we are applying an ill-suited
technology to a purpose.
D
ESCRIPTION
:
XML
, like many powerful technologies, can be misused. In
this case, we're using
XML
to do large-scale search or summary missions.
R
EFACTORED
SOLUTION
NAME
:
Databases, Indexed
XML
, or other
appropriate technologies.
R
EFACTORED
SOLUTION
TYPE
:
Software or technology.
R
EFACTORED
SOLUTION
DESCRIPTION
:
XML
indexing solutions or rela-
tional databases are better technology fits for these problems.
T
YPICAL
CAUSES
:
This antipattern is caused by the assumptions that some
convenience facilities in
XML
are scalable and robust, which is not neces-
sarily their intent.
S
YMPTOMS
,
CONSEQUENCES
:
Applications using
XML
to do significant
sorting or summarizing perform poorly.
Rigid XML
D
ESCRIPTION
:
Some design choices can restrict the extensibility of
XML
.
Namespaces can collide and some constructs are more restrictive than
others.
R
EFACTORED
SOLUTION
NAME
:
Extensible, Flexible
XML
.
R
EFACTORED
SOLUTION
TYPE
:
Software.
R
EFACTORED
SOLUTION
DESCRIPTION
:
Design choices can affect the
flexibility of
XML
. In general, we should use namespaces to control colli-
sions, prefer types to elements in a schema, use dangling types or
anyType
for implementations of variable content containers, and limit the impact of
XML
versioning by observing best practices.