aspose file tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Question of MVC Design Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Reply Bookmark "Question of MVC Design Pattern" Watch "Question of MVC Design Pattern" New topic
Author

Question of MVC Design Pattern

avseq anthoy
Ranch Hand

Joined: Apr 27, 2004
Posts: 102
I have a jsp page.
Is it reasonable that the page have the code "session.setAttribute("abc")" if I use a mvc framework ?

I think the view layer should only the logic for presentation.
I think the "session.setAttribute("abc")" has some smell for bussiness logic.
Can somebody give me other suggestion?

Thanks~


My Way,My Pace
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Maybe that attribute has something to do with Presentation logic. If it does then it complies with MVC object-oriented design pattern.

If that attribute has something to do with Business logic, then it shouldn't be in the JSP page.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Question of MVC Design Pattern
 
Similar Threads
Not retrieving value from session
use EL get variable
Can a Page can act as a controller in MVC arch.
MVC question
MVC question