Custom API – two approaches

Creating custom API interface can be done in two very different ways. This can make it very difficult to follow some of the online examples. The two common approaches are:

  • Create a custom module and implement the Zend Framework Soap method
  • Extend the core API

Custom Module

Strengths

  • very simple
  • no interaction with core magento – reduced risk when upgrading

Weaknesses

  • no security
  • no integration with existing API functions

If you have already written a module this may be the easiest approach, especially if there is no requirement to secure the feed. Check out Activecodeline.

Core Extension

Strengths

  • Supports the standard security controls
  • Seamless integration between the new and the core

Weaknesses

  • fiddly to make work

This approach is not the easiest, but the security benefits and seamless integration make it the best approach. Check out the nearly incomprehensible wiki entry or try this attempt at clarity without the security.

Richard posted at 2009-6-14 Category: code

Leave a Reply

(Ctrl + Enter)