One base and many flavours

R

Ravion

Dear all,

I am working on a very interesting project.

There is only one application server instance. The instance has to serve
many countries ctry1, ctry2, ctry3 and ctry4 at the same time, which will
have country specific functionalities. Assume that these different conutries
have their own war files. All war files whould depend on a single jar file,
which , lets call as the reusable common codebase.

How can I design the application such that the presentation layer is not
repeated across countries, but in some country some fileds will appear, some
kinds of validations of currency convertions take place etc, so that when we
access the URL for a country, then the view is rendered as per that
conutry's requirement?

Thanks and regards,
Ravi
 
W

Wojtek

Ravion wrote :
Dear all,

I am working on a very interesting project.

There is only one application server instance. The instance has to serve many
countries ctry1, ctry2, ctry3 and ctry4 at the same time, which will have
country specific functionalities. Assume that these different conutries have
their own war files. All war files whould depend on a single jar file, which
, lets call as the reusable common codebase.

How can I design the application such that the presentation layer is not
repeated across countries, but in some country some fileds will appear, some
kinds of validations of currency convertions take place etc, so that when we
access the URL for a country, then the view is rendered as per that conutry's
requirement?

Rather than a bunch of WAR files and a common JAR library, why not just
have one WAR file and use the Locale class?

http://java.sun.com/j2se/1.4.2/docs/api/java/util/Locale.html

Then let the user choose their Locale. For validation or pre-fill you
only need to test for which Locale the user is using.
 
R

Roedy Green

How can I design the application such that the presentation layer is not
repeated across countries, but in some country some fileds will appear, some
kinds of validations of currency convertions take place etc, so that when we
access the URL for a country, then the view is rendered as per that
conutry's requirement?

Probably the easiest way is to use ResourceBundles, and put everything
in one giant jar. You could use a Java Applet to determine the locale
and send that to the server. Then you use the ordinary localisation
techniques to select the correct ResourceBundles for each
transaction.

see http://mindprod.com/jgloss/localisation.html
http://mindprod.com/jgloss/resourcebundle.html
 
A

Andrew Thompson

...You could use a Java Applet to determine the locale
and send that to the server. ...

The best strategy would probably be to have the applet
*suggest* a locale to the user, but allow the user to override
it as needed. I was sitting beside someone at a computer
today, who was looking for news in Vietnamese, whereas
the default Locale settings of the PC would have suggested
English.

(I vaguely object to sites that think they are so clever
about giving 'what I want' that they do not offer a choice!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,002
Messages
2,570,261
Members
46,858
Latest member
FlorrieTuf

Latest Threads

Top