views:

99

answers:

4

I am looking for a way to allow a Web application to provide a different user experience based on the type of visitor. For example, the same set of data should be presented differently to a child versus an adult. This is for a Java Web app.

Just wanted to provide more clarification. What I am hoping for is any best practice for handling all facets for providing a different user experience for different types of visitors (detection of type of visitor, different view presentation, different navigation). My data is hierarchical and traversing that data will most likely be different for different types of visitors. I am capable of coming up with a home grown solution, but I would be interested in any boiler plate solution or framework that would make it easier to implement and maintain. The application in question is a Java app that uses Struts/Tiles 1.x.

+2  A: 

You could just a different theme of colors (more brights and pastels, chunkier buttons, etc.) for a child versus an adult.

You could also change up the layouts.

These changes could all be done with CSS and switching up the CSS Classes of your items based on the type of visitor you are receiving.

TheTXI
+1  A: 

A lot of this will depend on how much information you have about your users.

If they're not logged in to an account of some sort, then you've really got no definitive clue.

If they've got an account, and you've got a field on it, then there are a couple options.

One is to have the pages check the user type, and redirect to a corresponding page for the different user type.

Another approach is to have individual components on the page check the user type before rendering, and render differently based on that. It really depends on how different the experience should be.

Yuliy
+1  A: 

First of all you would need some way of identifying the type of the visitor - presumably you would do this by having them fill out a form, tick a box etc. at some stage, upon which you set a persistent cookie that you can read back on later requests to detect what segment the user is in.

Then you can use some javascript that runs on page load to read back the visitor type from the cookie, and set CSS appropriately. If you give your <style> tags an id attribute, running some javascript to do something like:

document.getElementById('cssElemId').href = 'childMain.css';

would do what you wanted. You can of course change multiple CSS tags in the same conditional, and dress up the mapping from cookie values to CSS files, but this is the core functionality.

Andrzej Doyle
+1  A: 

Children & Adults see information differently. If you can display your information in an image and text, a child will be drawn to the image as opposed to the text, whereas an adult will read both the text and the image.

I would suggest more images for children with more colours (As already stated).

Adults should have more text, with fonts which are easy to read.

Eppz
Most adults I know make me question whether you are correct or not.
Geoffrey Chetwood