Creational Design Patterns in C# - Abstract Factory Pattern
Abstract Factory Pattern
Abstract Factory design pattern
(The code of the example given below can be found here at github.)
Lets consider an Agency called – CarInfo. CarInfo is an agency to provide consumers information about cars.
CarInfo want to develop a simple webpage where user selects car manufacturer, and then it shows the models of the select car . . .
Posted in: .netc#design patterns
Custom Claims-based Windows Authentication in ASP.net MVC 5
When I first read about the Claims-based identity/authorization, I immediately liked the idea. Claims are simple key-value pairs, dictionary type of objects and make it very easy for the developers to implement authorizations. You can very easily implement custom authorization class in your MVC project to use these claims and decorate your . . .
Posted in: .netc#claims-based identity
Creational Design Patterns in C# - Singleton Pattern
Singleton Pattern
Singleton Pattern
Singleton pattern (wiki) is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to be shared across the system.
To make a class Singleton, usually the below pattern is followed:
The constructor of the class is made . . . |
Posted in: .netc#design patterns
Creational Design Patterns in C# - Builder Pattern
Builder Pattern
Builder pattern (wiki) tries to separate the construction of a complex object from its representation. This pattern is used when complex object that need to be created is constructed by constituent parts that must by created in the same order or by using a specific algorithm.
Let’s consider . . . |
Posted in: .netc#design patterns
Design Patterns In C# - Creational Design Patterns
Creational Design Patterns
SOFTWARE DESIGN PATTERNS
Design patterns = Software/coding design patterns that should be considered at every phase of software development right from designing the overall architecture of the software project to coding of small unit functionalities.
Keeping these Design Patterns in mind during software development helps towards . . .
Posted in: .netc#design patterns