|
|
Browse by Tags
All Tags » .Net » Patterns
-
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
...
-
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 ...
-
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)
...
-
Many times I have seen validation code implemented in a similar manner as the code below.
public class SaleProcess
{
public bool IsPersistValid(Sale sale)
...
-
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 ...
|
|
|