Event forwarding with MageBridge
Tuesday, 07 July 2009 Joomla! and Magento are complex applications that do not handle only content, but users and other entities as well. When using MageBridge, both applications need to be integrated at various levels. For instance, you should be able to login with the same username and password in both Joomla! as Magento. Luckily enough for developers, both applications offer enough options to extend the normal behavior - which is exactly what MageBridge needs in order to operate correctly.Technically speaking, as soon as an user tries to login into Joomla!, an event is generated to authenticate that user through its username and password. Because the Joomla! username can be the same as the Magento username, the username and password are handed over to the MageBridge Authentication Plugin (in Joomla!) that forwards the authentication request through the bridge to Magento. In Magento, the username and password are checked against the Magento database, and the result is sent back to the Joomla! plugin.
Because MageBridge brings Magento to Joomla! (and for now, not the other way around), this process of "forwarding an event through the bridge" opens up for other interesting features. While Joomla! events can be forwarded through the bridge to Magento, the principle works also the other way around: A Magento event can be forwarded to Joomla! and interact with Joomla!. With MageBridge we have brought this logic to the next level, meaning that a Magento event is forwarded to Joomla! as a Joomla! event.
This architecture allows for third party developers to extend the functionality of MageBridge by programming regular Joomla! plugins (without much knowledge of MageBridge) and interact with Magento events as if they were generated inside Joomla!.
For example, when a checkout is performed in Magento, the resulting checkout-order can be reused in Joomla! to add an user to a Community Builder group depending on the product SKU or product ID. A Joomla! extension could even modify Magento-data in the process and send the resulting data back to Magento. You can imagine that this flexible architecture allows for many integrations between Joomla! extensions and Magento modules.
All MageBridge customers get access to free support through protected forums and extensive tutorials that explain the creation of MageBridge plugins.
