A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
OO, Patterns, UML and Refactoring
Question of MVC Design Pattern
Joined: Apr 27, 2004
Mar 15, 2011 04:05:59
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?
My Way,My Pace
Joined: Apr 16, 2008
Mar 15, 2011 07:48:24
Maybe that attribute has something to do with Presentation logic. If it does then it complies with MVC object-oriented design
If that attribute has something to do with Business logic, then it shouldn't be in the
It is sorta covered in the
JavaRanch Style Guide
subject: Question of MVC Design Pattern
use EL get variable
Can a Page can act as a controller in MVC arch.
Not retrieving value from session
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014