Jump to content


Photo

Directory structure

framework structure modules

  • Please log in to reply
3 replies to this topic

#1 justflyingby

justflyingby

    Newbie

  • New Members
  • Pip
  • 8 posts

Posted 19 December 2011 - 06:29 PM

Hi there. I have problems in understanding a directory structure. Either I am missing something or directory structure is different to what is dictated in YII docs. I expected to see source code for controller classes directly in directories for modules. Still unclear what are those folders with "adapter" in their names are for.

I do not see a clear list of models for "M" layer, no exact list of controllers. How about making things clear with some diagram?

#2 Ivica

Ivica

    Advanced Member

  • Moderators
  • 565 posts

Posted 20 December 2011 - 06:00 AM

Adapter classes are usually used to transform data(arrays, objects) from one format into another.
We couldn't stick with default Yii structure, because we have many additional elements, and even Qiang suggested different structure for more complex project, so we come with our current structure.

For models, we decided to keep models in modules where they belongs too, so in accounts module, you will see model directory with Account model in it.

#3 justflyingby

justflyingby

    Newbie

  • New Members
  • Pip
  • 8 posts

Posted 20 December 2011 - 05:14 PM

Thanks. Can you tell me about other directory names:

data
elements
rules
utils
interfaces
dataproviders

?

Also there is a module called zurmo. How do that source code in that folder ships to other modules? There is a file called <module_name>Module.php in each module directory. Function like getDependencies() refers configs frequently: not too much config. investigation on-the-go?

#4 Ivica

Ivica

    Advanced Member

  • Moderators
  • 565 posts

Posted 21 December 2011 - 10:52 AM

Every module have list of modules on which it depends. Zurmo module is base one, and most modules depends on it.
Like you noticed getDependencies return array of modules on which each module depends.

You can see list of other directories that we load for each module(if they exist) in config/common.php file.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users