Kwf ExtJS 4 MVC Programming

As outlined in the Ext4 Update Plan we now almost completed Step 2.

That means Kwf master branch provides now the standards how ExtJS 4 MVC applications should be written.

This also includes various helper controllers that allow rapid development of complex applications.

Read the documentation here:

http://www.koala-framework.org/documentation/kwf_ext4_mvc

and take a look at the ported kwf-app-demo (work in progress):

https://github.com/vivid-planet/kwf-app-demo/tree/ext4

Example

Below you can see an example of what is possible with the Kwf Controllers and how easy they are to use. The example creates a binding between grid and form without having to write actual code - other than creating the controllers.

this.mainPanel = this.getView('Example').create();
this.mainPanel.bindStore(this.getExamplesStore());
 
this.formController = new Kwf.Ext4.Controller.Form({
    form: this.mainPanel.down('form')
});
this.gridController = new Kwf.Ext4.Controller.Grid({
    grid: this.mainPanel.down('grid'),
    autoLoad: true
});
 
//this connects the two controllers
new Kwf.Ext4.Controller.Binding.BindableToGrid({
    gridController: this.gridController,
    bindable: new Kwf.Ext4.Controller.Bindable.Form({
        formController: this.formController
    })
});

» see full example.


Want to try yourself?

You can start now writing new MVC applications using Koala Framework, it's one of the best documented parts of Koala Framework!

This entry was posted in Koala Framework by Niko Sams. Bookmark the permalink.

Leave a Reply

Your email address will not be published.