X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   X-cart 5 module developer conflicts (https://forum.x-cart.com/showthread.php?t=69875)

totaltec 08-26-2014 07:57 AM

X-cart 5 module developer conflicts
 
I want to start a thread discussing possible conflicts between modules by third party devs.

Module developers each get an assigned developer ID like BCSE or Justuno that they can use to keep their modules unique and separate in the file structure.

But there are other potential conflicts which could possibly arise. I intend for this thread to help document best practices and avoid these conflicts.

List of potential conflicts (updated):
1. An obvious one is appending your developer id to any database tables that are created by your module. so if you are creating a table for your module named banner_images, put your dev id in front like XXXX_banner_images

2. Another one I just encountered today is targets for admin and customer side. If you are creating a module that makes a new page, the target needs to append your developer id. So if you make a news module like Tony describes here: http://kb.x-cart.com/display/XDD/Webinar+1+-+18+Mar+2014+-+Developing+modules+for+X-Cart+5 the target should probably be --target=tony_news

3. CSS classes and element ids. Good idea to append your dev id to your CSS classes as well as any id names for html elements that you assign.

4. Language labels. Could be a potential conflict if the label already exists.

5. Javascript functions. Append that dev id in your function names..

I'm sure there are other places where this is important, please add yours, comment, and correct me.

cflsystems 08-26-2014 08:12 AM

Re: X-cart 5 module developer conflicts
 
One possible solution about tables names is XC5 to force devid_ in front of table name. Right now when adding table XC5 forces xc_ (default) in front of the table name - so if my table is csi_table_name it becomes xc_csi_table_name - I don't like this in particular as this table is not part of the stock XC tables, I would much more prefer to be without the xc_ in front.

But if the code itself will be forcing DEVID_ in front we need to know or tbales will end up with devid_devid_table_name....

Same can be for targets I guess.

So maybe if the default XC5 code itself forces devid_ in front of everything that can be in conflict there is no need for us to watch out for it... Just a suggestion, not sure how difficult is for this to be included or what happens when you have devid - thisismydevidnomatterwhat :)

qualiteam 08-31-2014 12:39 PM

Re: X-cart 5 module developer conflicts
 
Hi!

Good points!

I've sent a link to this thread to the XC5 devs. Perhaps, they could implement some of the ideas in future XC5 versions.

Thanks!

tony_sologubov 09-03-2014 11:54 AM

Re: X-cart 5 module developer conflicts
 
Hi guys!

Thanks for sharing ideas. These are important points and we will be implementing them once we catch up with the most major functionality. I believe, it will be in a year or earlier.

Just do not want to over-promise that we are going to add them soon.

Anyway, they are in my TODO list and we will come to it later on.

Tony.


All times are GMT -8. The time now is 05:46 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.