[NFR] Setting a master (common) view that works with module views (mutil-module project)

104 views
Skip to first unread message

Nikolaos Dimopoulos

unread,
Oct 24, 2012, 10:26:39 AM10/24/12
to phalcon-...@googlegroups.com
Description
The framework should provide the ability to set a master view as well as module views (working together). At the moment a project can have one view per module or one master view. This NFR requests the combination of both

Rules
  • For a multiple module application the developer can define one view per module. Each view is a different instance of the View component (current functionality)
  • For a multiple module application the developer can define one view common to all modules (current functionality)
  • For a multiple module application the developer can define one view common to all modules AND a view on each module (not implemented yet)
    • The common view will always be present and used
      • $view->setCommon = TRUE;
    • The module view can override the common view or add to it
      • $this->view->overrideCommon = TRUE;
    • The module view can add content to the common view
    • If a module view is not defined, the common view will be used

There is an implementation on the Yii framework that should provide additional input.

Andres Gutierrez

unread,
Oct 29, 2012, 2:18:42 PM10/29/12
to phalcon-...@googlegroups.com
I don't see this implementation clear, I propose that the NFR starts from as currently Phalcon is structured, not as others do.
  • Phalcon uses a directory to search for the required views
  • No matter if the component "view" is shared by several modules or one module exists, always refers to a directory where to look for views
  • Search multiple views directories means doubling or tripling the number of stats that should make searching the required view
Reply all
Reply to author
Forward
0 new messages