View Single Post
  #5  
Old 09-03-2015, 03:17 AM
 
cleverwise cleverwise is offline
 

Advanced Member
  
Join Date: Jun 2014
Posts: 74
 

Default Re: Module Development - Stuck

Thanks for the reply.

I do understand about making upgrading easy. I think you missed what I was saying though. I didn't mean putting code just anywhere.

I will refer back to Wordpress for a just a moment, not that that application is perfect or the only one I have developed modules on (WHMCS and Clickcartpro are other systems just to name a few more).

The way WP does it is every module must be self contained in its own directory/folder than is installed in the wp-content/plugins. However unlike X-Cart one doesn't have to create several small template files. What a developer does is inside say wp-content/plugins/my_unique_plugin is they create say index.php and then just call a few functions that hook into WP's calls.

Then a developer defines their own unique function calls and can program dozens, hundreds, or thousands of lines of standard php code. All this can be done from within the single index.php inside wp-content/plugins/my_unique_plugin (as an example). Still many developers will start breaking their long code into other files and hooking them in.

On an upgrade if the module my_unique_plugin breaks something one can just upgrade the code in that directory or simply disable the module. So it helps in upgrading, maintaining plugins, and creating plugins since one doesn't need to generate many small template file calls.

That was what I was trying to say. I realize X-Cart doesn't work that way but IMO it makes it a lot harder than say Wordpress, WHMCS, ClickcartPro, etc. I agree developers should keep all their code in a module directory and just hook into the main system without just adding php script code in any main file.

Thanks again for the reply and I hope that clarifies what I was trying to say.
__________________
Respectfully,

Jeremy

X-Cart 5.3 running on:
* Web server: Nginx with PHP-FPM via FastCGI (Opcache enabled)
* Database: Percona Server
* OS: CentOS
Reply With Quote