Sue, Bear and Ko,
I agree to the fact that the presentation layer shouldn't be burdened with business logic. Let me explain the situation a little further -
70% of the application's UI is being handled by a single JSP. The app architecture is based on the MVC
pattern. The view beans construct an XML document and pass it on to the JSP. The JSP then parses the XML document and displays the data. The pages have the following structure -
- A header
- sub header
- a list of buttons (for actions that can be taken on the data)
- data in the form of a table (the table has a header which allows for sorting, filtering of the data etc)
- a footer which has controls for navigating between pages, changing the no of records that can be shown in a table etc.
Now, all of it started off as a simple JSP, which over time, as and when the application grew, grew in complexity as well. More and more logic was added and we took out each section and made them into tags. Now, we have a skeletal JSP with tags in them which handles each of the parts' display. The problem is, when a portion of the UI requires changing, we have to go and change the tags, which I feel is not quite a good way to do things. I feel that the UI changes should be easy to make.
Is there any way by which I can decouple the UI aspect from the tags? Can JSTL be used in a similar way? Is there any framework that anybody has used for the same?
Thanks
-Manoj.