One of the main problems with ASP.net webforms is the viewstate mechanism, which takes a lot of bandwith because he serializes all the form inputs and sends it on post commands.
In the book i'm reading it's mentioned that one of the main virtuous of MVC over webforms is that mvc does not contain viewstate. It's sound pretty cool but from what i'm seeing, mvc also sends all the inputs on post commands (this is the only way he can use his binding mechanism).
so what is the difference ? you can call it view state , you can call it "binding" , but bottom line both MVC and webforms serialize all the inputs and sends them all on POST.
Am i wrong ? if not, what is the difference ?
Big difference. Viewstate can get quite large. It retains values which are not necessarily contained in form data. Think of GridViews and Label's etc. They aren't in input fields yet they get persisted through ViewState. In MVC there really is no concept of persistence. It's up to you to return the data to the view (although the binding mechanism makes this fairly easy to do)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With