Plans to support MVC 3 version?

Oct 19, 2011 at 6:52 PM

Do you have plans to support the MVC 3 version of NerdDinner?

Coordinator
Oct 19, 2011 at 10:37 PM

Good question. 

I converted NerdDinner to give a detailed sample using my Navigation for ASP.NET Web Forms project. I don't think the MVC 3 version would show anything new from a Navigation point of view.

However, I have been working on a conversion of Project Silk (http://silk.codeplex.com/) to use Navigation for ASP.NET Web Forms. Would you be interested in that?

Graham

Oct 20, 2011 at 2:13 AM

I am interested in the MVC 3 version because it uses jQuery Mobile., I looked at the code to find out how it switched to using jQuery Mobile when the browser is a mobile one. It uses the FindView function against a registered viewEngine. These are MVC specific stuff. I am still a WebForms developer. I was wondering how to do the same thing in WebForms in a clean way. I am not sure if your Navigation component helps in this.

Coordinator
Oct 20, 2011 at 9:06 AM

Once MVC 3 came out I did think about adding mobile specific configuration to Navigation project. However, I'm not convinced that loading in a different view for a mobile browser is useful. All you really need is to have a different master page (set this in Page's PreInit method) that adds mobile specific css and jQuery mobile.

Oct 20, 2011 at 4:36 PM

 

A jQuery Mobile page is constructed differently than a normal page. It uses specific tags with specific data- attributes and multiple mobile pages actually reside in the same file. It's going to take a lot of work and most probably end up with a bad design if the same page is serving different devices. This is not the case of serving a different css for a certain device. A mobile page has very little text, one form element per line. These are not suitable for 400px+ width browsers. It makes sense to create separate pages for mobile devices. This is also not responsive web design where images scale down and columns go away when width gets smaller using media queries.

Coordinator
Oct 20, 2011 at 5:41 PM

Ok, I'll have a another look at NerdDinner for MVC 3. Thanks for the suggestion,

Graham

Coordinator
Oct 26, 2011 at 8:34 AM
Edited May 30, 2013 at 9:51 PM
I've done some investigation and I agree there is scope for incorporating page/master switching into the Navigation framework. In ASP.NET MVC 4 they have brought in DisplayModes to help with this. Hopefully these DisplayModes will also work in Web Forms as they would make things easier e.g. you could have configuration like:
<state key="list" page="~/page.aspx" page_mobile="~/mobile/page.aspx">
Could also change the StateController Navigation methods to accept a DisplayMode., then you could easily add a link that switches from desktop to mobile.
Graham
Coordinator
May 30, 2013 at 9:57 PM
As of Navigation version 1.6 DisplayModes are fully supported, for more details see the Mobile documentation