0
votes

I'm planning to build some custom module for Orchard.

Now I'm planning a module with many "features" in it that may be disabled / enabled at will. As example see this project: https://bitbucket.org/bleroy/nwazet.commerce/src/aaf4eb89b711d99181a11c94bdaefc13ca086903/Module.txt?at=default

When there are many features in the same project the logical organization that I see is to divide files in namespaces by role (all services in service namespace, all controllers in controllers namespace and so on).

When a module grows and there are 5 or 10 features it is a bit messy because usually one works one feature at time and at same time you have in service or model directory the models for 10 features...

I know that Orchard uses a lot of implicit code conventions and this is especially true with file placement.

The questions are: May I add an extra namespace layer so that in a single module I have one folder for each feature and a project a bit more clean?

Probably Views must remain all together, does the other files may be moved?

What is the recommended best practice in this situation?

Mvc allows to use areas in this scenario but orchard modules are already areas... May I use areas in an orchard module?

Thanks

1

1 Answers

0
votes

Modules already being areas, you can't have areas within them, so yes, you will have to respect the conventions and have something a little messy, or you will have to split it into separate modules.