struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter A. J. Pilgrim" <pet...@xenonsoft.demon.co.uk>
Subject Re: [New Functionality] ApplicationResources.properties to DB?
Date Mon, 02 Sep 2002 23:53:09 GMT
Ian Vellosa wrote:
> But what do you do each time you add a new language, say German? you need to
> update the database structure adding a new column? Surely any solution
> should be generic enough not to need that.
> 
> Unfortunately you would need the table to look something more like:
> 
> key           language  value
> ------------  --------  ----------------
> global.title  en        Something
> global.title  fr        quelque chose
> 
> but that will get huge in no time at all! and I doubt that performance would
> be too good.
> 

Yes The db column design was wrong.

Well how many resources do have or do you need?


Surely you can read the message resource into memory java objects just once.
When you host the web application it is not going to have just 64MB more
like close to 1024 MB of RAM, man! Message Resources are almost singletons
anymore. Therefore you cache the message resource in memory and
do not query the database anymore
unless you really to have ``dynamic message resources''. Now there's
an idea that you can't do with the current static message resources ?


-- 
Peter Pilgrim         +-----\ +-++----++----+
Java Technologist     |     | | ||    ||    | 'n' Shine
                       |  O  | | ||  --+| ---+
         /\            | ._  / | | \  \ |    |
        /  \           | | \ \ | |+--  || ---+ A new day
       /_  _\  "Up"    | | | | | ||    ||    | is coming
         ||            +-+ +-+ +-++----++----+
<home page="http://www.xenonsoft.demon.co.uk/" />


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


Mime
View raw message