• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Struts 2 Web Application Design - Supporting Traditional and Mobile Device Displays

Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have been given the following brief:

"Consider the design of a web application using Struts2 and Sitemesh (and possibly Spring) for traditional displays and mobile displays."

Having had a look at how some of the major sites may be doing it, I also thought it would be a good idea to ask here to see how others may be satisying such criteria.

We already have an existing web app project designed initially for traditional displays but it now also provides one mobile page. We have "/" and "mobile" packages in the struts.xml for traditional and mobile, respectively. Both packages have near-duplicated action mappings. The same action is used for both traditional and mobile devices but the namespace is different ("/m") and the result name paths to the jsp pages differ slightly (i.e. WEB-INF/jsp/test.jsp -and- WEB-INF/jsp/mobile/test.jsp). We also use Sitemesh and have two decorators for the traditional and mobile display.

I have considered separate projects; one for a traditional displays and one for mobile device but the maintenance overhead and duplicated code sounds like a headache from the start.
I have considered having single jsp pages that would handle traditional and mobile devices in the same file but that could get convoluted and result in large, messy files.

I don't want to get too set on the design or implementation just yet. I'd be very interested to hear from more experienced users how they are doing it. Is anyone able to offer their experience / advice regarding the design and structure of a single web application that can support different display technologies?

Thanks for reading. Kind regards,

Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Personally, I'd go for something handled purely with CSS, with the appropriate CSS pulled in via configuration, user agent, etc.
grapes are vegan food pellets. Eat this tiny ad:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic