Yii Framework Forum: application structure - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

application structure Rate Topic: -----

#1 User is offline   metalguardian 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 07-May 12

Posted 15 May 2012 - 03:39 PM

Hi all.

i want use application structure like this:
http://www.yiiframew...i-project-site/

but i cant understand how to write modules in it. need i create module dir both in backend and frontend parts (or in common too)?
will it be a duplication of code?

i think structure must be like this:
/
    backend/
        modules/
            module1/
                models/
                    BackendModel extends CommonModel
    common/
        modules/
            module1/
                models/
                    CommonModel
                    StaticModel
    frontend/
        modules/
            module1/
                models/
                    FrontendModel extends CommonModel

and all models, that dont extends models from common part, need to be imported.

sorry for my english.
0

#2 User is offline   binkabir 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 194
  • Joined: 25-July 10
  • Location:Abuja,Nigeria

Posted 18 May 2012 - 05:00 PM

in your common folder add all modules(mail,rights) that are shared within the application.
then autoload all modules to either of the project (frontend or backend)

http://www.yiiframew...rnal-directory/
0

#3 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 20 May 2012 - 12:51 PM

NOTE: moved to proper section (Miscellaneous instead of Tips, Snippets and Tutorials)
Find more about me.... btw. Do you know your WAN IP?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users