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 Domanski http://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 -~----------~----~----~----~------~----~------~--~---
