News in the Category: Patterns and Practices Subscribe to the rss of this category.

Total posts: 688 | Sort by Views | Sort by Hits

WPF: Handling Button.Click or defining a command

Marquee de Sells: Chriss insight outlet, December 11, 2005
Views: 8,374 | Hits 767

If I've got an Avalon Button, e.g. <Button Content="OK" /> Should I give the button a name so I can handle the event (I would never put the event handler directly in the XAML) like this: <B...

Message Exchange Patterns and Flavours of "One-Way" Messaging

WebServices.Org Weblogs, February 19, 2006
Views: 1,510 | Hits 625

For many years, SOAP has promised that it is a "one-way" protocol. This statement somehow magically seems to want to differentiate SOAP from HTTP's request-response. To date, we haven't fu...

Test Specific Subclasses vs Partial Mocks

youve been HAACKED, December 7, 2007
Views: 1,462 | Hits 582

Sometimes when writing unit tests, you run into the case where you want to override the behavior of a specific method. Heres a totally contrived example I just pulled from my head to demonstrate this...

Working with Factory Design Pattern using C# - The #1 ASP.NET Community, April 20, 2006
Views: 2,505 | Hits 456

In this article, Vishal demonstrates the concept of Factory Design Pattern using C#....

NHibernate Templates for Smart Code Generator

The Code Project Latest Articles, July 1, 2007
Views: 3,218 | Hits 418

Describes how to generate NHibernate objects and ASPX pages using Smart Code...

EF4 New Properties for Entity Properties?

Julia Lerman Blog - Dont Be Iffy..., August 10, 2009
Views: 2,679 | Hits 418

If you are working with the Beta 1 of VS2010 in an Entity Data Model, you might notice some new properties in the Properties Window for an entity’s scalar property. Are they new properties? Act...

Tradeoffs When Minimizing The Impact Of Changes

youve been HAACKED, November 16, 2006
Views: 1,535 | Hits 416

In a recent post I talked about how good design attempts to minimize the impact of changes to a system, often through Design Patterns. When used appropriately, Design Patterns are a great tool for bu...

Writing Unit Tests For Controller Actions

youve been HAACKED, December 10, 2007
Views: 1,438 | Hits 409

Just a brief note on writing unit tests for controller actions. When your action has a call to RedirectToAction or RenderView (yeah, pretty much every action) be aware that these methods have dependen...

NHibernate Best Practices with ASP.NET, Generics, and Unit Tests

The Code Project Latest Articles, April 28, 2006
Views: 3,002 | Hits 402

This article describes best practices for leveraging the benefits of NHibernate, ASP.NET, Generics, and unit testing together....

Writing Testable Code Is About Managing Complexity

youve been HAACKED, November 14, 2007
Views: 1,892 | Hits 377

When discussing the upcoming ASP.NET MVC framework, one of the key benefits I like to tout is how this framework will improve testability of your web applications. The response I often get is the sam...

The repository pattern explained and implemented

Patrik Löwendahls shout, June 7, 2010
Views: 2,754 | Hits 339

The pattern documented and named Repository is one of the most misunderstood and misused. In this post well implement the pattern in C# to achieve this simple line of code: var customers = customers.M...

Pattern Focus: Strategy Pattern using delegates

Patrik Löwendahls shout, February 9, 2007
Views: 2,741 | Hits 321

Interfaces are the classical way of implementing the strategy pattern, but with .NET we get another similar approach to technically accomplish the same thing. That is by utilizing delegates as part of...

Data Layer Testing: Test Inheritance Patterns

ISerializable, November 29, 2007
Views: 1,126 | Hits 297

I'm preparing for my tutorial on Database and Data Layer unit testing that I will be giving at the Agile Practices Conference  next week. It's always nice to have a full 3 hours to get pretty dee...

Patterns & Practices: Designing for Operations

Julia Lerman Blog - Dont Be Iffy..., June 19, 2007
Views: 1,062 | Hits 291

INETA sent Keith Pleas to speak to the grateful Vermont.NET User Group last night. Keith presented the Designing for Operations project that PAG is working on. It was eye opening to many of us who ha...

Steve Smith's Awesome Caching Pattern

Scott Cate .net Knowledge Base and Weblog, April 2, 2004
Views: 3,461 | Hits 286

My friend Steve Smith who wrote this article has solved a major problem for me. With his permission I'm duplicating some of his code here. About one in 50,000 page views, I was getting an "Objec...

Dont Repeat Yourself

Steven Smith, October 11, 2009
Views: 2,963 | Hits 275

(this is a submission I made to the upcoming 97 Things Every Programmer Should Know book) Of all the principles of programming, Don't Repeat Yourself (DRY) is perhaps one of the most fundamental. The...

Gang of Four (GOF) Design Patterns - The #1 ASP.NET Community, June 5, 2006
Views: 1,379 | Hits 273

In this article we will be taking a look at several Gang Of Four (GOF) design patterns with the help of code samples....

Aysynchronous Fire and Forget Pattern Redux New Articles, July 27, 2006
Views: 3,073 | Hits 271

Peter revisits the FireAndForget pattern, with a cool Console app that exercises the method 100,000 times and shows you the times....

Some Code Quality Links

Steven Smith, March 3, 2009
Views: 1,893 | Hits 260

Caught a couple of nice links from @unclebobmartin via twitter this morning that I thought were worth sharing.  The first one is a very nice summary of the Software Craftsmanship conference that ...

What do I plan to do over the next 6 months to become a better developer

The Moth, July 13, 2007
Views: 1,144 | Hits 259

After not doing memes for over 2 years, I broke my rule last December and yesterday; today I notice another one where I got tagged (thanks Raymond). So, this is the last meme I am doing for the rest o...

ASP.NET Model View Presenter New Articles, April 7, 2007
Views: 1,205 | Hits 254

This article is about Model View Presenter pattern. It is a very basic level article. I have read many articles on this but none of them were simple enough, at least for me. By pw zeus...

Pattern Focus: Mediator Pattern

Patrik Löwendahls shout, September 16, 2007
Views: 2,185 | Hits 253

It has been a long time since my last "pattern focus" but I think I'm ready to pick it up again. This time I want to talk about the mediator pattern, the UN diplomat of patterns. I have a funny ...

CodeSnip: Working with Singleton Design Pattern using C# - The #1 ASP.NET Community, March 29, 2006
Views: 1,143 | Hits 253

The singleton pattern is one of the best-known patterns in software engineering. Often, this pattern is used to represent parts of the system that there can only be one of, like the MSN messenger or Y...

Schema Design Patterns:  Usage in BizTalk

Stephen Kaufman's WebLog, October 11, 2005
Views: 1,801 | Hits 249

The is the fifth of five entries talking about schema design patterns.  After looking at each of these schema design patterns now we can look at how we can use these design patterns in the BizTal...

Understanding Adapter Pattern Using .NET - The #1 ASP.NET Community, October 31, 2006
Views: 1,546 | Hits 244

In this tutorial we examine the adapter pattern which is one of the most popular patterns. It allows us to adapt an existing class to new clients in a transparent manner. Hence, legacy systems often d...

Structure of Design Patterns - The #1 ASP.NET Community, December 6, 2006
Views: 1,317 | Hits 242

This article helps the reader to understand how a series of articles describing design patterns are structured, thereby helping the reader to get the most out of the articles. It also helps the reader...

Introducing Design Patterns - The #1 ASP.NET Community, July 28, 2006
Views: 1,944 | Hits 234

Design Patterns are a solution to the complexities in Software Designs. This article provides a bird's eye view of the Creational, Structural and Behavioral Design Patterns and their applicability....

Design Patterns in VB.NET - Terms to Know - The #1 ASP.NET Community, July 12, 2006
Views: 1,514 | Hits 234

This article looks at terms used in the GoF book which you should know well before reading the GoF book. It also looks at the terms I coined for certain concepts discussed in the tutorial....

Implementing a Singleton Pattern in C# - The #1 ASP.NET Community, April 24, 2006
Views: 1,243 | Hits 234

A singleton pattern is one that states that there would be only one instance of a class throughout the application domain. This article illustrates this pattern with lucid code examples....

Schema Design Patterns: Garden of Eden

Stephen Kaufman's WebLog, May 11, 2005
Views: 1,433 | Hits 229

This is the fourth of five entries talking about schema design patterns.  In previous entries the Russian Doll, the Salami Slice and the Venetian Blind approaches were discussed. The Garden of Ed...

Fire and Forget Fun: RPC Pings, GET, POST and more. New Articles, July 11, 2007
Views: 1,335 | Hits 225

Shows how to use the Asynchronous Fire and Forget pattern to ping RPC Servers about changes in your site, ping the Yahoo crawler API with a RESTful GET, and perform a Fire and Forget FORM POST. Most o...

Formatting Dates

Wallace B. McClure, July 12, 2006
Views: 1,745 | Hits 224

I am forgetful regarding the formatting of dates in .NET.  For example, I will try to put in something like "MM/DD/YYYY" and will get out something like "06/MM/YYYY."  As...

Observer Design Pattern - The #1 ASP.NET Community, June 22, 2006
Views: 1,237 | Hits 218

In this article, Vishal demonstrates the Observer Design pattern with the help of non-software and .NET Framework examples....

Understanding Bridge Pattern using .NET - The #1 ASP.NET Community, December 4, 2006
Views: 2,354 | Hits 216

The Bridge pattern is something we see everyday in corporations where management figures out what should be done by creating a strategic, abstract plan of action, while employess implement the decisio...

Very Quick MVP Pattern to Use with ASP.NET

Scott Cates WebLog, April 12, 2007
Views: 1,365 | Hits 213

The MVP is used for a lot of reasons, but mainly it does a **VERY** nice job of separating business logic from the UI. M. = Model V. = View P. = Presenter UX. = User Experience ( Web Form in this case...

Pattern Focus: MVP, MVC, MVWatever

Patrik Löwendahls shout, February 20, 2007
Views: 2,479 | Hits 208

This is the third post in my path to save the world with patterns. This time we're going to tackle a manageability and extensibility issue for the project as whole. The ChallengeI'm sure many of you h...

Observer Design Pattern Using JavaScript

The Code Project Latest Articles, April 26, 2006
Views: 1,932 | Hits 207

Ensuring a crisp boundary exists between objects, enabling greater reuse and system maintainability...

How to Use Design Patterns

Darrell Nortons Blog [MVP], May 26, 2005
Views: 2,033 | Hits 207

Bill Venners just posted Part 1 of an interview with Erich Gamma called How to Use Design Patterns. So why should developers learn patterns "I think patterns as a whole can help people learn object-...

CRUD Interface for a Service - Is a bad practice ?

Pablo M. Cibraro (aka Cibrax), January 25, 2007
Views: 1,611 | Hits 201

I have been reading in different places that using a CRUD (Create, Read, Update, Delete) interface for a service is considered a bad practice or anti-pattern. Therefore, this kind of interface&nb...

Why Use AngularJS?

K. Scott Allen, February 26, 2013
Views: 2,990 | Hits 191

Since I started a series of posts on AngularJS, I've had a few people ask me why I like the framework. One year ago I wrote a post with the title "Plain Old JavaScript". This post originated after ...

Head First Design Patterns book now has C# code samples available

Darrell Nortons Blog [MVP], May 18, 2005
Views: 1,051 | Hits 188

Mark McFadden has made the excellent Head First Design Patterns book's code samples available in C# here. He even uses NUnit instead of Console.Writelines. Great job, Mark!...

Speaking at the Patterns and Practices Conference

Brad Abrams, September 7, 2006
Views: 1,528 | Hits 181

I was honored to be asked to speak at the Patterns and Practices Conference in October here on the Redmond campus.  I am still locking down exactly what my content will be, so if you plan to come...

Watin Testing Pattern

.Avery Blog, October 10, 2007
Views: 2,176 | Hits 181

On my current project we have zero unit tests. I inherited the application and the existing unit tests where such a mess it was better to just kill em and start over. I would normally start from the d...

Northwind Starter Kit

Dino Espositos WebLog, February 28, 2006
Views: 2,413 | Hits 179

I confess I never paid much (due?) attention to design patterns. My friend Andrea, instead, is head over heel in love with such fancy things. By the way, if you feel that the topic somehow catches&nbs...

WPF Patterns

Bryant Likess Blog, September 27, 2006
Views: 3,398 | Hits 178

If you're doing WPF development, you really need to check out Dan Crevier's series on DataModel-View-ViewModel. Right now there is no easy way to read through all his posts on the subject without navi...

GoF Patterns DSL for Team System 2005

Darrell Nortons Blog [MVP], March 13, 2006
Views: 1,132 | Hits 176

Clipcode has released a GoF Domain Specific Language built using Microsoft's DSL tools for Visual Studio 2005. The currently available snapshot build of Clipcode-GoF-DSL supports the GoF creational pa...

Working with GoF's Design Patterns in JavaScript Programming - The #1 ASP.NET Community, December 8, 2008
Views: 1,148 | Hits 176

In this article, Xianzhong demonstrates the application of six popular design patterns from GoF in JavaScript. He provides comprehensive coverage of the Singleton, Factory Method, Decorator, Observer,...

ASP.NET 4.0 and the Entity Framework 4 - Part 4 - A 3 Layered Approach to the Entity Framework - The #1 ASP.NET Community, May 4, 2010
Views: 2,236 | Hits 176

In this article, Vince suggests a pattern to use when developing a three layered application using the Entity Framework 4. After providing a short introduction he demonstrates the creation of the data...

TDD Lesson 1 - Don't worry about starting small

Karl Seguin [MVP], June 23, 2006
Views: 1,690 | Hits 173

The first thing I want to cover in my "learning TDD" track is to not worry about writing seemingly meaningless or uninteresting code. First of all you never know what shape code will take in the fut...

Dating Design Patterns Book

DonXML Demsaks All Things Techie, October 28, 2005
Views: 1,133 | Hits 170

The Dating Design Patterns book has been around for a while, but somehow I missed it.  They even have a site for the book. Some of my favorite patterns: Cary Grant Helper: Originally called &ld...