Thanks for the response! The view in a desktop browser would be
significantly more robust (i.e. complex), so it would not be able to
display properly in most mobile browsers (except in the iphone's
safari). By "switching," I meant maintaing one .ctp file for
everything and having an isMobile in each to determine how things are
rendered. I guess using a different views class is the cleanest way to
do this. Render() is the right function, is it not?

On May 8, 4: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
-~----------~----~----~----~------~----~------~--~---

Reply via email to