• Post Reply Bookmark Topic Watch Topic
  • New Topic

how can we use MVC architecture best to implement Presentation layer menus

 
Rao Nadella
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it a good practise to use objects in the servlet side for the presentation layer menus and the navigation.
What would be a good way to implement these in a dynamic environment.
Depending on the state of server side variables, would JSP side be a better venue to implement menus.
Thanks a bunch.
 
Brian Glodde
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rao, You should take a look at Struts. It's a framework that encourages a clean distinction between Model, View, and Controller.
 
Andrew Patzer
Author
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Brian Glodde:
Rao, You should take a look at Struts. It's a framework that encourages a clean distinction between Model, View, and Controller.

I agree, Struts is a good solution. If you were to not use Struts and create your own framework, however, a good solution is to store dynamic menu content as JavaBean components and then have your controller servlet stuff the beans into the JSP. You could then use a custom tag on your page to interact with the bean to generate menu entries and attributes (checked/unchecked, highlighted, underlined, etc...).
I hope this helps.
Andrew
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!