Welcome to EMC Consulting Blogs Sign in | Join | Help

Browse by Tags

All Tags » .Net » Patterns
  • Extending Functionality with the Strategy Pattern

    The strategy pattern enables the functionality of an application to be easily extended or modified to cope with new or changed requirements, as shown in the following example. The code below shows the OrderProcess class which is responsible for processing the payment of an order as shown in the ProcessOrderPayment method     ...
    Posted to Owain Wraggs' Blog (Weblog) by Owain.Wragg on November 25, 2008
  • Handling New Requirements with the Decorator Pattern

    Assume we have an existing application which manages customer purchases, below is the code that is responsible for validating purchases. We have a number of validators which inherit from the PurchaseValidatorBase class, which in turn implements the IPurchaseValidator interface.     public interface ...
    Posted to Owain Wraggs' Blog (Weblog) by Owain.Wragg on October 13, 2008
  • How to Avoid If...Else If

    The code below is responsible for setting the status of a Customer by examining various bits of data.     public class CustomerProcess     {         public void UpdateStatus(Customer customer)         ...
    Posted to Owain Wraggs' Blog (Weblog) by Owain.Wragg on September 30, 2008
  • Validation Using the Command Pattern

    Many times I have seen validation code implemented in a similar manner as the code below.     public class SaleProcess     {         public bool IsPersistValid(Sale sale)         ...
    Posted to Owain Wraggs' Blog (Weblog) by Owain.Wragg on September 16, 2008
  • OO, Patterns and Sudoku Solver: Part 1

    Primary focus of this blog entry is to demonstrate some of the power and flexibility offered by object orientated programming and design patterns. I will try to demonstrate these techniques and how to use them to solve complex problems like Sudoku. I chose Sudoku rather than "Hello world" because it's fun, complex and seems ...
    Posted to Fat man and his mixed bag of goodies (Weblog) by Manoj.Oswal on April 23, 2007
Powered by Community Server (Personal Edition), by Telligent Systems