So if I want my SPA and my mobile to share code and the mobile layout...

2 posts, 0 answers
  1. danparker276
    danparker276 avatar
    389 posts
    Member since:
    Aug 2010

    Posted 12 Apr 2014 Link to this post

    So I really like the layout feature in mobile and application.
    My main question is if you have someone hitting your website, do you first check if it's a
     mobile device and then redirect them to another page, or is it ok to put everything on one page with the layout options:
    <div data-role="layout" data-id="layout" data-platform="ios">

    would I then use data-platform default for the web.
    Is it ok to put this in a web page?
    var app = new kendo.mobile.Application(document.body);

    I'm just trying to re-use as much code as possible.
    Maybe it's just best to put the viewmodels for kendo UI MVVM in .js files and then re-use those and make seperate web pages for mobile and web.
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 15 Apr 2014 Link to this post

    Hello Dan,

    the mobile application and widgets in general are built and tested for mobile devices. While mostly functional in most modern desktop browsers, they are not tested and may fail in old IE browsers.

    The recommended approach in this case would be your last statement: Re-use the models and view models, and serve different views depending on the device. You may use our SPA framework for that purpose; it integrates nicely with the MVVM concept. 

    Regards,
    Petyo
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top