Results 1 to 3 of 3

Thread: MVC Application file names (ExtJS 4)

  1. #1

    Default Answered: MVC Application file names (ExtJS 4)

    Hi there,

    Just started to work with ExtJS 4 and MVC along with it. I've got a quite simple question. Taking this example in mind, in the end I've got an IDE with tabs open:
    • Users.js (controller)
    • Users.js (view)
    • User.js (model)
    • user.json (data)

    I'm using Coda, so could be an IDE flaw. Coda doens't show me where this file is located. So I've got to actually look at the code to determine which file I'm working in at that moment.

    So I was wondering if there's any way of renaming these files like this (for example):
    • Users.controller.js
    • Users.view.js
    • User.model.js
    • user.json

    is possible in any way. Now the Ext.Loader (I presume) wont be able to find the files.

    PS: the provided code ends up with errors...

  2. I think this is quite a common problem, not specific to Coda.

    Rather than trying to munge the filenames you could just rename the classes. User is a good name for a model but the view and controller could easily be renamed. I find names like UsersGrid or UsersWindow much more helpful for views.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    I think this is quite a common problem, not specific to Coda.

    Rather than trying to munge the filenames you could just rename the classes. User is a good name for a model but the view and controller could easily be renamed. I find names like UsersGrid or UsersWindow much more helpful for views.

  4. #3

    Default

    Mmm, that's a nice thought. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •