Design Patterns for Searching in C# ~ With Source Code and Projects Date: 06 May 2011, 18:15
|
Description: Intended for the experienced C# programmer, this book presents a simple object-oriented interface to many of the classic combinatorial and graph searching algorithms. No prior experience with these is necessary. Many solved problems and applications are presented. DESIGNING OBJECT ORIENTED software is difficult, but there are reoccurring patterns that have been documented [1]. These patterns specify how interacting classes and objects can combine to solve very general problems. It is up to the designer to recognize when a pattern can be employed and then to implement the domain specific classes and objects that follow the pattern, in order to serve the application functionality. This book takes off from two design patterns mentioned in the literature, Iterator and Template Method. We devise sub-patterns that are specific for enumeration (constructing collections of objects and then making them available one at a time), and searching (ranging over an object space to find objects that satisfy certain criteria). Readers will require some object-oriented experience. You should be comfortable with the notions of objects, classes, inheritance, interfaces, methods, and the like. No knowledge of design patterns is required. We will present some of the classic search algorithms in a new setting. You need not be familiar with these already. The book does not give extensive mathematical analysis of the algorithms used. Hints are given when there are particular inefficiencies or when obvious improvements can be made. To maintain focus it was necessary that the examples lack detail and complexity. However, it is intended that readers will make practical use of the design patterns in real projects Our book contains examples in CSharp (C#), version 2. This language was chosen because of its implementation of “generics” and “iterators”, and because it has a useful library of collection classes. We could have used Java, Smalltalk, or C++ instead, but C# is especially concise and the example code therefore relatively uncluttered. Certainly the patterns themselves are not language specific: you can probably translate the code into the object-oriented language of your choice. However, we will not discuss C# in much detail, so a prior knowledge of that language will be helpful. Typically, design patterns are too abstract to be reduced to code but must be implemented every time they’re used. With the advent of generic classes and iterators in C# it is possible to separate the part of the patterns that require application specific classes from the part that controls the searching/enumeration logic. The latter piece we put in a small class library (called the Searching and Enumeration Library, or SEL)*. By doing this we not only provide code for your reuse, but we can devote most of our discussion to the concepts that require the designer’s imagination in applying the pattern. The sample applications in the book necessarily lack complexity so that they can be described briefly. Furthermore, issues of error detection and efficiency have been largely ignored. Occasionally, some of the source code has been omitted from the text (but is available along with the SEL). However, all of the applications are complete enough to be executed and include a simple user interface. At least two of the examples, a parser and the game of Reversi, are rich enough to be used as a framework for similar applications. It is best to read this book from start to finish. The early design patterns are simple and the discussion rather verbose. Subsequent patterns become more complex and the discussion a bit more terse. Some vocabulary introduced earlier is reused, as are some examples. 181 Pages
|
DISCLAIMER:
This site does not store Design Patterns for Searching in C# ~ With Source Code and Projects on its server. We only index and link to Design Patterns for Searching in C# ~ With Source Code and Projects provided by other sites. Please contact the content providers to delete Design Patterns for Searching in C# ~ With Source Code and Projects if any and email us, we'll remove relevant links or contents immediately.
|
|
|