I’m currently investigating the best way to integrate Oxid with Flash based UIs using the AMF protocol for communication between the shop and the Flash/Flex/OpenLaszlo client. The ZendFramework - starting from version 1.7.0 - support the AMF protocol (thanks to a co-operation between Adobe and Zend). Has anyone else tried a similar thing or would be interested in following that approach?
In the end I envision something like a ZendFramework based module creating REST and AMF based APIs for Ajax/Flash clients and widgets.
We have already implemented an amf gateway for oxid 4 - at the moment it is only interacting directly with the database and has only rought methods because it fits a special purpose, but I could help out if there are any questions regarding AMF/Zend. Here look at that designer on the front page it communicates via amf with the shop:
Thanks for your response. Actually I’d like to get around accessing database tables directly. That’s easily done, but any modification or upgrade of the shop might break the functionality.
This is just a simple hack for now, but I can load the product listing into my Flex app through that. Adding more web services for basket, categories, etc. can be easily done using this approach. The most elegant way to continue would be to add a few lines to .htaccess to map calls like
This is a really good base to work from, perhaps you could open up a google code repository or something like that - I would be willing to contribute into that because I have a lot of flex apps going the direct db approach and want to control everything through the shop system.
You can also communicate with .Net, Ruby etc. via AMF - have a look at weborb, and I think there are several other implementations for the protocol - SOAP has too much overhead.
why is soap too much overhead? complete ebay uses soap and so its more than easy to communicate with ebay. add items. del items. etc. an implementation like ebay has would be a great improvement to oxid and would be a lot more flexible instead of using several other ways. so u can access the webservice very easy with the most used programming languages.
an oxid shop cant be nearly as complex as ebay so the question is: what do ebay right
Yes that’s true, but communication with the ebay api is slow, a good documented AMF3 api will not be too hard to understand and use either. And the good thing about using the zend framework will be that you can use nearly the same code communicate via SOAP/REST etc.
communication with ebay is slow because its a lot bigger and a lot more ppl accessing the api then u will ever have in an eshop with oxid.
i wish all systems would be so fast like ebay with the same amount of content ^^ believe me if ur eshop runs only 10% as fast as ebay with millions of articles that would be awsome ^^
if u can use nearly the same code to communicate in SOAP why dont u then provide a SOAP way? with f.e. .NET i can access SOAP/WSDL webservices directly without 3rd Party Tools. So i could provide the community with some .net classes.
Ok then we should start with a google code project. I have setup one here, sorry rajubitter but I think we should host it there because it is a quasi defactor standard and everybody can sign up easily there.
I have just checked in my first draft for the whole thing, I have setup a “No-Zend” connector because I do not want to use the Zend stuff at all (the zend amf implementation still lacks a lot of features, bytearray is broken, rest parameters are not respected etc. - not production ready in my opinion). Feel free to add a Zend version if you like to.
This first draft can already be used, just add the bridge.php into your oxid shop folder and upload the amf folder into the shop root. That’s all you have to do - I have modified the globals.php to include the bridge with all calls. The rest is business as usual, just add services to the services folder and connect to them via the gateway.php. The only difference is that you know have the possibility to use the oxid classes inside of your amf services. I will add a small sample service for putting stuff into the cart in the next days.