Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 


Patterns & Practices articles and tutorials

Read Patterns & Practices articles

Sort by:

<< Start < Prev 1 Next > End >>
Page 1 of 1

Patterns & Practices articles and tutorials

# articles: 3  


C# .NET 2.0 Test Driven Development

View(s): 4708

C# .NET 2.0 Test Driven Development

Overview

There are many benefits of test driven development including better end product with well defined supporting unit tests and having a programming paradigm that is a bit more flexible in regards to scope changes.  Having unit tests available will make our code more maintainable over the long run is invaluable because we can modify our code without fear such as when we are adding/modifying functionality or refactoring.  It could even be considered crucial when we have projects where the scope is likely to change throughout the development lifecycle like in the case where the functional specifications are not clearly defined before we begin producing code.

Test driven development can be a huge shift in the development approach for many of us.  The test driven approach basically chips away at the solution like a sculptor would at a marble block instead of trying to define and create a monolithic application in one shot.

As a first step, we'll define the interfaces out software will adhere to.  The interface should clearly define how our class is to interact with other classes and what information it will expose.  This is a crucial step in any software design process because we really have to know where we are going and the interface serves as a map that will help us get there.

After we have an interface, we'll begin with the test-driven development cycle. 

  1. Add a test
  2. Run all tests and watch the new one fail (and the
(Continued...) View Full Aritlce


  Last updated on Tuesday, 22 April 2014
  Author: Mr. Ponna
3/5 stars (1 vote(s))



Implementing the Singleton Pattern in .NET

View(s): 6266


Implementing the Singleton Pattern in .NET

The intent of the Singleton pattern as defined in Design Patterns is to "ensure a class has only one instance, and provide a global point of access to it".

What problem does this solve, or put another way, what is our motivation to use it? In nearly every application, there is a need to have an area from which to globally access and maintain some type of data. There are also cases in object-oriented (OO) systems where there should be only one class, or a predefined number of instances of a class, running at any given time. For example, when a class is being used to maintain an incremental counter, the simple counter class needs to keep track of an integer value that is being used in multiple areas of an application. The class needs to be able to increment this counter as well as return the current value. For this situation, the desired class behavior would be to have exactly one instance of a class that maintains the integer and nothing more.

At first glance, one might be tempted to create an instance of a counter class as a just a static global variable. This is a common technique but really only solves part of the problem; it solves the problem of global accessibility, but does nothing to ensure that there is only one instance of the class running at any given time. The responsibility of having only one instance of the class should fall on the class itself and not on the user of the class. The users of the class should always

(Continued...) View Full Aritlce


  Last updated on Saturday, 01 February 2014
  Author: rajeeva.nagarakanti
3/5 stars (4 vote(s))



Behind the Scenes - Discover the Design Patterns You're Already Using in the .NET Framework

View(s): 3165

Behind the Scenes - Discover the Design Patterns You're Already Using in the .NET Framework

By Rob Pierry

This article discusses:

  • Common design patterns used in .NET Framework classes
  • Patterns used to implement the ASP.NET programming model and request pipeline
  • How patterns make programming tasks faster and easier

Contents

  • Observer Pattern
  • Iterator Pattern
  • Decorator Pattern
  • Adapter Pattern
  • Factory Pattern
  • Strategy Pattern
  • Composite Pattern in ASP.NET
  • Template Method Pattern
  • Patterns in the ASP.NET Pipeline
  • Intercepting Filter Pattern
  • Page Controller Pattern
  • Other Web Presentation Patterns in ASP.NET


In this article, I'll cover a basic overview of several common design patterns and how they are used in the BCL and other areas of the .NET Framework. In doing so, you can discover some of the motivation for why the Framework is designed the way it is, as well as make the abstract concepts of the patterns themselves more intuitively understandable.

If you are already familiar with some of these patterns, feel free to read about those you aren't familiar with, since each section is relatively independent. The section on ASP.NET-related patterns requires familiarity with the request pipeline, a basic overview of which is provided in that section.

Within the .NET Framework, the use of some patterns is so prevalent that they have been built into programming languages themselves, instead of just represented by the class libraries. The first two patterns I will discuss, the Observer and the Iterator, are supported

(Continued...) View Full Aritlce


  Last updated on Thursday, 24 October 2013
  Author: Mr. Ponna
4/5 stars (4 vote(s))

<< Start < Prev 1 Next > End >>
Page 1 of 1
Register Login Ask Us Write to Us Help