PDA

View Full Version : Bindings controls to controllers in MVC applications



GraemeBryce
21 Aug 2011, 1:48 AM
Hi

There are a number of examples of MVC available with enough searching but as is often the case there are a variety of approaches.

One thing I can find nothing authoritative on is the use of the the Ext.Controller.control() method as a way to bind controls within a view to the actions that you want them to invoke in the controller.

The documentation also fails to show any example, indeed it gives very little idea why the method exists.

That said, I suspect it is a far better pattern to do all the binding in this way rather then the more lengthy use of Ext.dispatch written directly within the view files.

Can anyone point to a tutorial that does explain best practice or detail why this is behaps not the way ahead.

Thanks