Why does XmlConnect depend on so many modules?
magento
Solution
Assuming you're talking about the `Mage_XmlConnect` module located at
app/code/core/Mage/XmlConnect
then it has a "frightening" list of dependencies because the module has a "frightening" amount of functionality.
The `Mage_XmlConnect` module implements a backend for Magento Mobile's phone based store applications. (If you're clever you could use it for your own mobile application). It depends on all those modules because it uses objects from those modules to implement this functionality.
While I wasn't a part of the team that built the Magento Mobile application, I assume there was a requirement that it include wishlist items and reviews, therefore the `Mage_XmlConnect` module depended on the review and wishlist modules. Theoretically the Magento Mobile application could have been split up into multiple modules itself, but each module added to Magento has performance implications, as well as complexity implications. Given the pace the Magento team needed to work at at the time, it's easy to see why they chose to implement everything in a single module.
It's also important to remember that, while its possible to disable modules, Magento was never engineered with that goal in mind. In practice the module system exists more to prevent code pollution between modules, and to allow multiple teams (or individual developers) to work on their features without impacting other developers. Isolating the functionality of each module so the system could run independent of any particular module would be neat — but there would have been little ROI for Varien/Magento Inc. in doing that. Therefore it wasn't done. You may not like it, but that's how most software with commercial/business implications is developed.
If you want to use `Mage_XmlConnect`, you need to have those other module enabled. However, `Mage_XmlConnect` is not strictly needed to run a store, and can (likely) be safely disabled.
Problem
I was trying to disable some of Magento's core modules for a stripped-down store. I got an error saying that XmlConnect relies on one of the modules I had disabled. I pulled up the module XML file for XmlConnect and saw its frightening list of dependencies: ``` <depends> <Mage_Checkout /> <Mage_Paypal /> <Mage_Usa /> <Mage_Tax /> <Mage_Weee /> <Mage_Catalog /> <Mage_CatalogSearch /> <Mage_CatalogInventory /> <Mage_Bundle /> <Mage_Wishlist /> <Mage_Rating /> <Mage_Review /> </depends> ``` Given that such critical modules as Catalog and Checkout are depended on by XmlConnect, it's effectively impossible to disable, and therefore impossible to disable the not-always-necessary modules like Wishlist and Review. Why does XmlConnect depend on so many incidental modules? Is it possible these dependencies are backwards? Is it safe to remove them?