Griffon
  1. Griffon
  2. GRIFFON-122

Improvement on MVC groups configuration.

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Currently when I configure the mvc group, I need to provide the name for each of our model, view, controller for every MVC group.

      FilePanel {
         model = 'FilePanelModel'
         view = 'FilePaneleView'
         controller = 'FilePanelController'
      }
      

      For example above, it would be better if I can provide just an empty declaration to tell the FilePanel group to look for 'FilePanelModel', 'FilePanelView', 'FilePanelController'

      FilePanel {}
      

      If possible I would to see something like component-scanner in the future. The scanner will look for MVC components. Anything has suffix of Model/View/Controller and shares the same name (name without suffix) will be added as an MVC group by the scanner.

        Activity

        Hide
        Andres Almiray added a comment -

        Do you configure the group manually or do you do it via 'griffon create-mvc'?
        Though I recognize there may be some repetition when you follow the conventions, i.e FilePanel group has FilePanelModel , filePanelView and FilePanelController; it is also possible for the FilePanel group to contain FilePanelActions, FilePanelDialogs and many more. It is also possible to not have a *Model, or *Controller; or even use an mvc member from another group; even reusable an existing instance of a member.

        In other words, the mvc group configuration is quite flexible and you only need to touch it when you deviate from the convention. Your case sticks to the convention. Perhaps I'm missing something here.

        Show
        Andres Almiray added a comment - Do you configure the group manually or do you do it via 'griffon create-mvc'? Though I recognize there may be some repetition when you follow the conventions, i.e FilePanel group has FilePanelModel , filePanelView and FilePanelController; it is also possible for the FilePanel group to contain FilePanelActions, FilePanelDialogs and many more. It is also possible to not have a *Model, or *Controller; or even use an mvc member from another group; even reusable an existing instance of a member. In other words, the mvc group configuration is quite flexible and you only need to touch it when you deviate from the convention. Your case sticks to the convention. Perhaps I'm missing something here.
        Hide
        Donny A. Wijaya added a comment -

        Hi Andres,

        Sorry I didn't know about the 'create-mvc' command coz I was too excited with Griffon and didn't check the command list. My request on component scanning can be ignored.

        For the group configuration, I find it can be a bit troublesome to reconfigure when there are already a lot of mvc combos inside the group. I believe some shortcuts supports would help:

        // Only looks for FilePanelModel, FilePanelView, and FilePanelAction
        FilePanel {
          includes = ['model', 'view', 'action']
        }
        

        Thanks.

        Show
        Donny A. Wijaya added a comment - Hi Andres, Sorry I didn't know about the 'create-mvc' command coz I was too excited with Griffon and didn't check the command list. My request on component scanning can be ignored. For the group configuration, I find it can be a bit troublesome to reconfigure when there are already a lot of mvc combos inside the group. I believe some shortcuts supports would help: // Only looks for FilePanelModel, FilePanelView, and FilePanelAction FilePanel { includes = ['model', 'view', 'action'] } Thanks.

          People

          • Assignee:
            Danno Ferrin
            Reporter:
            Donny A. Wijaya
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: