This is a two part question that is probably related.
1. What is required to make everything link together properly. Here is what I am guessing but it is probably full of mistakes so please correct. I am still having trouble bring it all together so I must be missing something
a) Controllers
*must exist in the "controllers" directory
*files must be named [name]_controller.js with _controller appended to the end
*must be created using $.Controller.extend('[name]', {[defaults]},{[prototype]})
*When being created using $.Controller.extend, the name can start with a capital (Is this required?)
*
Is this correct? The name used in $.Controller.extend to name the controller is not necessary to link to any of the views or models. It is only used for manually creating an instance or using the helper function described here
http://javascriptmvc.com/docs.html#&who=jQuery.Controller.
b) Views
*must exist in the "views" directory
*Is this correct? Sub directory must match the [name] from the [name]_controller.js.
*views in the views can be named anything but must end with .ejs. They will be referenced by name from the controller
c) Models - I'm not having problems with this at the moment
d) Plugis js file
*must have the following
steal.plugins(
'jquery/controller', // a widget factory
'jquery/controller/subscribe', // subscribe to OpenAjax.hub
'jquery/view/ejs', // client side templates
'jquery/controller/view', // lookup views with the controller's name
'jquery/model', // Ajax wrappers
'jquery/dom/fixture', // simulated Ajax requests
'jquery/dom/form_params') // form data helper
*at a minimum, requires controllers to be listed via .controllers( [name], [name], etc) where [name] is from [name]_controller.js
*with no models, just call models() (probably don't even have to call it)
*do you have to call .views() if you aren't listing any? Listing them is only important when you switch to do a compress for production, right?
2. How does a controller get associated with a view? I suspect this happens by comparing the [name] from [name]_controller.js with that from the subdirectories in the views directory but I am not sure.
If I have the following code, how does a controller get associated with that view? Is it automatically created when the view is created? I actually read a lot in the docs about how things got associated (for example, I'm supposed to do something like $(".content").menu() assuming I have a MenuController but the menu helper function didn't seem to get automatically created -
http://javascriptmvc.com/docs.html#&who=jQuery.Controller).
<script type='text/javascript' >
$(document).ready(function () {
$(".content").append($.View("views/main/menu.ejs", {}));
});
</script>
Thanks so much to anyone who can help.