This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

attributes in response, why not?

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why we don't have attributes in response?

In MVC, all request comes from view to controller, then controller forwards request as well as response to model (escaping action classes) and then model does some processing, write something in response (add something in request attribute if that something is not easily writable in response) and send back request and response to controller and then controller send both to view, view gets that something from request and write into response...

My doubt is (only if above is right, ofcorse), it seems bit illogical that what we want to respond, we are adding in request attribute...

 
Darren Edwards
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In MVC, when the servlet forwards the request to the JSP it is not responding, it is just adding to the request to enable the JSP to respond. The response is the final stage that goes to the client - if you think about it, what use would there be adding attributes to a response as the client can do nothing with them ...
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Darren Edwards:
In MVC, when the servlet forwards the request to the JSP it is not responding, it is just adding to the request to enable the JSP to respond. The response is the final stage that goes to the client - if you think about it, what use would there be adding attributes to a response as the client can do nothing with them ...


I agree that, when model adds something in request attributes, it's not the process of responding. But, what we are adding in request attributes, is not the part of response (result of processing)???

:roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic