wood burning stoves 2.0*
The moose likes Servlets and the fly likes the use of  the Controller pattern - an overhead ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "the use of  the Controller pattern - an overhead ?" Watch "the use of  the Controller pattern - an overhead ?" New topic
Author

the use of the Controller pattern - an overhead ?

alen agmon
Greenhorn

Joined: Sep 22, 2004
Posts: 11
i have recently implemented the Controller pattern -
where each request is processed in an object like:

if(grantAccess()){
dispatch next view
}else{
dispatch access denied

}

well it seem like its a littel overheaded, is it really necessary
to dispatch the request like that instead of just checking the Session in every secured jsp page ?

what do u think?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60766
    
  65

The amont of overhead in performing a simple if operaton is completely neglible. You should concentrate on structuring your application in a logical, easy-to-understand manner rather than worrying about performance and overhead. Then, if, and only if, a performance problem can be concretely identified, you can deal with it in a meaningful manner.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: the use of the Controller pattern - an overhead ?
 
Similar Threads
JSP & Controller in class/sequence diagram
Can a Controller dispatch to diff. views?
Reg Front Controller Pattern...
Requestdispatch forward
Last minute Questions