My favorites | Sign in
Project Logo
             
Search
for
Updated Oct 29, 2007 by coder2000
Labels: Phase-Design, Featured, Phase-Requirements
DesignPatterns  
The patterns we are adopting for the development of the library.

Introduction

The patterns I am using are Singleton, Strategy and Finite State Machine. These patterns are used in attempts to increase extensibility of the library and reduce the number of if blocks needed throughout the library.

Details

Singleton

Is used in places like the tag and sasl registries to keep a single location for tracking the different tags and sasl processors available to the library. They are implemented with attributes and can take and assembly instance to add all applicable classes automatically.

Strategy

Is used with the tags to keep all tag specific processing within the tag itself. The main library will have no knowledge of what each tag is for allowing new tags to be added easily.

State

Is used to keep track of where in the connection process we are. Starting to connect, SSL negotiation, SASL authentication etc... Each state will know what to do so the main class doesn't have to make that decision.


Sign in to add a comment
Hosted by Google Code