1. #1
    Ext JS Premium Member holicon_abg's Avatar
    Join Date
    Mar 2011
    Location
    Poznan, Poland
    Posts
    52
    Vote Rating
    0
    holicon_abg is on a distinguished road

      0  

    Lightbulb i hate default namesace of Designer ! Good time to change it is now ! My Proposition

    i hate default namesace of Designer ! Good time to change it is now ! My Proposition


    ExtJs 4 MVC (namespaces, filename, name convention, standarize it)
    • app
      • controller (plural, camelCase)
        • App.js - Application Controller extends by User (sometimes call main controller)
        • Users.js
          • className: APP.controller.Users
          • id: UsersController
          • extend: APP.controller.App
        • UserProfiles.js (plural, camelCase)
          • className: APP.controller.UserProfiles
          • id: UserProfilesController
          • extend: APP.controller.App
      • model (plural, camelCase)
        • Users.js
        • UsersProfiles.js
      • store (plural, camelCase)
        • Users.js
        • UserProfiles.js
      • view (controller name, underscored)
        • App.js - app viewport
        • users
          • index.js
            • className: APP.view.Users.Index
            • alias: widget.UsersIndex (composite Users.Index without point)
            • id: UsersIndex
          • view.js
          • add.js
          • delete.js
        • user_profiles
          • index.js
            • className: APP.view.UserProfiles.Index
            • alias: widget.UserProfilesIndex (glue UserProfies.Index without point)
            • id: UserProfilesIndex
          • view.js
          • add.js
          • delete.js
    anu suggestion ?

    inspired by CakePHP and Rails class name convention and file struct.

  2. #2
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,264
    Vote Rating
    80
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    1. Model = Entity = singular

    2. Controllers and views are loosely coupled and I can have a single controller which "uses" severar views and viceversa. If you tie your views to your controllers is your personal choice.

    3. Namespace based on directory is ok for me. I'm java developer so I feel natural and good practice. Just use that way.

    For example, all "user" related views could be in "user" or "users" (is your choice) namespace. "Package" name part is lowercase in java and I'm ok with that but if you preffer camelcase starting with upper or lower case and/or with underscores is your choice.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi