Remondo

.NET developers brain repository in plain C#

Main menu

Skip to primary content
Skip to secondary content
  • Home
  • Tutorials
  • Code Snippets
  • Developer Podcasts
  • Presentations
  • Tools
  • Patterns and Principles

Category Archives: Patterns and Principles

Post navigation

← Older posts

Simple Factory Pattern Example in C#

Posted on May 16, 2012 by Leon van Bokhorst

With the Factory Pattern we provide a clean way to instantiate an object unknown to us at the time of implementation. The only thing we know is the interface of the object with a set of predefined properties and methods we need to use. More…

Posted in Patterns and Principles | Tagged design, factory, gof, ood, pattern | 2 Replies

The Repository Pattern Example in C#

Posted on April 13, 2012 by Leon van Bokhorst

The Repository Pattern is a common construct to avoid duplication of data access logic throughout our application. This includes direct access to a database, ORM, WCF dataservices, xml files and so on. The sole purpose of the repository is to hide the nitty gritty details of accessing the data. More…

Posted in Patterns and Principles | Tagged csharp, design, gof, ood, pattern, repository | 3 Replies

Chain of Responsibility Pattern Example in C#

Posted on March 28, 2012 by Leon van Bokhorst

The Chain of Responsibility pattern takes a request and flows through a chain of handlers. Each handler checks if it can handle the request according to some business rules. If the handler can’t handle the request it gets passed to the next handler in the chain. More…

Posted in Patterns and Principles | Tagged chain, csharp, gof, ood, pattern | 2 Replies

The Command Pattern Example in C#

Posted on March 28, 2012 by Leon van Bokhorst

The Command Pattern makes a execution request into an object. This makes it possible to store, search and transport requests and let clients call them via a common interface. This pattern is often used to implement undo or macro operations. More…

Posted in Patterns and Principles | Tagged command, csharp, factory, gof, ood, pattern | 5 Replies

SOLID by Example – The Dependency Inversion Principle

Posted on March 22, 2012 by Leon van Bokhorst

The last post in the SOLID by Example series deals with the Dependency Inversion Principle (DIP). It states that high-level classes should not depend on low-level classes. Both should depend on abstractions. Abstractions should not depend on details. More…

Posted in Patterns and Principles, SOLID series | Tagged dependency, dip, ood, solid | Leave a reply

SOLID by Example – The Interface Segregation Principle

Posted on March 21, 2012 by Leon van Bokhorst

The fourth post in the SOLID by Example series deals with the Interface Segregation Principle (ISP). It states that clients should not be forced to implement interfaces they don’t use. Or as Uncle Bob puts it: Make fine grained interfaces that are client specific. More…

Posted in Patterns and Principles, SOLID series | Tagged isp, ood, solid | Leave a reply

SOLID by Example – The Liskov Substitution Principle

Posted on March 20, 2012 by Leon van Bokhorst

The third post in the SOLID by Example series deals with the Liskov Substitution Principle (LSP). It states that derived classes must be substitutable for their base classes. The principle was first mentioned by Barbara Liskov in the late eighties. More…

Posted in Patterns and Principles, SOLID series | Tagged lsp, ood, solid | Leave a reply

SOLID by Example – The Open / Closed Principle

Posted on March 18, 2012 by Leon van Bokhorst

The second post in the SOLID by Example series deals with the Open / Closed Principle (OCP). This is the notion that an object should be open for extension, but closed for modification.

For us developers S.O.L.I.D.

More…

Posted in Patterns and Principles, SOLID series | Tagged ocp, ood, solid | 2 Replies

Post navigation

← Older posts
Subscribe

ajax asp.net async bdd cache certificate code first concurrency csharp database entity framework exception handling factory gof http iis javascript jquery json linq mapping msmq mvc ood open source pattern reliability rest rss scrum security soap solid source control sql ssl tdd threading tracing unit testing visual studio was wcf windows xml

Archives

  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011

Comments

  • Leon van Bokhorst on The Strategy Pattern Example in C#Thanks
  • Hede on The Strategy Pattern Example in C#Nice hede article
  • Leon van Bokhorst on Simple Factory Pattern Example in C#Indeed; The Factory and Service Locator patterns perform functions found in Dependy Injection frameworks. They both adhere to the Dependency Inversion principle. That being...
  • Marco Vervoort on Simple Factory Pattern Example in C#Is dit niet de voorloper van Dependancy Injection? Met DI frameworks kun je dit ook uitvoeren, met meer configuratie mogelijkheden.
  • Leon van Bokhorst on Null Object Design Pattern Example in C#Thanks Alex
  • Alex on Null Object Design Pattern Example in C#Very well done. Hit and run example!
  • Leon van Bokhorst on Using Entity Framework DbSet LocalAha! Don't you just love it when that happens ;-)
  • Marco Vervoort on Using Entity Framework DbSet LocalWeer een 'ahaaa' moment... Leuke post.
  • Leon van Bokhorst on Hosting a WCF Service in IISGreat! :-D
  • Rafael on Hosting a WCF Service in IISI got it to work, thanks! My bad.
  • Rafael on Hosting a WCF Service in IISThanks again for the reply, so how did you publish to IIS? Using a WCF Web Service, like the post on this article?
  • Leon van Bokhorst on Hosting a WCF Service in IISI can't reproduce your problem. What I did was the following: - created a service library - connectionstring in the app.config - published the...
Leon van Bokhorst
(c) 2012 Remondo