C-Sharp Design Patterns Factory and Abstract Factory
This course covers the creation patterns Factory and Abstract Factory in C#. Filip Ekberg, principal consultant and CEO of an agency based in Gothenburg, Sweden, guides learners through t...
Expected outcome: At the end of the course, you will be able to implement these three patterns and build more extensible, maintainable and testable applications.
The simplest way to explain the concept of a factory is to look at factories in the real world. The purpose of a factory is to produce a product. For example, a telephone is produced in a factory. As a consumer, you don't care about the manufacturing process — you only care about the finished product. An advantage of this factory is that several customers can obtain these phones without worrying about the creation process.
Translated into code: A factory is an object for creating objects. The goal is to move the creation (instantiation) of a class to a separate object.
Sign in to read this course
A free account unlocks all 514 courses. 20 are readable without one.
What's inside
11 sections- 1 Table of Contents
- 2 Course Overview
- 3 Introduction to factory patterns
- 4 Demo 1 — Simple Factory (First preview)
- 5 Demo 2 — Factory Method Pattern
- 6 Demo 3 — Abstract Factory Pattern
- 7 Demo 4 — Factory Pattern in tests
- 8 Demo 5 — Factory Provider (dynamic loading)
- 9 Comparison of the three variants
- 10 Advantages and rewards
- 11 Summary and conclusion
More Testing, Patterns & Architecture courses
View all 29ASP.NET Core Clean Architecture
Implement Clean Architecture with the GloboTicket app — core, infrastructure, API, Blazor UI and testing.
Automation Testing Strategies with ASP.NET Core
Unit, integration, UI, E2E (Playwright) and performance (NBomber) testing in a CI/CD pipeline.
Unit Testing an ASP.NET Core MVC Web Application
Unit test MVC controllers with xUnit, Moq and FluentAssertions — isolation, mocking and CI/CD.
Debugging and Error Handling in ASP.NET Core
Debugging tools, error-handling middleware, Problem Details, custom exceptions and remote debugging.
Logging and Monitoring in ASP.NET Core
ILogger, structured logging, providers, scopes, source generators, health checks and OpenTelemetry.
C-Sharp 8 Design Patterns Composite
This course covers the Composite design pattern in C#. The Composite pattern provides a way to work with tree structures in a consistent manner, regardless of whether you are manipulating...
Interested in this course?
Contact us to book it or get a custom training plan for your team.