Jump to content

Best practice for using a 3rd party SDK in a plug-in?


Go to solution Solved by bfarber,

Recommended Posts

Hello,

Please can you confirm from a newbie perspective whether it is possible to use a 3rd party PHP SDK such as Amazon SDK within a Marketplace acceptable plug-in?

If so, if you have multiple plugins or apps that use it, does it get stored in one 'shared place' to avoid unnecessary duplicates? Or would namespacing it be advisable. What would be the preferred best practice?

Many thanks.

 

Link to comment
Share on other sites

  • Solution

You generally won't be able to include a third party library like that in a plugin, because you can't easily include extra files like that in a plugin. You would need to use an application instead to include a third party library.

The only way to "share" the library would be to have one application that contains the shared library and each of your other applications that uses the library just makes sure the shared application is installed.

if( !\IPS\Application::appIsEnabled('shared_application') )
{
	die( "Sorry you need this other application installed first" );
}

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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