Using magento apis for an e-commerce website

I am starting to work in magento and am working on building a website using magento. I noticed that magento has a large number of apis that reveal all the functionality I need to create an e-commerce website. So, I would like to use magento apis to get the data, but develop the interface separately, without any dependencies on magento. I found many links that develop the website using magenta themes, but not those where the user interface is developed in a separate MVC and uses magento exclusively as a service level. Are there any problems / issues in my approach?

Edit: I got a lot of clarity on the issue of db performance in apis and how external caching can ease the problem, but I still don’t understand how unsatisfactory is using magento as a service level (for example, refueling a site using magento apis), are they any other gotchas?

+4
e-commerce magento
source share
4 answers

Here's how we broke the slowness in the Magento API:

  • Created a web service provider in J2EE, Spring MVC, which acts as a proxy between Magento and end users.
  • The J2EE web service provider provides almost all of the APIs that Magento has, but also supports JSON with REST along with SOAP and RPC.
  • The J2EE web service provider uses a document-based database (MongoDB) to store a snapshot of the product catalog in MongoDB.
  • The J2EE web service provider uses MongoDB's own caching to quickly work with data without having to run costly SQL queries.
  • To avoid dirty caching problems, we created a hook in Magento Admin to enter data into MongoDB whenever the data changes in Magento.

This may seem overly redundant, but we managed to achieve a fairly high throughput without any sluggishness.

+2
source share

The Magento API is slow, you are facing serious performance issues trying to start a site.

Due to the complex nature of the EAV model, it can be difficult for you to manage products only through the API.

Are there any special issues with using the Magento frontend? This is difficult at first, but once you understand the layout system, it is really very powerful and customizable.

+2
source share

Technically, you can only launch a site through the API.

The problem you may encounter is practical, instead of spending time learning all the API calls, you can learn how to implement your current interface in Magento.

The advantage of this approach is that you will also better understand how Magento works internally, which allows you to use its functionality for your unique business needs.

Another problem is that when using the API you have a little less control over how things are processed / calculated, and when working in Magento there is a lot of control over the specifics.

+1
source share

I regularly see session expiration issues when accessing the Magento API through SOAP and XMLRPC. All my calls require exception handling to avoid stopping execution. I believe that only one will create a nightmare when building everything on top of the API.

The best answer you get is to download an API test before you start coding. Repeatedly register tests and look for errors. If you see errors on a normal basis, that should answer your question. Even if you find documentation that says that everything is in order to do what you are trying to do, you still have to configure the API to work correctly under the load required to run the store.

It would be nice to know what you are faced with before plunging into development.

+1
source share

All Articles