Best Practices

3 posts, 1 answers
  1. Trent
    Trent avatar
    22 posts
    Member since:
    Dec 2011

    Posted 30 Jul 2013 Link to this post

    Hi all,

    I am looking for some best practice ideas before diving in. We have an existing ASP.Net MVC app which we will be providing a mobile front end for. We'll be using the Kendo mobile controls in an ASP.Net MVC project. Here are the questions I have so far:

    1. Is it best to create a new ASP.Net MVC project for the mobile view, or so you keep them in the same project and then in the _Layout page check for mobile?
    2. Is it best to put the app init in the _Layout page? (I'm talking about this script: var app = new kendo.mobile.Application();)

    Thanks in advance!
  2. Answer
    Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 31 Jul 2013 Link to this post

    Hello Trent,

    I'll try to address your questions in the order you put them:

    1. ASP.NET MVC 4 features mobile views within the same MVC project, hence you can take advantage of this new functionality to build the mobile version of your site. Additionally, if more convenient you can utilize the ASP.NET MVC server wrappers for Kendo UI Mobile introduced in the recent Q2'13 release. See samples in the demos and documentation
    2. You can either put the mobile app initialization in the _Layout page, or create a separate _MobileLayout and set it there. For reference, see how this is done in the Examples\Areas\razor\Views\Shared\_MobileLayout.cshtml file of the local Kendo UI MVC demos coming with the distribution.
    Regards,
    Sebastian
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Trent
    Trent avatar
    22 posts
    Member since:
    Dec 2011

    Posted 31 Jul 2013 Link to this post

    Thanks Sebastian - good advice.
Back to Top