The following FAQ contains questions and answers on MageBridge development.
The architecture of MageBridge allows for multiple bridge-requests to be combined in one single HTTP-request. This means that when the bridge fetches a shopping cart, a login-request and the main content-block it only involves one call to the Magento application which gives the best performance.
With a protocol like XML-RPC or SOAP it's possible to call an API-method to fetch data, and its even possible to combine calls into one single multi-call - which would give the same performance-benefit as the MageBridge API. However, if there is a relation between multiple bridge-calls in the same request, with XML-RPC it's much harder to make one call depend on another.
The strategy of MageBridge is therefor to bind all requests into one single data-structure and send this data-structure as a JSON-array through the bridge. Each API-call uses one and the same data-structure, so common data is combined between all calls and not transmitted twice. The data-structure also contains more than just method-arguments, it contains meta-data as well which could be cached on the Joomla! side.
Note that for the main bridge-architecture JSON is used to transmit data. But as soon as requests need to fullfilled at once, for instance when sending events from Magento to Joomla!, MageBridge falls back to XML-RPC for which support is present in both Joomla! as Magento.
Actually this is not related to MageBridge, but Magento. Unfortunately there is no easy way to add custom fields to the profile of a customer in Magento. However, if you manage to add fields (through core hacks or any other way) you will find that MageBridge replicates these fields automatically to the Joomla! side.
MageBridge has the responsibility to synchronize user profiles between Joomla! and Magento. While the core Joomla! fields (name, username, email and password) are of course synced, by adding extra profile connectors in Joomla! you can also add support for Community Builder or JomSocial profiles.
If the Magento customer profile contains a field with the same name as the profile on the Joomla! side (Joomla!, Anahita, CB, Jomsocial) it will automatically be synced.