VirtoCommerce / vc-storefront

Virto Commerce Storefront - ASP.NET Core 8.0

Home Page:http://virtocommerce.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strange behavior of class QuoteRequestBuilder

t13ka opened this issue · comments

I always thought that the builder should build something but on the contrary, we have different actions here which are not really correlated with the name. In my opinion, the builder should return some built object/s. This class serves as the storage or proxy or service or manager. It is quite hard to understand the idea

https://github.com/VirtoCommerce/vc-storefront-core/blob/84ce8d7393b8b01cd23822208a955624e0fe0078/VirtoCommerce.Storefront/Domain/Quote/QuoteRequestBuilder.cs#L24

I suggest try this out for future refactoring: https://refactoring.guru/design-patterns/builder/csharp/example

I agree on this, looking at the interface methods. probably Manager is better.
But I doubt we could change it, as it would be breaking change.
@tatarincev What do you think, could we change this interface name?