• Welcome to KonaKart Community Forum. Please login or sign up.
 

Difference between KKEngIf methods and *Mgr methods

Started by PiotrN, February 07, 2012, 01:55:17 pm

Previous topic - Next topic

PiotrN

Howdy,

I'm planning to create a completely new UI for our KonaKart eCommerce, so I'm planning to use the server API instead of client API (we'll be replacing Struts with Spring MVC).

I started to skim over the Server API and bumped into a question mark. Let's say I want to add a product to the basket. The first method I noticed is the KKEngIf#addToBasket(-). However, I've realized that there is a number of *Mgr classes like BasketMgr which can help me, as it has also the addToBasket(-) method.

Are the *Mgr classes just a convenience ones and their only aim is to provide developer with easier access to the underlying storage? Is one way (KKEng or *Mgr) preferred one and should be used instead of other?

Thanks in advance.

Regards,
Piotr

julie

You should always use the KKEngIf API calls. This approach gives you the flexibility to use the POJO, SOAP, RMI, JSON or custom engine without having to change a line of code of your eCommerce application, resulting in many options at deployment time.


kate

Another reason to use the APIs is that these should remain backwards-compatible in future releases preserving your investment in the code you write against KonaKart - making it easy for you to upgrade to future versions for bug fixes and new features.   The managers used by the engines are more likely to change than the APIs.... 

PiotrN

Thanks for the answers.

So, the rationale are very convincing.

Julie, if I'll create an instance of KKEngIf and use it to create one of the manager classes, how would the data be sent to the KonaKart server? Isn't it also protocol independent?

Thanks in advance.

Regards,
Piotr