struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Bond <mar...@marcusbond.me.uk>
Subject Re: Modifying action mapping per device type
Date Sat, 30 Jan 2010 14:27:58 GMT
Hi Wes, thanks for the post.

I like the idea of being able to decorate screens differently depending 
on device without changing much existing code and I can see a use to 
this for example for pages being given a different footer to provide 
device specific links or adding side menus for devices with enough 
screen space. (The main focus of my web pages are application GUI rather 
than content). I do intend to look into sitemesh but I know nothing 
about it as yet. However, what sitemesh (I don't think anyway) cannot do 
is for example, for an old blackberry that does not support html tables 
very well, allow me to render a list of results in a business card style 
layout instead of a four column table - if it can then I'd be glad to 
know how and investigate it's use further as it would solve some of  the 
problems I encounter.


Wes Wannemacher wrote:
> I admit that I haven't read the whole thread, so flame me if you
> covered the answer already, but...
>
> Have you looked at Sitemesh? I would suggest look at creating
> different decorators for each of the devices you want to support, then
> code your undecorated JSPs so that they can be decorated based on the
> device accessing it. Sitemesh has a ton of different ways you can pick
> the decorator, so I would imagine you'd be able to find a way to
> abstract the decorator picking logic outside of your business logic.
> Then, the advantage of the decorator pattern is that you can code your
> UI screens and business logic once and just have the screens decorated
> differently based on the abstracted decorator picking logic. (As a
> bonus, you can add new decorators for new devices without changing
> much)
>
> -Wes
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message