Third Party Libraries In The Yii Directory Structure

Hello, I’m wondering where in the directory structure yii users store different types of third party libraries. I can think of three types of ‘libraries’ in particular: yii extensions, javascript libraries / jquery plugins, and php libraries (such as mpdf).

My understanding is that it is common practice to store any yii extension shared by another user or any yii extension you create and share with others in the protected/extensions directory, and to store any php library you use in your application in a protected/vendors directory.

As for javascript libraries and jquery plugins, my thought was to put them in a js/vendors directory, however, these libraries/plugins are not pure javascript as they may also contain css and image subdirectories…do they belong here or somewhere else? What is the best practice?

I’m assuming components aren’t used for third party libraries but rather for your own application-specific code…please correct me if I’m wrong.

Thanks for your help.

I usually follow the same logic you’re describing, except js libraries are put directly into /js folder.

Maybe these project structure approach descriptions will be interesting for you:

http://www.yiiframew…ure-in-seconds/

http://www.yiiframew…i-project-site/