It is not my intent to start a flee war, but I remain convinced it is better to change one file than two. I am sorry, but Nicolaos' argument sounds dogmatic to me. I know apriori that I will be changing the hidden element to text field in the next stage. When that time comes, I will have to change only the JSP file. My action class does not to be touched.
-a On Wednesday, Jly 28, 2010, M.C.S. <[email protected]> wrote: > > > > > > > > Hi Nikolaos, > > Am 28.07.2010 21:08, schrieb Nikolaos Giannopoulos: > > > Aaron Strmas wrote: > I think that in this case my initial design is > better, because I have to change the JSP later anyway, and it > would be only change to the JSP only. Now I have to make change > in two places > > But I'm curious why you would have to make changes in 2 places if > the variable value changes? I only see a change in 1 place if a > variable is say called DEFAULT_COUNTRY and its value needs to > change. No? > > > > I interpret Aaron's message this way: He will have to change the JSP > for a reason independent of the "magic number". Now he thinks that > by placing the country code there, he improves the design because he > must change just one file instead of two. Following the "Separation > of concerns" principle, this is not the case if the needed changes > just affect the layout, while the change of the country code affect > the business logic. If this was good design, we all should create > god files :-) > > So in my opinion, it is definitely better to place the "US" string > into the bean instead of hard coding it into the JSP. Maybe another > option is using a resource bundle together with an type-safe enum. > This makes globally changing and reusing it somewhere else a lot of > easier. > > But that is not really related to Stripes, so sorry for being > offtopic ;-) > > Regards > Marcus > > > -- Aaron Stromas Mobile: +1 703 203 9169 ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
