asp.net-mvctwitter-bootstrapresponsive-designdevice-detection51degrees

Cross device web application with ASP.NET MVC


I am currently working on an ASP.NET MVC webshop that must be optimized for mobile devices, especially tablets and smartphones. This is for our client at work, but I am doing a little research on ASP.NET MVC Device Detection at home. I created a little application with it and it seems to work just fine. I love the way that everything is separated nicely by using different views for every device type.

The thing I am struggling with now, is wheter to use the ASP.NET MVC Device Detection for that webshop too, or use a client-side responsive framework, like Bootstrap. I am struggling with that decision, because the ASP.NET MVC Device Detection doesn't seem really "grown-up" to me. There is not much to find about it on the internet and it only supports mobile views by default, no tablet views or anything else.

The other reason why I'm hesitating about Device Detection is because the standard ASP.NET MVC library with mobile device user agent strings is probably not going to be updated, so when new devices come out (and they do), the webshop is showing the desktop view, while we have a nice optimized view for mobile devices. Of course there are services for up-to-date device detection, like 51Degrees.mobile, but they are very expensive. (the free version has no support for detecting tablets)
I've found a way to create different views for tablets by using the example in this post, but that example uses a regex to detect smartphones and tablets, which is of course going to be outdated at some time as well.

On the other hand we have the client-side responsive solution (Bootstrap). The disadvantage of a client side responsive site is that the diffent viewmodes are not seperated. The HTML is not optimized for the device. The website is just kind of "throwing in" the desktop version and the browser adjusts the HTML page using the CSS media queries. The code is not as clean as it is with the Device Detection solution.

The quick question: is there any free or less expensive way to use the ASP.NET MVC Device Detection? Is it going to fit our needs over time? Will it not be outdated at some point?

I would really appreciate to hear what you think is the best choice in this case. Thanks in advance.


Solution

  • The entire point of responsive design is that it is device-independent. Device detection in MVC, as far as I remember, began with some rather old IIS Browsercap technology that is quite out of date.

    There are far too many form factors out there to keep up with now that Android phones range in size from four to 6.5 inches and beyond. Going with a responsive design framework such as Bootstrap will allow you to target resolutions, not devices. The majority of modern smartphones and mobile browsers (even IE!) will render a responsive design consistently.