Folder structure ( once again )

Hi guys.

I’ve checked out other folder structure threads but I couldn’t find an answer to my question.

I’m having trouble deciding where to put my custom classes. I.e. I’ve made my custom URL manager which extends CUrlManager, also I’ve made my custom Database class which extends CDbConnection.

I’m just not sure where to put those.

I’m putting components in components folder ( so something that extends CComponent ( or whatever is called ) )

Lib is for 3rd party stuff

Extensions is again used for extensions…

Where do you keep stuff like that?

There is no clear cut answer to your question but rather multiple answers per the speaker’s preferences and tendencies.

For example, you can have a look at this wiki article and examine their custom directories.

As for my tendency:Both of the classes you mention (CDbConnection & CUrlManager) are "application components" and I would very naturally put them under /components.

If my app would become heavy with custom components I would have considered creating custom directories where appropriate. For example, I have already created in the past in a real project /protected/components/validators subdirectory and would have also considered in your case to create something like /protected/components/webapp_components or the like.

Enjoy the thinking process! :)