Forum: Ruby on Rails Blackberry & handhelds

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
JannaB (Guest)
on 2009-04-12 17:40
(Received via mailing list)
I notice when I go to a site like schwab.com, they have their full
format page come up when I log on via a computer. However, if I log on
via my blackberry, it;s dramatically stripped down.

I realise much of this is done by my blackberry - the disregarding of
graphics, not paying attention to tables, etc. But is there a way to
discern if someone is logging in via a handheld device as opposed to a
computer, and route to a more appropriate view? Thanks, Janna
Frederick C. (Guest)
on 2009-04-12 17:47
(Received via mailing list)
On Apr 12, 1:29 pm, JannaB <removed_email_address@domain.invalid> wrote:
> I notice when I go to a site like schwab.com, they have their full
> format page come up when I log on via a computer. However, if I log on
> via my blackberry, it;s dramatically stripped down.
>
> I realise much of this is done by my blackberry - the disregarding of
> graphics, not paying attention to tables, etc. But is there a way to
> discern if someone is logging in via a handheld device as opposed to a
> computer, and route to a more appropriate view? Thanks, Janna

One way is work exactly as usual but be careful that your css etc.
degrades gracefully.

Another involves creainge a fake format (eg :phone) and set the format
to that in a before filter if the user agent matches something
relevant or if the user has gone to a relevant subdomain (eg
mobile.foo.co). Along side your html.erb template you'd have a
phone.erb template with dumbed down content/presentation/etc. Rails
will pick that template automatically when appropriate and of course
you get to use respond_to (see
http://www.slashdotdash.net/2007/12/04/iphone-on-r...
for an example of this).

Fred
Hassan S. (Guest)
on 2009-04-12 19:46
(Received via mailing list)
On Sun, Apr 12, 2009 at 6:46 AM, Frederick C.
<removed_email_address@domain.invalid> wrote:

> Along side your html.erb template you'd have a
> phone.erb template with dumbed down content/presentation/etc.

A minor quibble: translating a data-rich application from a full-size
computer screen to be usable and useful on a tiny screen shouldn't
be thought of as "dumbing down" -- it's refactoring that application's
information architecture/presentation to better address the needs of
the mobile user.

Sometimes more easily accomplished than others. :-)

FWIW!
--
Hassan S. ------------------------ removed_email_address@domain.invalid
JannaB (Guest)
on 2009-04-13 04:31
(Received via mailing list)
Yes and it appears Rails may be particularly good at doing exactly
the! Thank you both for your postings. -Janna

On Apr 12, 11:45 am, Hassan S. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.