The tag library allows reuse whereas scriptlets lead to copy/paste oriented programming ;-). Separation of concerns is one of the main principles of OOAD. It allows you to change the logic and presentation layer objects independent of each other. It is easier to develop, maintain and extend a system that conforms to this principle.
Bala -----Original Message----- From: peru cheppanu [mailto:[EMAIL PROTECTED] Sent: Monday, August 29, 2005 12:42 PM To: user@struts.apache.org Subject: core struts -- best practise fundementals Hi all, I am trying to understand the motivation behind seperation of logic and presentation in struts framework. I was wondering if any of you can provide some light if I am thinking in right direction. Now, if you write scriptlets in JSP, that is a bad practice.., however if you hide that functionality in a tag class and implement that tag like struts tags or any other tags.. thats a good practice. For example, I want to send a concatenated string instead of a hashmap to display as per key-value relationship. I meant send "[EMAIL PROTECTED]" string rather than a hashmap and want to parse it for display. If I write a scriptlet that I use to substring and display only that user is concerned with -- that is bad practice. If I use a tag lib that looks more like <logic:substring name="hashArr" digits="4">, --> good. Am I getting this whole thing wrong? Pls excuse if I sound too stupid and this is my first post here.. --Ashrita --------------------------------- Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]