Asp.net mvc is loosely coupled and full control over html -
in mvc, how can loosely couple , full control on html, can body explain me, reference , searched in google not clear me.
- loosely couple
asp.net mvc works abstractions on standard httpcontext classes such httpcontextbase, httprequestbase, httpresponsebase, httpsessionbase allows easier unit testing in isolation because classes abstract , can mocked. in classic asp.net webforms harder unit test code because relies on real asp.net context classes close impossible mock require real context in order work. imho 1 of best things asp.net mvc compared classic webforms.
also have clearer separation between various aspects: model logic, view logic , controller logic. doesn't mean in classic webforms cannot achieve separation. it's bit harder if follow standard approach put in view , code behind.
- full control on html
contrary classic asp.net webforms place usercontrol in webform generates html @ runtime (with far or less control on generated html), in asp.net mvc view, writing html can write whatever html like.
Comments
Post a Comment