From the look of it, we won't be able to use the adaptive layout idea. And, I'm not 100% sure the theme inheritance idea will work either.
What we're thinking is we need to have a way to support alternate views (Layout_mobile.cshtml) that effectively override the default view (Layout.cshtml) if:
a) we detect they're on a mobile/tablet browser (which we're thinking of wrapping into a service that we can use via the Onestop.common module)
b) the mobile view actually exists.
The reason we're setting aside the adaptive layout idea is we don't want to send everything to the browser, thus forcing the mobile client with limited bandwidth (or high bandwidth costs) to pull down a lot of information it doesn't need.
We're less concerned about the actual device/user agent and more concerned about whether we're dealing with a mobile phone or a tablet (or neither).
So, we want to be able to direct the user's request to a specific set of views but make the solution robust enough that it can fall back onto the desktop theme/views if the corresponding file doesn't exist.
For example, let's say we have the following desktop views:
We create a new mobile version for the commerce view but don't bother with a tablet version or anything mobile for the Layout. The result is this:
If a request comes in for the Commerce page and it's from a mobile browser, we'll route to the Commerce_mobile.cshtml template. Since there's no tablet template, we fall back on the Commerce.cshtml for tablets.
If a request comes in for the Layout page and it's from a mobile browser, we'll give them the Layout.cshtml view since there is no mobile template that exists.
Does the theme selector idea still apply here? More importantly, can it be used in any theme without issue? We were thinking we'd need to look higher up the chain and potentially add alternate views when the shape table is being built (though the problem
is, to support modules that might take advantage of this system, we'd need to be able to do the adds after all the modules have been accounted for when building the shape table).
Let me know what you think or if anyone else has an opinion.