Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Design pattern in C# by using professional examples
Rating: 4.1 out of 5(12 ratings)
123 students

Design pattern in C# by using professional examples

Concepts, class diagram along with professional examples to understand design patterns with C# and .NET
Created byAhemad Ali Khan
Last updated 12/2018
English

What you'll learn

  • Able to write clean code.
  • Identify the most suitable design pattern to address a given application design problem.
  • Apply design principles (e.g., open-closed, dependency inversion etc )

Course content

5 sections73 lectures10h 58m total length
  • Introduction6:26
  • Getting Started1:35

    Explore creational design patterns that control object creation, including simple factory, factory method, abstract factory, singleton, prototype, and builder, to manage complexity and flexibility.

  • Simple Factory - Concepts2:57
  • Simple Factory - Implementation [Example : OnLineExam ]16:18
  • Factory Method Pattern - Concepts4:27
  • Factory Method Pattern - Implementation [ Example : OnLineExam ]7:18
  • Abstract Factory Pattern - Concepts7:00
  • Abstract Factory Pattern - Implementation - [ AbstractWidgetFactory ]8:00
  • Singleton Pattern - Concepts2:31
  • Singleton Pattern Implementation - Thread Safe and Double Check Locking12:55

    Explore the singleton pattern in C# with private constructors, a single instance, and thread safety techniques including lock and double-check locking, highlighting performance trade-offs.

  • Singleton Pattern Implementation - Static Initialization and Lazy Instantiation12:05
  • Prototype Pattern - Concepts4:10

    Clone existing objects to create new instances efficiently using the prototype pattern, with a clone method on an abstract prototype and concrete customers like general and privileged with discounts.

  • Prototype Pattern - Implementation - [Example : General and Privilege Customer]18:52
  • Prototype Pattern - Shallow Copy11:13

    Explore the prototype pattern through shallow copy, creating a new object and copying non-static fields while shared references, like product details, remain linked; compare with the deep-copy behavior.

  • Prototype Pattern - Deep Copy4:30
  • Prototype Pattern - Implementation of Both Shallow and Deep Copy8:26
  • Builder Pattern - Fluent Interface - Concepts7:53
  • Builder Pattern - Fluent Interface - [Example - Creation of Account Object]15:29
  • Builder Pattern - Concepts4:23

    Explore the builder pattern in C# using abstract interfaces and concrete builders to assemble complex objects like bank accounts. See how a director guides construction to produce different representations.

  • Builder Pattern - Implementation - [Ex:BankBuilder with different account types]16:04

Requirements

  • Understanding of object oriented programming concepts.
  • Knowledge of C#.

Description

Creational Design Pattern

1. Simple Factory - Creation of object by using "CreateExam" Method for OnlineExam.

2. Factory Method - Creation of object by using ConcreteFactory subclasses for OnlineExam.

3. Abstract Factory -  Creation of object for Window and Dialog with respect to different OS by using AbstractWidgetFactory.

4. Singleton - Generic example to understand the concepts, example of static initialization and double lock checking.

5. Prototype - Creation prototype object at run time for GeneralCustomer and PrevilegeCustomer.

6. Builder - Creation of object in series of steps by using Fluent Interface and Bank builder for BankAccount.

Structural Design Pattern

1. Adapter - Adapter used in between Mediaplayer and Mediapackage

2. Bridge - Example Used - Bridge used in between persistence mechanism and file types.

3. Composite - Example Used - HTML tree structure with parent and child element.

4. Decorator - Example Used - Decorating CarRacing application with stage progression.

5. Facade - FacadeReportGenerator for different type of DB.

6. Proxy - Example used for remote proxy, virtual proxy and protection proxy through restaurant application.

Behavioral Design Pattern

1. Chain of Responsibility - ATMWithdraw application for different denominator of Indian rupees.

2. Command - Calculator Application with redo and undo features.

3. Interpreter - Convert Roman number to number.

4. Iterator - Iterating posts of blog.

5. Mediator - ChatMediator for different category of users.

6. Memento - Savepoint with file contents so that go back to previous save point.

7. Observer - Notify all customers when product is available

Solid Principle

1. Checkpoint to see dirty code.

2. Should we give importance to Solid Principle.

3. Acronym of SOLID.

4. SRP Concetps with violation - Example Used : Loan Application

5. OCP : Used open and closed principle in Loan Application

6. LSP : Violation of LSP after adding Educational Loan to Loan Application.

7. ISP : Provide solution to LSP violation in the form of ISP.

8. DIP : Used English and French messenger to understand the concepts in Loan Application.

Who this course is for:

  • Beginner, intermediate and experienced developers.
  • Interested in design principles.