I'd like to chime in with some information about uPortal's process for 
selecting a theme based on the browser user agent.  uPortal actually does have 
internal support for allowing a user to override the default assignment (in 
effect, allowing users to choose to use a desktop theme from a mobile device).  
The functionality doesn't have a user interface anymore though, as it was 
removed due to a community request (from Rutgers actually, I think?)

Here's an outline of what happens to select the theme:

1.  The code checks to see if the user has an individual record in the 
UP_USER_UA_MAP table mapping the browser's user agent string to a specific user 
profile.  If it does, just go ahead and use that profile (and the associated 
theme).  This is the step the user-facing profile selection tool used to take 
advantage of.

2.  Next uPortal checks to see if the user's default user has an individual 
record.  Same scenario as described above, except with the default user account.

3. If no exact matches were found for the browser, fall back to the 
browser.mappings file and attempt to match the user agent against the listed 
regexes, trying regexes in the order listed in the file.

Once a profile is matched, uPortal uses that profile to determine the 
structure, theme, and default skin.  uPortal out of the box currently offers a 
desktop profile, an iPhone profile, and an Android profile.  The iPhone and 
Android profiles both use the same themes, but use different skins.  This lets 
us use offer mobile experiences that feel more native on each mobile device.

Once upon a time, uPortal offered a channel that let users select the profile 
they'd like to use for a given user agent.  This dates back to the very 
beginning of my involvement with uPortal so I'm not 100% clear on all the 
details, but my (potentially flawed) understanding is it was removed because it 
was let the first user of a particular user agent pick the default profile for 
that user agent for all users.  As browsers like Firefox started doing frequent 
updates, this became problematic and the UP_USER_UA_MAP table became completely 
cluttered with entries for minor releases of browsers.

SO.  We could absolutely create a way for users to select whether they should 
get the mobile or desktop experience when they're on a mobile device.  And we 
should!  We could implement it now using the existing UP_USER_UA_MAP table and 
functionality, though I'd suggest that we might want an improved process that 
allows us a bit more control.  We'd want to offer mobile users a link to switch 
back and forth between the mobile and desktop versions, but we might not want 
to display that link to desktop users.  We also might not want to offer iPhone 
users the Android site and vice versa (not because it would be bad, but maybe 
just because we want to keep the interface simple).  We might also decide that 
we don't actually need this selection to persist between user sessions.  I 
suppose a non-session-based selection would be particularly important for 
mobile access to guest portal views.

The other issue we need to consider is the mobile portlet experience.  We have 
a few portlets (such as the calendar portlet) that currently offer a different 
user interface to mobile users.  Right now this functionality is mostly 
implemented by the portlet itself re-inspecting the user agent.  We did this 
largely to make sure that Jasig portlets continue to be compatible with other 
portals, but also because it's not quite clear what the best way to tell 
portlets that they should provide a mobile experience would be.  I'd argue that 
we don't really want to pass in the theme or profile name, since those could 
vary between portals (and both Android and iPhone devices get different 
profiles, but probably actually want the same portlet markup), but we don't 
currently really have a way to mark profiles/themes as "mobile" or "desktop".

Community input about the desired way to handle profile selection and portlet 
markup selection in the next release would be quite welcome.  Steve, do you 
have any input about how the WURFL library might fit into the above?  I'm not 
familiar enough to understand quite how it would prevent us from wanting to 
maintain mappings between browsers and profiles.

A final note about the portlet dragging issue:  I think it would be super cool 
to someday have a mobile theme that allows layout editing and customization via 
mobile idioms (like the little red dash things that you can click to drag 
something on the iPhone).  I don't think this would be impossible technically, 
but it would require us to actually support more than one layout per user.  
Maybe we can think at some point about how to at least improve the 
customization experience on the iPad.

- Jen


On Nov 8, 2010, at 2:24 AM, Steve Swinsburg wrote:

> There is a current JIRA ticket to address this via WURFL which is both a 
> capabilities list and an API.
> https://issues.jasig.org/browse/UP-2778
> 
> In Sakai we implemented a 'switch to classic' link when taken to the mobile 
> version. We can use similar code for uPortal.
> 
> cheers,
> Steve
> 
> 
> 
> On 05/11/2010, at 4:03 AM, Bruce Tong wrote:
> 
>> On a related note, I noticed that if you go to ESPN's web site with an
>> iPad, it asks you if you want the regular site or their mobile site.
>> 
>> I've noticed an iPad poses some problems with the regular non-mobile
>> interface, such as you cannot drag portlets around and tab menu's act
>> funny. The mobile interface might work better on an iPad, but the iPad
>> certainly has the display room for the regular site. The ability to
>> switch between the two interfaces might be rather handy.
>> 
>> On Thu, Nov 4, 2010 at 10:46 AM, Tuyhang Ly <[email protected]> wrote:
>>> Hi,
>>> 
>>> At Rutgers, we would like to have a feature in uP3.2.x that allows a user
>>> with a mobile device an option to switch between the mobile theme and the
>>> default theme instead of forcing them to use the mobile theme as in the
>>> current implementation.  I would appreciate your thoughts and suggestions on
>>> how to best implement this feature.
>>> 
>>> Thanks,
>>> Tuy.
>>> 
>>> --
>>> You are currently subscribed to [email protected] as:
>>> [email protected]
>>> To unsubscribe, change settings or access archives, see
>>> http://www.ja-sig.org/wiki/display/JSG/uportal-dev
>>> 
>> 
>> 
>> 
>> -- 
>> Bruce Tong
>> Software Engineer
>> Office of Information Technology
>> Ohio University
>> 
>> -- 
>> You are currently subscribed to [email protected] as: 
>> [email protected]
>> To unsubscribe, change settings or access archives, see 
>> http://www.ja-sig.org/wiki/display/JSG/uportal-dev
>> 
> 
> 
> -- 
> You are currently subscribed to [email protected] as: 
> [email protected]
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/uportal-dev
> 


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Reply via email to