Since we started working COR one of the main questions became what's the desired method of integrating COR into an existing website. In most cases e-commerce is a component of a larger website or web application. Hence it will be deployed by placing COR into a selected folder within the site structure.
In a case where the website is already written in Rails, COR could be deployed as an Rails Engine. However it's a fact that most websites will not be written in Rails but in PHP. Once the site is deployed into a folder we want to modify the views of the application (to conform to the XHTML/CSS template used by the site) and perhaps also some of the functionality. There is two ways to make those adjustments:
- modify the views, controllers and models of COR in order to achieve the desired look & feel and functionality and have COR be a autonomous component of the website
- integrate COR into the website using its Web services API by making apropriate API calls within your website code and adjust the functionality in your website code rather than COR itself
The first option is less complicated, but it has limited integration capabilities and requires more maintenance. This is because now you have two components in your site that both have seperate templates, that need to be adjusted whenever you make changes in them. The limitation is that you can't really do easily anything e-commerce oriented on any of the website pages that are not rendered by the store component.
The second option gives you unlimited integration but it makes the whole setup more complex. Now you have to write code to actual make API calls and interpret responses. You also have to decide how the API should be delivered: XML-RPC, SOAP or REST? If you choose REST then you need to write a wrapper class for the programming language used to build your site to easily interact with the API.
Does it even make sense to integrate COR with a website via the Web services API if COR is actualy deployed into a subfolder of a website?


No comments so far
Leave a Response
We moderate the comments in order to prevent comment spam. This means that your comment may not appear immediately after you submit it. Please do not submit the same comment multiple times.