Using Kendo MVVM frameowrk and MVC Server Wrappers

3 posts, 0 answers
  1. Paul
    Paul avatar
    2 posts
    Member since:
    May 2009

    Posted 16 Mar 2013 Link to this post

    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,

  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 19 Mar 2013 Link to this post

    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!
  3. Paul
    Paul avatar
    2 posts
    Member since:
    May 2009

    Posted 19 Mar 2013 Link to this post

    Again, thanks Petur.

    Gives me a way in to a decision point, thanks.
Back to Top