• 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 ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Customization of JSF 2.0 based application

 
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks,

at my company we're working on our major product which is a web applications based on Struts 1.x. Because of its age and all the well-known problems of a legacy application we're currently looking for alternative modern technologies to start a migration of the old app.

A major challenge and requirement is "customization". The core of the application is the same for all customers although there are a few parts which are specific to one customer. But the biggest customization is necessary for our view templates (which use an own XML based format at the moment). This is important because the web interface has to be tailored to conform to the corporate identity requirements of the customers. This does not only mean some different colors but instead for one customer a menu can be placed on the right side for another it can be placed on the left. Additionally there may be some smaller differences like single menu items which may be only visible for some customers but not for others. The concept we use at the moment offers a very basic overriding mechanism. There's one common pool of XML templates which can be overridden with a customer specific version. The rest of the visual differences are produced with different XSL stylesheets and CSS. But unfortunately everything is very complex so it's almost impossible to let a web designer do his job instead of a developer (who is probably not as good in web design).

From what I know and read so far the templating features of JSF 2.0 in combination with ordinary CSS stylesheets look very promising to me. Unfortunately I'm not an expert in web design. So it's hard for me to judge if JSF 2.0 could be a potential solution. On the other hand we need a complete new framework (not only the view layer) and I like the rest of the JEE 6 stack already very much. From this point of view JSF 2.0 would make perfect sense to me. Moreover I don't know of any existing alternative solution which would make it much easier to handle our requirements which can become complex from time to time.

Marco
 
Author
Posts: 134
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, JSF 2 (or even 1.2 with Facelets) would fit this perfectly. I prototyped this at my last job. It's really not that hard to do. You'd just use a different template for each customer (in your template declaration you'd use an EL expression for whichever template you'd need). You can also expand this even further because each composition can have it's own template. Most of the things I've seen done with facelets don't really need anything this complex, but there's A LOT of power there just waiting to be utilized to it's fullest.

Basic HTML + CSS best practices will get you a long way as well (using divs, moving things around on the page with CSS, etc).

If you decide not to go with JSF I'd recommend looking at sitemesh.
 
Marco Ehrentreich
best scout
Posts: 1294
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jason,

thanks for sharing your experiences and ideas!

Luckily this confirms what I already thought after a few experiments and reading some documentation. But I think there's no better way to find out than to give it simply a try and do some prototyping

Marco
 
You showed up just in time for the waffles! And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic