Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts comes under which layer of three tier architecture

 
p hasini
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
struts comes under which layer of three tier architecture in real time projects.

Is it the controller layer
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts is framework to implement MVC architecture. In struts different component to do that....

ActionForm - Model
JSPs - View
ActionServlet & Action(it is debatable) - Controller
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts framework is used to buid Presentation-tier components (View and Controller only). There is nothing in Struts that is related to Model in a MVC implementation.

Struts will help you build a MVC-based application, but it is up to you to design and code the Model application and to integrate it with a Struts-based Controller and View components.

A Model application should be completely independent from any web framework technologies. The best test of this aspect is you should be able to execute any and all business logic in your Model application from a command-line. If can't execute all business logic from a command-line interface, then you most likely have not implemented MVC correctly.

Struts has nothing to do with Business-tier or Integration-tier components.

So, in terms of the Model-View-Controller design pattern and three-tier architecture. The (Struts-based) View and (Struts-based) Controller are on Presentation-tier and the Model component is on Business-tier.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic