Jump to content

Extending my module to existing module - How bad idea?


Stikki
 Share

Recommended Posts

Howdy,

Like topic states, is this how bad idea in general?

I'v seen people ship own classes with modules, but didn't see people to extend modules to other modules, why?

Is this because of bad practice? After all, modules are being autoloaded by system on demand, therefore classes are being available, and as far i saw, you can't install module that has dependency to other module, if parent module ain't existing.

I am just asking if this is bad PW coding in general or just something no one really done before?

Cheers

Link to comment
Share on other sites

Are you talking about people extending other custom modules other than core? There is nothing wrong with extending other modules if it suits your needs. Why reinvent the wheel? Of course, if your module is extending another, your module code needs to make checks whether the extended module is installed or not and what to do in such cases, etc.

If referring to custom modules extending others, there are a couple of examples here, I can't find them all but MigratorWordpress extending MigratorAbstract comes to mind. 

Btw, autoloaded and loaded on demand are two different things :-)

  • Like 2
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...