Design Patterns With C# (Real World Samples)
4.4 (4 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
42 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Design Patterns With C# (Real World Samples) to your Wishlist.

Add to Wishlist

Design Patterns With C# (Real World Samples)

We will build some new strategies to make easy our code projects. You will also drop your old code writing culture.
4.4 (4 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
42 students enrolled
Created by Can Perk
Last updated 2/2017
Current price: $10 Original price: $30 Discount: 67% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 3 hours on-demand video
  • 9 Articles
  • 13 Supplemental Resources
  • 1 Coding exercise
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Software Development
  • Problem Solving
  • Creating the base of a project
  • New styles on writing code
  • Working with anti pattern codes - Converting back to known solutions
View Curriculum
  • Knowledge about programming
  • Object Oriented Programming
  • Basics of C#
  • Using Visual Studio, SQL Server

When we work on software projects, sometimes the things can be start to be weird. Some codes might be written again. Duplicated code blocks and copy - paste code methods can take a place in projects. Some codes might be written at first to show demos and same codes could be the base of your framework. Finally development can be harder than you start. Dreams can be finished at the beginning of you project. 

Let's learn some methods to develop new strategies. Desing Patterns can help you to solve a problem. You can create an algoritm to break the lock. We will talk about what are the design patters and why we should use them, then how can we implement a pattern into your complicated codes. Think about that all developers are speaking same language and you have a flexible arcthiecture which is written by SOLID principles.

Every new design pattern willgive you another window to look out and every window will open a new vision. I hope this course will be your first step for new visions.

Are you getting excited when you think your project maintenance? Then think about the cool ways and solve your problems in known options. We will keep in touch during your course time.

At the end of module you can download the course code files. And there is a surprise for you. We will develop an application framework using Design Patterns. At that last section you will see how to start up a project and what you need at first. I hope you will enjoy us and you will gain many things from this course

Who is the target audience?
  • Software developers
  • Computer Teachers
  • Students who are interested in software
Students Who Viewed This Course Also Viewed
Curriculum For This Course
61 Lectures
Getting Started
6 Lectures 08:15

I will introduce myself and tell you what are the goals of our course. What will we talk about in this section.

Preview 01:06

What does design pattern mean? How can I make my code more usable and effective? We will talk about the goals in this section

Preview 02:43

Why I need to use design patterns including my code?

Preview 00:50

Lets make some critics and answer some other questions

Preview 01:14

You will see Gof many times when you work with design patterns. Let's learn who are the Gang of Four...

Preview 01:39

Summary of module. base book of our course...

Preview 00:43
Singleton Pattern
8 Lectures 24:07

What is Singleton Pattern and when we should use it?

Preview 01:35

When the scenarios got to complicated ones. Common code templates are falling from all ways. Because performance or any other important things are looking for best results. You can see it easily

I will design a common way ADO.NET code. First I wanna show the not prefered way.

Bad Way - 1

We are bıilding up the code and it is time see the results. Before observing the things lets see what is working when working o a data...

Bad Way - 2

We should understand after doing observations. And why are we using same class for different instances? This work types are the sign for using Singleton

Bad Way - 3 (Testing)

That's all good. Now you can use this pattern not to overload an operation while you can do it once. Doing it as thread safe is the bonus for you ;)

Good Way

Let's observe our work. You can see the one instance is doing same thing for us. Now we can relax for accessing data in good RAM usage

Testing Good Way

What is Singleton? It is time to use it on your projects. You will undertand better why we need this pattern if you get performance increase...


You can download the codes from this lecture

Façade Pattern
6 Lectures 14:38

When we use many instances for same work or when you work with different types, your code can be more complex to understand. That is why we need Façade Pattern to manage instances

Preview 01:30

A weather data service will help us to understand. Lets look to the simple codes

Bad Way

If we want to make smarter the codes it can bee cool for any call and it would be nice o code design

Good Way

Lucene is a third party dll to make fast searchs in the system. It is creating a file cache and search gives results faster than known options (SQL Server  direct search). See the codes and apply for for performance tests

Real World Sample - Lucene.NET

What is Façade and why we need it to use?


Don't forget to download code and database file

Factory Pattern
5 Lectures 13:35

If you have different processes for same work than factory pattern is for you. Let's learn something for İt

Preview 00:50

I will design a code way to understand what makes you use factory pattern. This bad way will make a decision point about wrting if - else blocks in your main method.

Bad Way

You will see how a factory works with different types. Actually we will make different type same from base. Lets see how it will do this operation

Good Way

We have learn Factory pattern and maybe you want to apply it in some actions like we said here


Strategy Pattern
5 Lectures 15:27

This pattern like factory pattern but there are some differences. Lets see where should we use a strategy pattern.

Preview 01:21

There is a code sample about logging a content to both file system and sql server and to a ftp server. Code is working but not compatible to software principles. Lets analyze codes and prepare environment to apply our pattern

Bad Way

Our project needs some fixes. An interface and a context class will solve the problem.

Good Way

We have learn Strategy Pattern. Dont forget to compare with Factory Pattern and see samples with log4Net


Composite Pattern
7 Lectures 28:25

If you have a structural hierarchythen Composite pattern is for you. For example a user authorization or employee hierarcy. Lets meet with Composite pattern

Preview 01:04

Understanding Composite Objects

Before completing our real world sample I wanted to set up our environment. I didn't want to pass sample with basic features. You can see it in the video

Real World Sample - 1

We have started to apply composite entity to hierarchical data template. Lets do the job. After watching video you will see the problems and bug. And we will solve them together

Real World Sample - 2

We have completed our operation. If you want to complete following operations taht would be a good sample for your archives.

Real World Sample - 3 (Final)

We have completed Composite pattern. Try to create you application including composite pattern


You can download sample codes from here

Builder Pattern
5 Lectures 22:07

New section is Builder Pattern and lets talk about it in this introduction video

Preview 01:17

I wanna show you bad way before how we need a builder pattern work. There is a search system in this video and we will just see how it is working.

Bad Way

Search system needs to obey to SOLID principle. At first Single Responsibility, Then Open - Close Principle. Because bad way method is making eveything in on way. We need split up the query and call them to build the results. Lets see how it works

Good Way

Different work parts are working together to build something. We have seen how a builder pattern works


You can download the exercise files from here. Feel free to ask about anything

Data Transfer Object Pattern (DTO)
5 Lectures 12:40

I want to introduce you Data Transfer Object Pattern. When we need a DTO? We will talk about that

Preview 01:03

We will do a database operation to create a necessity of Data Transfer Pattern

Bad Way

We have seen the bad way and we should handle this weird work. Lets see how can we do that

Good Way

We have worked on Data Transfer Object Pattern. You can try your ways to appyle this logic.


You can download project codes from here

Dependency Injection Pattern (DI)
5 Lectures 08:12

We will talk about Dependency Injection and I will say something about SOLID Principles - especially about Dependency Inversion Principle - 

Preview 01:13

When we need a dependency injection pattern? At first we will se some codes and we will talk about why we should use dependency injection for this codes

Bad Way

SOLID principles is one of the main book for software development. And dependency injection is a big schema to obey this rules. We have applied DI to bad way codes andnow we can expand our operation without doing overloading and duplication.

Good Way

We talked about DI pattern. You will understand the importance of this pattern when you use it, trust me :) You can check hello world samples for dependency injection pattern on blog sites too.


You can download codes from here. Dont forget to use Northwind in you project


Dependency Injection Exercise
1 question
Inversion of Control Pattern ( IoC )
7 Lectures 32:32

I wanna introduce you IoC Pattern. We will do good samples with this pattern and you will integrate this pattern to your projects

Preview 01:14

It is time to meet with IoC pattern. I will introduce Ioc with DI pattern and show you a hello world sample. What is dependency and why we are always afraid of that class dependencies? Next lecture is really good step for real world.

Introduction to Inversion of Control

We need to design an architecture to manage instance before not to be late. If you have a big project than some class dependencies can be a big problem. A simple IoC container can save your time instead of changing them. Design it at first and dont face that weird problems

Simple IoC Container

I will introduce you Microsoft Unity Container. At first we need to see basic usage. We already did this before in previous video

Microsoft Unity Container - 1

Let's use some another operations for Unity. For example parameter injection or Singleton pattern usage. 

Microsoft Unity Container - 2

Longest course content has just finished. I mixed content with Dependency Injection. That is the reason of having short videos in previous section. Inversion of Control will save your code life in many times and I hope you will like it. And a plus Unity is really good library for managing instances. 


You can download code files from here

1 More Section
About the Instructor
Can Perk
4.8 Average rating
17 Reviews
95 Students
3 Courses
Software Developer & Consultant

Working on Microsoft technologies. 

I was graduated from University of Süleyman Demirel based on Computer and Controlling Education. During my work life I have been trainer on MCSD courses many times. 

Now working at BilgeAdam and Microsoft MCS consulting based on a project

I finished 2 Sharepoint Project on governements based on SharePoint. At the moment I am working on another big project based on WCF and WPF project