This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
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: 106
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://aspose.com/file-tools
 
subject: Question of MVC Design Pattern
 
jQuery in Action, 3rd edition