OrchardCMS / OrchardCore.Commerce

The commerce module for Orchard Core.
MIT License
203 stars 83 forks source link

Separate `OrchardCore.Commerce` into more projects (OCC-81) #175

Open sarahelsaig opened 1 year ago

sarahelsaig commented 1 year ago

Is your feature request related to a problem? Please describe

At least create a OrchardCore.Commerce.Core, probably also a OrchardCore.Commerce.Prices. Organize the projects, so we can create modules without having to throw everything into OrchardCore.Commerce as an everything-bucket.

Describe the solution you'd like

OrchardCore.Commerce module should only contain the cross-cutting concerns, everything else should be moved to new lower level modules. Note that #149 is related, but it has other enhancements. The two can be done in any order.

Describe alternatives you've considered

Currently we have almost everything in that one module. We have already started moving away from that with OrchardCore.Commerce.ContentFields, but so far anything that involves existing content parts or services has to go into OrchardCore.Commerce which is not ideal.

Jira issue

bleroy commented 1 year ago

This seems like an internal project organization problem. Segregating the code into area folders and Orchard features seems like a better solution, unless there is user benefit in having separate modules. The question for me is whether users would choose not to install the prices module and if so, why? What are the scenarios this helps with?

Piedone commented 7 months ago

Doesn't https://github.com/OrchardCMS/OrchardCore.Commerce/issues/149 cover this?

sarahelsaig commented 7 months ago

Only partially. It was just the minimum amount needed to separate payments into a separate module. We should still further refactor common code and move stuff from OrchardCore.Commerce in the tax/promotion/inventory modules if they only concern that module with no overlap.

hishamco commented 7 months ago

Can I work on this?

One more thing I notice a strange namespace *.Abstractions.Abstractions" which is weird IMHO

sarahelsaig commented 7 months ago

This should be done before the next major version (because it will involve breaking changes) but it's not a priority. Also I'd rather do it myself since I already have a reasonable vision about what needs to be done. I recall you've shown interest in contributing to #300 in the past, wouldn't you rather do that?

I totally agree, OrchardCode.Commerce.Abstractions.Abstractions doesn't look good. I anticipate it will be renamed OrchardCode.Commerce.Abstractions.Services, but it's not yet set in stone. Also I consider abolishing the Abstractions directories in every module and moving the service interfaces into Services. Like it is in every other Lombiq and OrchardCore project I've seen.

hishamco commented 7 months ago

I recall you've shown interest in contributing to https://github.com/OrchardCMS/OrchardCore.Commerce/issues/300 in the past, wouldn't you rather do that?

Sure, I need to revise the related issue