Develop your own Magento mobile application
2012-12-26 18:52
183 查看
Do you want to develop your own Magento mobile application?
Great! I’ll give you some pointers on how to get a grasp onMagento’s XMLConnect, an extension that servesMagento Mobile application.
Keep in mind that XMLConnect extension comes ‘preinstalled’ inMagento CE 1.5 and later, but you can get it from MagentoConnect.
XMLConnect extension’s purpose here is to serve your applicationwith requested data (category listing, product information, etc.)and execute desired actions (buy, log in, checkout, etc.).
Basically, application sends a request (plain HTTP GET/POST) toyour Magento store (XMLConnect) and it responds with an XMLresult.
The best way to get familiar with XMLConnect is to see it inaction:
1) Set up a Magento store on your web server with some sampledata
2) In Magentoadmin->Mobile->Manage Appsadd a new mobile application
3) Install Magento Mobile on your device
4) Start Magento Mobile on your device with your Magento store urland the app code of the application you just created inMagento admin->Mobile
While exploring Magento Mobile, keep an eye on (Apache) activitylog file to see exactly what the application is requesting from theserver.
For instance, the first request would probably be the applicationconfiguration request.
/xmlconnect/configuration/index/app_code/defand1/screen_size/480×800
We recognize in this request an app code (in this example it is“defand1″) and your device’s screen size (here it’s“480×800″).
Let’s check out what is the result of this request. In your browsernavigate to:
http://magentoivica.loc/xmlconnect/configuration/index/app_code/defand1/screen_size/480×800
(obviously, replace “magentoivica.loc” with your web server name.Recognize the rest of the url?)
Voilá, what you should get is an entire configuration of yourapp (as it is set in your Magento admin) in an XML format.
Using this practice, you can easily explore most of thecapabilities of XMLConnect. Also, it may be necessary to get intothe code of XMLConnect if you want to master some of the moreadvanced actions (such as the checkout process).
Ok, now you know basics of using XMLConnect, how to make arequest and what to expect as a result. But, how to use thisinformation in an Android (Java) environment?
You probably already know something about parsing XMLdata. I will show you a better way (probably) which willallow you to have more
modularity andsustainability in an Android applicationdevelopment.
So, stay tuned
Great! I’ll give you some pointers on how to get a grasp onMagento’s XMLConnect, an extension that servesMagento Mobile application.
Keep in mind that XMLConnect extension comes ‘preinstalled’ inMagento CE 1.5 and later, but you can get it from MagentoConnect.
The Big Picture
Awhile ago, Magento Mobile was released for iPhone, iPad andAndroid devices. It consists of two parts: a Magento web store withan XMLConnect extension installed and configured, and a nativeapplication itself.XMLConnect extension’s purpose here is to serve your applicationwith requested data (category listing, product information, etc.)and execute desired actions (buy, log in, checkout, etc.).
Basically, application sends a request (plain HTTP GET/POST) toyour Magento store (XMLConnect) and it responds with an XMLresult.
The best way to get familiar with XMLConnect is to see it inaction:
1) Set up a Magento store on your web server with some sampledata
2) In Magentoadmin->Mobile->Manage Appsadd a new mobile application
3) Install Magento Mobile on your device
4) Start Magento Mobile on your device with your Magento store urland the app code of the application you just created inMagento admin->Mobile
While exploring Magento Mobile, keep an eye on (Apache) activitylog file to see exactly what the application is requesting from theserver.
For instance, the first request would probably be the applicationconfiguration request.
/xmlconnect/configuration/index/app_code/defand1/screen_size/480×800
We recognize in this request an app code (in this example it is“defand1″) and your device’s screen size (here it’s“480×800″).
Let’s check out what is the result of this request. In your browsernavigate to:
http://magentoivica.loc/xmlconnect/configuration/index/app_code/defand1/screen_size/480×800
(obviously, replace “magentoivica.loc” with your web server name.Recognize the rest of the url?)
Voilá, what you should get is an entire configuration of yourapp (as it is set in your Magento admin) in an XML format.
Using this practice, you can easily explore most of thecapabilities of XMLConnect. Also, it may be necessary to get intothe code of XMLConnect if you want to master some of the moreadvanced actions (such as the checkout process).
Ok, now you know basics of using XMLConnect, how to make arequest and what to expect as a result. But, how to use thisinformation in an Android (Java) environment?
You probably already know something about parsing XMLdata. I will show you a better way (probably) which willallow you to have more
modularity andsustainability in an Android applicationdevelopment.
So, stay tuned
相关文章推荐
- Launching Your Own Application via a Custom URL Scheme
- How to develop a window mobile application
- Why you shouldn’t connect your mobile application to a database
- How to develop a window mobile application
- How to develop a window mobile application
- 44. Building Your Own Application
- 【转载】How to develop your own Boot Loader【怎么样开发自己的bootloader】
- How to develop your own Boot Loader
- Develop your own filesystem with FUSE
- 【英语天天读】Develop Your Own Helping Rituals
- Launching Your Own Application via a Custom URL Scheme
- Build your own CAB(Composite Application Block) Part #2 – The Humble Dialog Box
- [Tools] Create your own mobile emulator device by using Chrome dev tool
- Why your ASP.NET MVC Application needs its own framework
- Create your own mobile Ubuntu repository with APTonCD
- How to create your own api with ACL in Magento
- Launching Your Own Application via a Custom URL Scheme(在短信链接中打开你的程序并且给你的程序发送消息)
- Develop your own module on Site Engine
- 2010年9月12日周日_Builing your first mobile application_1.3
- Launching Your Own Application via a Custom URL Scheme