On 7/25/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > On Mon, July 25, 2005 1:11 pm, Michael Jouravlev said: > > Having the map right in an action file is easier, faster and does not > > tie you to a property file, does it? > > Just wanted to stick my proboscis in on this particular point (I've been > following along this whole discussion by the way)... > > I view this sort of thing as configuration information, not unlike > struts-config. As such, it should I believe, be externalized. So for me, > I'd rather have something like this in a property file. > > In the world of high availability web apps, you don't want to take the app > down to change a map in a class when you could, in theory at least, change > a config file and reload it on-the-fly, no deployment issues, no downtime, > etc. Where I work it takes a minimum of 48 hours to get a prod elevation > done unless it's an emergency, and then it require about 10 signatures > from senior management... if I had to tell them I needed to change an > entry in a map in an Action, they'd kill me for having to take the app > down for something like that.
Well, I am not sure that Struts can pick up changes in property file, though I saw some "Reloadable properties" subproject in Struts Applications tree. On the other hand, I think that tying a button textual caption to a method name like LookupDispatchAction does, is a not right thing to do. You cannot change the caption at the runtime. I mean, you can, but then you have to change a property file as well, and to reload properties. Having a map correlating request key to method name instead of correlating a button value to method name allows to change button caption at any time without the need to reload the properties. Separating events, handlers and captions seems logical for me. I got used to this when I was programming for Windows. Windows resources just have an ID, and anyone interested can catch a message from control with that ID. Button captions are not relevant at all, one can even change them right in compiled exe file. One more note. I am not sure that all config info should be externalized. It is much easier to have an action and a corresponding HTML/JSP page(s), than to tie them in a config file. That is, I prefer Action-page relationship as 1:M, not as M:1 or M:M. Maybe externalising such relationships works better for you, if you have M:1 relationship. I am trying to imagine such a use case, and with using dispatching action, I cannot think of one. Anyway, there are as many opinions as there are people ;) Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]