Aaron,

Unfortunately frameworks are ideally all about good design and best 
practices... and yes are dogmatic by their very existence... a little 
ironic isn't it... in fact I wouldn't be surprised if Stripes was 
implemented this way deliberately to force avoiding bad practices... but 
can't be sure without looking at the code.

With that said - as M.C.S. pointed out this is getting off topic BUT 
moreover I provided you already with a trivial solution to your issue... 
which you tested and works... and isn't a kludge or anything despite 
your misgivings.  So be happy that it isn't a show stopper or something 
and life goes on... .

Lastly, if you feel so strongly about it then go ahead and file a 
feature enhancement in Stripes and make your "good" design case.  If 
this is truly deliberate in Stripes then IMO they got it right but who 
knows maybe others will see your argument and it might resonate with the 
developer community.

Regards,

--Nikolaos




Aaron Stromas wrote:
> 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. <m...@syn-online.de> 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
>>
>>     

------------------------------------------------------------------------------
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
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to