Why can't I use server controls in ASP.net MVC? -



Why can't I use server controls in ASP.net MVC? -

i'm getting ready responsible leading development of little asp.net mvc application. first time creating mvc application, excited!

i've read on documentation , sense have general thought of how mvc works. however, if understand correctly, server controls (like gridview, instance) not part of mvc.

my question is: why? @ development shop, i'm used using controls gridview , ms chart controls i'm @ finish loss developing without them. seems starting over.

why server controls unavailable? how microsoft expect me work without them? alternatives?

my question is: why?

because of them depend on things viewstate , postback models part of classic webforms model , no longer exist in asp.net mvc. server side controls rely on events perform postbacks server persisting state in hidden fields (viewstate). in asp.net mvc no longer work events such button1_click. in asp.net mvc work model, controller , view. controller responsible receiving user requests, querying model, translating results view model , passing view model view responsibility display under form.

in asp.net mvc there html helpers used generate reusable html fragments between views. may take illustration @ telerik asp.net mvc suite of such helpers. phone call them controls have nil classic webforms server side controls. html helpers.

basically classic webforms leaky abstraction of web. microsoft did in time when designed framework bring existing windows developer skills web getting more , more momentum. since web still new technology developers weren't yet familiar with, created abstraction hide away way www works. developers accustomed drag , dropping controls on windows forms, double clicking on buttons generating code them in set info access logic , on. model transposed web application development webforms. http protocol hidden behind abstraction called webforms. illustration don't need know html, nor javascript, not css in order create website using webforms great because framework abstracts things you. unfortunately doing prevents utilizing total powerfulness of lower level web technologies people might need when developing web applications.

what asp.net mvc remove leaky abstraction , bring www developers way intended creators. asp.net mvc not mature plenty compared classic webforms cannot expect find same range of available controls , widgets things shifting.

i recommend start here asp.net mvc: http://asp.net/mvc. go ahead, watch videos, play around samples , see if asp.net mvc or not. , of course of study if encounter specific difficulty or question don't hesitate come here , inquire it.

asp.net asp.net-mvc asp.net-mvc-3

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -