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

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

1 Answer 17 Views
Application
This is a migrated thread and some comments may be shown as answers.
danparker276
Top achievements
Rank 2
danparker276 asked on 12 Apr 2014, 06:27 PM
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.

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 15 Apr 2014, 11:51 AM
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!
 
Tags
Application
Asked by
danparker276
Top achievements
Rank 2
Answers by
Petyo
Telerik team
Share this question
or