Posted on May 16, 2010
So you have a Magento site? Do you want to embrace the not so new world of mobile? Well here’s an idea of how to do it.
The great thing about Magento is that you don’t have to embrace the full MVC framework of it. Magento has built in 3rd party access in the form of web services and apis. Although these api’s use the Magento framework, you can bypass the whole theme business of it by using these apis. One thing you have to take into consideration is that there are more things to think about than just the site itself and how it looks.
For wap – you have to take into consideration device recognition. There are a few ways to do this, some really hard to maintain and a few tricks of the trade. One option is to use UAProfs(User Agent Profile). These are xml files that contain device capabilities and the location of such is usually found in the headers when a mobile device browses to your site under ‘X-WAP-PROFILE’. The only problem with this approach is that these files are often out of date and quite often comprise of malformed xml which can provide lots of headaches. I would not suggest this method to anyone these days as there are solutions that you can use. WURFL is a database of device capabilities based on the user agent that you get everytime in the http headers. There are others as well but WURFL has the benefit of being free! Yay! An example of a paid service is Device Atlas – but you know how much I hate paying for things :D. WURFL also has a nice companion called TeraWURFL which is a PHP extension. Very useful for Magento which is also written in PHP..By extracting display functionality from Magento and keeping the Magento installation purely functional, you can speed up your wap site considerably. Mobile themes that come with Magento use the whole framework which over even a 3g network, can take a long time to work. Especially if you want to have device recognition and especially if you want any type of subscription service (SMS alerts to customers or taking money through SMS as you will also need to use operator, territory, MSISDN identification which done incorrectly can add precious seconds on load time….) you will need to really interogate your load times for all these services to be called and established.
Device recognition is not built into Magento so you need to incorporate this in yourself. Since mobile sites often lend themselves much more nicely to SOA, I would not bother integrating it into Magento. Magento’s API’s make a nice section of your SOA structure to do all your store needs without having to use the full blown Magento architecture.
More info on wap development along with device recognition to follow rather than a tangent here!
The great thing about the APIs as well is that while your wap store is making some monies for you, you can use the Magento apis again to create your own mobile apps for smart phones such as IPhone and Android devices.
Be aware that IPhone apps have to be vetted by Apple so make sure you read up on their specs! The less functionality you keep on the ph0ne in the app itself the better. It’ll run faster and provide a much better user experience and the apps come really in handy for that so that only display is dealt with on the actual device. You can use SOAP or REST with Magento (I prefer SOAP due to most people completely misunderstanding REST, if anyone says they completely get it, I would take a lot of convincing to believe them!), it is not platform dependant. If you create an extension of Magento using a nice SOA gateway, you can provide for all your mobile needs by keeping Magento doing what it does best, product management and store functionality.