I'd like to share with you a small experience with bad programming
practices I had just yesterday.
I made a Struts-based application a while ago, when my experience with
J2EE application was at its beginning. I wrote a "Business Delegate" (the
quotes are intentional) that had an HttpServletRequest and ActionForms in
its parameters, therefore it had a tight connection to Struts. I was
thinking it was the fastest solution to write code.
After a while (about 6 months) when my experience was greater, I wrote
another business delegate (a real one this time) with no reference to
Struts and servlets at all, thinking it will be useful in the future.
Yesterday I had to modify a classic (i.e. with a GUI) application that
needed those business delegates wrote before. As you may realize, I had no
problem with the second one, but with the first one... I am still
modifying the "wrong" business delegate (and consequently all the calling
code).
Conclusion: beware of bad programming practices. You may think that
writing code in a certain "faster" way will consume less time. But when
you need to change something or reuse code, you will see that using design
patterns and other nice things will make you happier later :-P
Ciao
Antonio Petrelli


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to