0

I read about the Dispatcher View pattern and it seems pretty helpful to develop simple web applications.

Can this pattern be considered a simplified MCV or a simple implementation of the MVC pattern?

Francesco Terenzani
  • 1,391
  • 7
  • 14
  • Related: http://stackoverflow.com/questions/3541077/design-patterns-web-based-applications/ – BalusC Jun 07 '11 at 19:07
  • That question is not about Dispatcher View Pattern :-( – Francesco Terenzani Jun 07 '11 at 19:18
  • It was just related, not a dupe or something. The `RequestDispatcher` class is **the** dispatcher part. – BalusC Jun 07 '11 at 19:24
  • sorry BalusC, I'm not a Java developer and I don't fully understand that code. Anyway it seems it doesn't ask to the question if a front controller that dispatch a request to a view (without an intermediate action controller) and that view that pull its data from a model is or not a kind of MVC – Francesco Terenzani Jun 07 '11 at 19:40
  • As I answered, the dispatcher pattern at its own does not necessarily represent MVC. It is however part of MVC. Like as a wheel alone does not necessarily represent a car, but it can however be part of a car. – BalusC Jun 07 '11 at 19:42

1 Answers1

1

The use of the RequestDispatcher is at its own not necessarily considered a simplified MVC pattern. The forwarded/included JSP in turn can still use scriptlets which would then contradict the MVC ideology. Even more, the RequestDispatcher can even be used in a JSP (view) instead of a servlet (controller).

But, on the other hand, it is true that the RequestDispatcher is been used in the average MVC controller to forward the request/response to a view after doing the business action.

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555