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,369 | 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...

A Simple Configuration Pattern

Clarity Blogs: ASP.NET, March 15, 2006
Views: 8,274 | Hits 64

Most apps need to allow for some sort of configuration.  Using the .NET built in appSettings functionality to read settings from an app.config or web.config is perfect for simple cases. ...

Design Patterns and PHP

Ablog, October 13, 2005
Views: 6,699 | Hits 150

An excerpt of Apress author Matt Zandstra’s excellent book, PHP 5 Objects, Patterns and Practice has been published on Covering three topics: composition, decoupling, and polymorphism, ...

Processing XML in .NET: Antipatterns

Signs on the Sand, December 12, 2005
Views: 5,825 | Hits 163

I run into this article "Harnessing the BackPack API" by Michael K. Campbell in the new and very cool "XML 4 Fun" column at MSDN. The article is otherwise brilliant and really fun, but XML process...

Regex: This pattern is intended to remove all javascript blocks from a chunk of code. EDIT: a bu... - Recent Patterns, August 22, 2005
Views: 3,585 | Hits 54

Regex: This pattern is intended to remove all javascript blocks from a chunk of code. EDIT: a bug is cutting off additional matches. ****************...

UI Automation Testing with UIA Veify

the telerik blogs, October 28, 2008
Views: 3,577 | Hits 38

As I mentioned in my previous post "UI Automation/Accessibility in Silverlight 2, tools and resources summary", UIA Verify is one of the current options for UI Automation testing of controls and app...

Regex: This Pattern matches HTML attributes with quoted quotes or other non-word characters corre... - Recent Patterns, August 25, 2005
Views: 3,516 | Hits 52

Regex: This Pattern matches HTML attributes with quoted quotes or other non-word characters correctly. I used it in an parser-engine. Replace the quotes in this RX to match other boun...

Steve Smith's Awesome Caching Pattern

Scott Cate .net Knowledge Base and Weblog, April 2, 2004
Views: 3,447 | 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...

WPF Patterns

Bryant Likess Blog, September 27, 2006
Views: 3,393 | 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...

Best practice and effective way of using DataContext in Linq to SQL?

Bigyan Rajbhandari, March 19, 2008
Views: 3,363 | Hits 146

At work, Jeff and I have been throwing around ideas to find a best way to implement DataContext in Linq so that we can integrate it into the base class in our framework while achieving following goals...

Designing a Windows 8 Metro style app starting from an existing Windows Phone app Design Case Study Part 1

the telerik blogs, May 10, 2012
Views: 3,255 | Hits 13

A lot of the Windows Phone developers out there are already considering porting their Windows Phone apps to Windows 8. May be you are thinking: from Metro to Metro - it has to be pretty easy and strai...

NHibernate Templates for Smart Code Generator

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

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

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

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

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

The Code Project Latest Articles, April 28, 2006
Views: 2,999 | Hits 402

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

Why Use AngularJS?

K. Scott Allen, February 26, 2013
Views: 2,981 | 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 ...

Dont Repeat Yourself

Steven Smith, October 11, 2009
Views: 2,955 | 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...

The repository pattern explained and implemented

Patrik Löwendahls shout, June 7, 2010
Views: 2,747 | 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,737 | 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...

Numeric week and year (WW/YYYY) - Recent Patterns, April 28, 2006
Views: 2,706 | Hits 72

This pattern can be used to validate a numeric week (between 01 and 52) and four digit year (valid years between 1000 and 2999) separated by a slash in the form of WW/YYYY....

EF4 New Properties for Entity Properties?

Julia Lerman Blog - Dont Be Iffy..., August 10, 2009
Views: 2,666 | 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...

RadScheduler for Silverlight learning series, part 4: So what is RecurrenceExceptionHelper?

the telerik blogs, September 10, 2009
Views: 2,615 | Hits 35

For those of you following this series, I'm going to take a slight detour to explain one of the little bits of magic that we have been using to make loading and saving appointments very easy: Recurren...

Slides from TechEd 2009

simon.says, May 14, 2009
Views: 2,596 | Hits 119

Today is my last day at TechEd 2009 in LA, and as promised, Ive uploaded the presentations from the three talks that Ive given this week.  Thanks again to everyone that attended my talks, and I r...

Kobe - Oh Dear Lord Why?!

Karl Seguin [MVP], April 16, 2009
Views: 2,562 | Hits 95

Roughly 4 months ago I nerd-raged all over the efforts of a small team at Microsoft who put together a sample MVC application. Despite some pretty loud outcry, the response at Microsoft was pretty slo...

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

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

Pattern Focus: MVP, MVC, MVWatever

Patrik Löwendahls shout, February 20, 2007
Views: 2,467 | 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...

TestDriven.NET Enterprise & Professional

Pencil Bros. Geology, Inc., July 10, 2006
Views: 2,427 | Hits 63

In order to help turn TestDriven.NET from a hobby into somethig that pays the bills, Jamie has released a Professional and Enterprise version of There's still a free...

Northwind Starter Kit

Dino Espositos WebLog, February 28, 2006
Views: 2,410 | 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...

MVVM and Prism Demo for PDC09 Silverlight Session, November 20, 2009
Views: 2,394 | Hits 67

Earlier today I blogged about my session yesterday on Advanced Large Scale Applications with Silverlight at PDC 09. I had a great time at PDC but now that I am home and have a faster and more stable i...

How do you avoid bugs in your unit tests?

ISerializable, July 23, 2006
Views: 2,369 | Hits 79

Oren tries to answer from difficult questions about TDD. One of them is related to how you'd make sure that your tests don't have bugs in them - which is a very important aspect of trust-worth...

Understanding Bridge Pattern using .NET - The #1 ASP.NET Community, December 4, 2006
Views: 2,349 | 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...

RadScheduler for Silverlight learning series, part 2: Loading Data Into RadScheduler from RIA Services

the telerik blogs, September 3, 2009
Views: 2,327 | Hits 35

After reading the first part of this series, you should now have a project that is ready to wire up with events. In summary, last time we: Created a new project with RIA services enabled Created a da...

Strategy Pattern With Ninject

Steven Smith, September 25, 2008
Views: 2,249 | Hits 23

This is a follow-up to my post about avoiding dependencies with design patterns.  It left off with something like this as a Cart object that uses the Strategy pattern to avoid a direct dependency...

Singleton Design Pattern in using C#

The Code Project Latest Articles, July 6, 2009
Views: 2,243 | Hits 159

codeproject Introduction When we want to make a only one instance of a class and also making sure that  there is a global access point to that object then the design pattern we user is called ...

Implementing Continuous Scrolling UI Pattern in ASP.NET New Articles, March 2, 2009
Views: 2,232 | Hits 6

When you have numerous records to show, we have to resort to Paging. There is a better alternative to display voluminous data (especially read only data) while providing a better user experience & als...

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,231 | 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...

Pattern Focus: Mediator Pattern

Patrik Löwendahls shout, September 16, 2007
Views: 2,183 | 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 ...

Moq 3.0 RTM!!!

eXtensible mind, March 6, 2009
Views: 2,181 | Hits 104

I've just released the latest version of Moq :)))) It's quite late on an intense week at Redmond, so I'm just going to paste the relevant portion of the changelog:Version 3.0 * Silverlight support!...

Watin Testing Pattern

.Avery Blog, October 10, 2007
Views: 2,169 | Hits 180

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...

Conways Life in WPF

Steven Smith, August 29, 2009
Views: 2,144 | Hits 16

The Game of Life was invented in 1970 by John Conway, a British mathematician.  The rules of the game are simple, but the resulting behavior of the system that results is often surprising and in ...

Avoiding Dependencies

Steven Smith, September 19, 2008
Views: 2,084 | Hits 36

I gave a one day class to about 20 developers today introducing Microsoft .NET, C#, and ASP.NET. As it was only one day and there were no hands-on labs, coverage was necessarily cursory, but overall t...

Managed Extensibility Framework (MEF) Demo

Brad Abrams, November 8, 2008
Views: 2,082 | Hits 99

The Managed Extensibility Framework (MEF) is a new feature of .NET 4 (and will work on 3.5 as well) that makes it significantly easier to extend applications and generally support application compos...

NDC Video Robert Martin S.O.L.I.D Principles of OO class design

ISerializable, August 19, 2009
Views: 2,046 | Hits 80

another one from the big uncle overseas ...

Composition versus Inheritance

Chad Myers Blog, February 13, 2010
Views: 2,044 | Hits 79

One score (minus five) years ago, in the age of yore and of our programming forefathers, there was written a little book. A seminal book. A book that would change things. That book was called Design P...

ASP.NET Best Practice Analyzer

K. Scott Allen, August 4, 2006
Views: 2,043 | Hits 80

The alpha release of the ASP.NET Best Practice Analyzer was about 5 weeks ago. Similar to the popular SQL Server BPA, the ASP.NET BPA evaluates a set of best practice rules and tells you abo...

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-...

Refactoring the GoF patterns (Singleton in .NET continued

Cirrus Minor, April 22, 2008
Views: 1,989 | Hits 71

Among the reactions I got for my previous post on the Singleton pattern in .NET were a couple that talked about the design rationale behind the solution I posted: Adi Avnit posted on the risk of ...

Patterns and Practices Performance "PAG"

Rico Marianis Performance Tidbits, September 18, 2008
Views: 1,976 | Hits 34

If you're looking for the blue perf book "Improving .NET Application Performance and Scalability" which used to be a it's now at

Linq-a-fi your file system by creating your own DSL

Williams .Net Zone, October 19, 2008
Views: 1,963 | Hits 59

Sample usage: Console.WriteLine("\nGet number of files and total size under a dir.");long totSize = 0;long totFiles = 0;var q = (from f in new LFileInfo(@"c:\temp").Children(true) ...

Back to Basics: Interfaces

Karl Seguin [MVP], March 4, 2009
Views: 1,947 | Hits 117

#karl_custom_4 code{color:#833;background:#fcfcfc;} #karl_custom_4 h4{margin:30px 0px 0px 0px;font-color:#fff;font-weight:bold;border-bottom:1px dashed #ccc;font-variant: small-caps} When it comes...

SOA patterns - Reservations

Cirrus Minor, September 8, 2009
Views: 1,947 | Hits 67

1.1 Reservation When you use transactions in traditional n-tier systems life is relatively simple. For instance, when you run a transaction and an error or ...