Martin, would extension parsing be a way to avoid running the resource intensive browser check with every pageview?
On May 8, 4:32 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I am actually of the opposite opinion regarding /mobile and > m.example.com. > I remember seeing sites use: m.example.com, wap.example.com, > mob.example.com, mobile.example.com > The result for me is that I hardly ever bother trying to guess which > one is used and thuss do not use the mobile verson of the site. IMHO > the site should automatically adapt to the smaller screen and less > capable browser. And for most normal websites contain the same content > (eg news, products, contact info...) formatted for smaller screens. > > David, you should look at viewPath and layoutPath. You can switch > these in a similar way to what is done for json or xml requests. (no, > I don't have any working code to paste, sorry) Check out this post for > how it is setup for json. > > http://groups.google.com/group/cake-php/browse_thread/thread/3c5c74d2... > > You could possibly even use extension parsing once the mobile browser > has been detectedwww.example.com/products.wapor something similar. > Look for parseExtension in the manual for a start. > > On May 8, 10:11 am, "Marcin Domanski" <[EMAIL PROTECTED]> wrote: > > > Hey > > > > I'm developing an application for both mobile and desktop browsers. On > > > the user end, I'd like this to be seamless, so no "/mobile" etc. Just > > > curious as to be best practice for accomplishing this. > > > thats always the best option although i see additionally many ppl > > using m.example.com , setting a cookie etc and not checking every > > request. imo its best to use both ways. > > > > First, I'm assuming I should use the the Request Handler's isMobile() > > > function, and then use beforeRender() to set the layout to the mobile > > > version. > > yes > > > But what about the actual view? > > > Should I use switches inside > > > each view? Is it, perhaps, better practice to use render() to change > > > the view altogether to a separate mobile version? > > > Why do you want to switch things in the view ? It depends what mobile > > devices are we talking about - if you want to support the _old_ > > 160x160 then you would probably have to make a light version of > > everything. But if you're thinking about something more advanced > > (opera mini etc) then i would only use simpler css in the layout, no > > js most of the time etc. > > > The problem with mobiles is that there are multiple resolutions, > > browsers are even worst than on the desktop (that's changing > > fortunately). > > I don't know what's you target but generally -> lower specs - more work. > > > I (most of the time) used only different layouts most of the time > > (different sidebar, navigation etc). Using different views would be a > > pain but sometimes it is a requirement so that's always an option - > > you could automate that (automatically adding _mobile to template > > name, or changing the view class ) > > > > In addition, just how unreliable is the isMobile() function? Is it > > > really worthwhile to setup a WURFL-based browser checker as a vendor? > > > isMobile checks the user agent you can look what UA it does support in > > the code. WURFL is way more advanced - depends if you need to check > > for specific functions. > > > -- > > Marcin Domanskihttp://kabturek.info --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
