开发者

Where can I find a detailed description of how data is transferred around between View and Controller in .net MVC? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 8 years ago.

Improve this question

I'm looking to learn more about the .net MVC3 data model. Specifically, I'd like to learn details of how the system goes about automatically transferring data between client and server.

I'm looking for a documentation source which contains a level of detail that's sufficient for answering questions like these:

  • How is data automatically mapped from model to view and back?
  • What are the limitations of the mappin开发者_JAVA百科g?
  • If I were to instrument, for example, custom logging or debugging tools for tracking data moving between controller and view, what are some good inflection points I can look at?

etc...

Any pointers would be appreciated, whether to documentation online or relevant books.


I really like the Pluralsight screencasts for describing the different pieces of MVC. They are on the left side of the MVC site. There are also a number of good articles on that page.


First, there is very little "automatic" in the mapping methods in a normal MVC application. If it were automatic, you would be more tightly coupled than you should be. As an example, you create a view to expose specific parts of the view. But, you can change how you display at any time by altering the view. Conversely, if you want a method to accept arguments from the client side (view after it is rendered), they become parameters.

As time moves on, I am sure you will see more and more Microsoft automagic bits bleeding into MVC to make it simpler for non-programmers to program. It happens, but there is a risk adding too much automagic will break down the "separation of concerns" in the MVC model.

Now, controller to view may seem a bit more automagic, but this is more of a ruse, as you can gain control of the model being passed to the view and alter it at any time. It appears even more automagic, in some cases at least, when you use page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜