(^46) | Chapter 3: Patterns and Domains
Domains and Algorithms
Domains became popular in the late 1980s when researchers began to explore
how object-oriented principles could be used to promote software reuse. In the
context of reuse, domains are application areas that share common traits. Each
domain has its own vocabulary that provides a language to describe the domain.
The language helps design systems and reusable components that are appropriate
for the particular domain. Domain-specific languages (DSLs) are used to model
domains to generate domain-specific software, rather than construct it manually.
Algorithms, like applications, have domains. These domains are orthogonal to
specific application domains. Algorithm domains provide us with knowledge
about the application domains that are most amenable to certain types of algo-
rithms. For example, if one is developing an application to access web services
from a mobile phone, it would be appropriate to use algorithms optimized for
space usage and external storage rather than simply the best overall time
performance.
Algorithm domains are not as well defined as application domains; they are more
general and span several application domains. Algorithm domains map more
closely to standard computer science areas. We see, for example, search and
graph traversal algorithms used frequently in artificial intelligence applications,
whereas numerical algorithms seldom appear in such applications. Database
management systems have their own set of algorithms that appear frequently, as
do most other application domains.
In our algorithm patterns we do not indicate any specific domain set for each
algorithm, since no standard algorithm domain categorization exists. The context
for each algorithm does, however, offer the reader a particular domain where the
algorithm fits well. As one becomes familiar with algorithms and thinking of algo-
rithms in terms of patterns, a natural taxonomy that maps application domains to
algorithm domains emerges.
Developing the mapping between algorithm domains and application domains is
an interesting and important research area. Obtaining an appropriate taxonomy
will aid us to develop and generate better software components and applications.
Researchers are applying advanced mathematical analysis to develop the categori-
zations (Algorithm Formalization, 2007).
From a practitioner’s viewpoint, algorithm categorization comes from experien-
tial tales, or war stories (Skiena, 1998). These informal anecdotes give the
practitioner a more intuitive insight and confidence about when to use a partic-
ular type of algorithm. The literature, both academic and industrial, is full of such
war stories about algorithms, and we encourage you to develop your own. Such
an exercise can help you internalize the algorithms and make you a better soft-
ware developer. The beauty of algorithms is that the connection between
algorithm domains and applicability is continually expanding. New algorithms are
being developed, but possibly more importantly, new applications for existing
algorithms are being discovered. Thinking of algorithm domains helps you
manage this ever-complex relationship.
Algorithms in a Nutshell
Algorithms in a Nutshell By Gary Pollice, George T. Heineman, Stanley Selkow ISBN:
9780596516246 Publisher: O'Reilly Media, Inc.
Prepared for Ming Yi, Safari ID: [email protected]
Licensed by Ming Yi
Print Publication Date: 2008/10/21 User number: 594243
© 2009 Safari Books Online, LLC. This PDF is made available for personal use only during the relevant subscription term, subject to the Safari Terms of Service. Any other use
tina meador
(Tina Meador)
#1