The general naming conventions for Model are, that a model is located in a folder called
models (so that you can do steal.models()).
If you steal your JS files and their dependencies directly it doesn't matter at all on how you name your files (although you might want to follow the layout of a scaffolded plugin or application).
so if
parentApp/app1/cell/thing.js contains
- $.Model.extend('My.Bla.Model', {}, {})
And you steal('//
parentApp/app1/cell/thing') you can create a
new My.Bla.Model. Maybe it should be made more clear, that file naming conventions are only used by steal.views, steal.models, steal.controllers and steal.plugins (where a plugins JavaScript is located in e.g. 'my/plugin/plugin.js'). The name of the file has nothing to do with your class names (although it might be better to put classes in files with the same name).
For your example:
- // parentApp/app1/cell_1/cell_div_model.js
- steal.plugins('jquery/model').then(function($) {
- $.Model.extend('CellDivModel', {}, {});
- });
- // parentApp/app1/cell_1/cell_div_controller.js
- steal('cell_div_model').plugins('jquery/controller').then(function($) {
- $.Controller('CellDivController', {}, {
- init : function(element, options)
- {
- var model = new CellDivModel();
- }
- });
- });