I currently use my own setup for an MVC framework in Javascript, but I am a bit confused about the fact, on where I should put my HTML events handlers.
Like click/mouse/focus event and stuff like that, is it acceptable to attach this event-logic into the controller.
Right now, I have it like this:
- Some-module.model.js
- Some-module.view.js (where I attach my user-events, like mouse events, focus etc)
- Some-module.view.tpl (this is where the HTML is being placed between script-tags, mini-templating engine)
- Some-module.controller.js
So, is it wisely to attach the click handlers for the view into the controller? or is that bad practise?