File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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: 104
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.
 
 
subject: Question of MVC Design Pattern
 
Similar Threads
Can a Page can act as a controller in MVC arch.
MVC question
Not retrieving value from session
MVC question
use EL get variable