Hi There -
We have a debate on our project about where string content should be generated . If there's a message that should be displayed to the user, it's easier for the action class to save a string in a form bean and have the jsp retrieve the string from the bean and display it. However a member of our team has convinced the team lead that we should merely pass flags in the bean and the jsp will have a series of c:if statements that will check the flags and display the appropriate string message. that way all string content is in the presentation layer and not in the model.
I prefer the first method because there's less coupling between model and presentation and it's more flexible for adding new messages.
How would an MVC expert decide this?
Steve
We have a debate on our project about where string content should be generated . If there's a message that should be displayed to the user, it's easier for the action class to save a string in a form bean and have the jsp retrieve the string from the bean and display it. However a member of our team has convinced the team lead that we should merely pass flags in the bean and the jsp will have a series of c:if statements that will check the flags and display the appropriate string message. that way all string content is in the presentation layer and not in the model.
I prefer the first method because there's less coupling between model and presentation and it's more flexible for adding new messages.
How would an MVC expert decide this?
Steve