Question

Module

We're creating a webshop and are mostly creating every file we need in app/code/vendor/module right now. This means we have lots of different features like widgets and logic for multiple different things in one module. This ends up becoming quite a mess of code specifically developed for the current webshop.

We've been wanting to take a more modular approach to developing in Magento and we were wondering whether it's better to split all different features up in different modules under our own vendor folder?

If someone has any examples of how such a project should look it would be greatly appreciated!

Was it helpful?

Solution

Split it up into isolated modules for specific functionality/responsibility.

For example if you have an external service ERP that handles your product data, orders and customers, you may eventually move away from that service and it is much easier to remove a single module than to untangle from a large module that does everything.

OTHER TIPS

Magento2 already forces you to make remarkably huge number of files(for a single module) for a strict MVC implementation, so if you make more than one modules for implementing relatively smaller tasks, I think it's gonna over-complicate things a bit more for you since you'll have to manage more than one modules with such huge number of files. Magento doesn't provide much flexibility, and you need to become used to of that. :)

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top