This is a migrated thread and some comments may be shown as answers.

Using Kendo MVVM frameowrk and MVC Server Wrappers

2 Answers 316 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 16 Mar 2013, 06:14 AM
Hi there

Architecturally I'm a tad confused, but do confess to being new to both MVVM and KendoUI, but the sell from Telerik is that Kendo UI is really easy to start implementing and that the MVC server wrappers help you out by creating javascript for you.

What I'm confused about is how to use both of these together, or even if one should. The only reference I can find anywhere is here, but it doesn't really help. I've also looked through the examples but the relationship is still not clear.

If I understand it, the MVVM framework runs in the client browser in order to abstract responsibilities but also to bind the ViewModel to the data (using 'Observable').

On the other hand, the MVC wrappers seem to create widgets which are bound to datasources.

Do these two technologies work together and if so, in what scenarios should they be used thus? What are the advantages? In some sense it appears to me as though using the MVC wrappers and binding to datasources negates the need for a client-side MVVC pattern.

Are there any simple example projects of using the MVC server wrappers and the Kendo MVVC framework, that provides a clear understanding of the benefits, please?

Thanks so much,

Paul.

2 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 19 Mar 2013, 10:45 AM
Hello Paul,

Indeed the MVVM feature is a client side one and as you might guess it could be used in certain scenarios. It really depends what you are trying to achieve, basically if you have ViewModel on the client side and you need to update it frequently on the client side you can use the MVVM like shown here.

If your goal is to allow the user to just to create / update some values and send them to the server you can just go the normal without involving the MVVM.

Aside from that, the MVVM is used internally by the widgets - for example the popup editor template is bound to the model which is currently being edit - so the changes are applied immediately to the observable objects of the Grid's dataSource and thus to the Grid itself.

Most of the cases you do not need to combine the usage of the Wrappers and the MVVM. What type of initialization you will use is up to you - imo when using the MVVM it is cleaner to initialize the widgets via the so called declarative initialization without using the wrappers and adding the data attributes via the HtmlAttributes method.

Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Paul
Top achievements
Rank 1
answered on 19 Mar 2013, 11:45 AM
Again, thanks Petur.

Gives me a way in to a decision point, thanks.
Tags
General Discussions
Asked by
Paul
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Paul
Top achievements
Rank 1
Share this question
or