“The creational patterns are about class instantiation and object creation. It can further classify into Class-creation patterns and object-creation patterns. The class-creation patterns use the inheritance methods in the instantiation process. The object-creation patterns use delegation ways to get the task done. The creational designs have more ways to implement, such as the Factory Method, Abstract Factory, Builder, Singleton, Object Pool, and Prototype.”
From Design Pattern – Introduction
The “Creational Pattern” has more ways to implement, but how to use it in the .NET framework web application? This article can help the reader quickly understand how to use these patterns and demo these patterns without/within a web application project.
Note: All demo samples will build in the .NET Core case project so if you want to see the complete source code in everyone’s pattern articles, please, click the Github repository – Enterprise_MVC_WebApp.
In any computer language or framework, the creational patterns have a different mechanism that may be default setting or customer editing by SDK or the computer language characteristic. Writing format isn’t necessary! The developers should see these source codes bring about what kind of effect in the projects? Developers should ask themselves, “Is it good for this project in future management and future source code growth?”
Reference
What is the API gateway? An API gateway is an API management tool that sits…
The .NET 5 SDK is a kind of milestone in the .NET world. The .NET…
In object-oriented design, the dependency inversion principle is a specific methodology for loosely coupling software…
In the field of software engineering, the interface segregation principle (ISP) states that no code…
Subtype Requirement: Let be a property provable about objects of type T. Then should be true for objects of type S where S is…
In object-oriented programming, the open–closed principle states "software entities (classes, modules, functions, etc.) should be…