I have written code using jquery, marionette etc to create my html pages. I want to isolate my views from my business logic, which i believe is d proper way :).
I have created a generalized Marionette.Layout for the html page by passing Marionette.ItemView's through parameters in a function. Here's a link to my code!
Normally if we want to handle a button click within an ItemView we would use events:{click .btnSubmit = buttonClicked}, but what i want is the that the events associated with a page should be handled from different script file so that whenever i change my view my business logic won't get affected. If you will go through my code i have created a script file busn_logic.js from where i want to handle all my click events on any ItemView.
So please help me. Thanks in advance.