holicon_abg
22 Feb 2012, 5:41 AM
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.
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.