aspose file tools*
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 Soft Skills this week in the Jobs Discussion 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: 61761
    
  67

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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: the use of the Controller pattern - an overhead ?