Results 1 to 4 of 4

Thread: Best Place to put Ux directory

  1. #1
    Sencha Premium User dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,192
    Answers
    26
    Vote Rating
    40
      0  

    Default Best Place to put Ux directory

    I'm building a nice large app using MVC, just wondering where most people are putting their ux's...

    As I try to keep extensions and ui in version specific directories, I put mine in :

    Code:
    app
      - controller
      - model
      - store
      - view
    resources
      - css
      - images
      - ux ( for site/app specific ux )
    lib (virtual directory linked in)
      - jsframeworks
        - jquery
        - sencha
          - extjs
            - version4
              - extjs-4.0.2
              - extjs-4.0.6
              - extjs-4.0.7 (mapped to 'latest' virt dir)
              - ux (global ux's)
              - ui (global themes)
          - touch
    where you you put all those excellent libraries that you grab from the community?
    Cloud Application Architect

    Sencha Specialist / Sencha MVP
    ExtJs Developer + Contributor since 0.2.2 - Champion of the per developer license.

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

    Default

    Personally I don't like to group community UXs in with Sencha code, it gives them a credibility they don't necessarily deserve. I'd usually only put the official Sencha UXs in with the library.

    Picking a home for the community UXs is tricky. This is a situation compounded by the bizarre way UXs are all bundled into the Ext.ux namespace rather than being namespaced to the organization that created them. Most of my apps use very few community UXs so I can usually just shove them in a ux directory (separate from all Sencha code) but I don't feel that would necessarily scale as the number of community UXs grows.

  3. #3
    Sencha Premium User dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,192
    Answers
    26
    Vote Rating
    40
      0  

    Lightbulb

    @skirtle, thanks for your reply... as you can see above, I try to keep any non-bundled ux's out of the main build directories to keep it clean, and then I can roll the next version and not have to move the files, I'm just curious how other people do it. I also put different versions (or builds) of the ux's in their own directories ( aka build 23432 or version0.2 ).

    I point a virtual directories 'latest' and 'stable' within each version directory (ie version4 for extjs) so that I can just point to /lib/jsframeworks/sencha/extjs/version4/stable so that you can roll a new version by simply changing the virtual directory location pointer, or if I want a specific version I can also just put that instead of 'stable'. the naming conventions for each of the zip downloads is unconventional which doesn't help. ( eg: sench-touch-1.0, extjs-4.0.6 - should either be sencha-extjs-x or touch-x for consistancy )

    Just wondered if what I'm doing is considered 'good' practice or not so good. (main intent)
    Cloud Application Architect

    Sencha Specialist / Sencha MVP
    ExtJs Developer + Contributor since 0.2.2 - Champion of the per developer license.

  4. #4
    Sencha User bt_bruno's Avatar
    Join Date
    Mar 2008
    Location
    Redwood City, CA
    Posts
    154
    Answers
    11
    Vote Rating
    11
      0  

    Default

    Hi @dawesi! I generally keep these ux into app/ux. If you read the Getting Started Guide you will notice that the app folder is used for a namespaced source code structure.

    Code:
    - appname
        - app
            - namespace
                - Class1.js
                - Class2.js
                - ...
    If your using the MVC architecture, you have models, views, controlers and stores, added into /app, representing the namespaces.

    Given that, I do something like this at the top of my app.js:

    Code:
    Ext.Loader.setPath('Ext.ux', 'app/ux');
    I don't really think that /app is a folder only for keeping the MVC folder structure. Whenever I need to create new namespaces as MyApp.util, or MyApp.helper, I create a folder into /app.

    /extjs wouldn't be a good place, and other than this one, I guess /app would fit perfectly.

Posting Permissions

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