• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Front controller

 
Amruth Puppala
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is from HFSJ 1st edition page 751
What is the meaning of this statement, how this would be drawback of front controller.
A drawback of Front controller (on its own, without Struts) is that it's very barebones compared to Struts. To create a reasonabla application from scratch using the Front controller pattenr, you would end up rewriting many of the features already found in Struts.


How the follwing statement is true
Front Controller->Increases the maintainability of the Infrastructure code.
 
Sandeep Bhandari
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can make some point from the point that Infrastructure code is required by all and its difficult to make changes in all code when you change the implementation of infrastructure code. The FrontController is run for each request and hence can all the infra code and if something changes in infra code, only change needed is in FrontController.
 
Amruth Puppala
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please tell me with some more clarity. Lot of confusion I got with this.
[ August 07, 2008: Message edited by: Chintu sirivennela ]
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "trick", is to understand, that Struts is a "Front Controller".

"Front Controller" is the name of a object-oriented design pattern. Struts is a partial implementation of the design pattern. Struts code is the infrastructure code that handles the plumbing associated with Http-based requests and responses. There are other ways to handle "the plumbing associated with Http-based requests and responses" besides using a "Front Controller". They most likely include code that is not as efficient as an implementation of the Front Controller design pattern.

Front Controller->Increases the maintainability of the Infrastructure code.


This is true. This is one of the benefits of implementing the Front Controller design pattern. To understand this question, you need to understand the purpose of design patterns in general and the purpose of this pattern.
[ August 07, 2008: Message edited by: James Clark ]
 
Amruth Puppala
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks James Clark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic