01 basics of mvc and moving parts

11

Transcript of 01 basics of mvc and moving parts

Page 1: 01 basics of mvc and moving parts
Page 2: 01 basics of mvc and moving parts

Overview of the ASP.NET MVC01-Basics of MVC and Moving Parts.

02-Creating and Configuring Models.

03-Deep Into Views and HTML.

04-Intro to Bootstrap.

Page 3: 01 basics of mvc and moving parts

ASP.NET

WebForm

s

SitesWeb

PagesSingle Page Apps

MVC Web API

SignalR

ServicesASP.NET Overview

Page 4: 01 basics of mvc and moving parts

Models, Views, and ControllersWhat does MVC look like?

ControllerControllerRetrieves Model“Does Stuff”

ViewViewVisually representsthe model

Request

Response

Model

Page 5: 01 basics of mvc and moving parts

Seems complicated. What’s the point?• Every web application needs some structure• MVC helps you stay organized, start to finish• Often end up with less code, not more• Smoother learning curve as your project grows

Page 6: 01 basics of mvc and moving parts
Page 7: 01 basics of mvc and moving parts

Site.master Products.aspx Cart.ascx

Page 8: 01 basics of mvc and moving parts

Viewstate

Page 9: 01 basics of mvc and moving parts

<select name="ctl00$uxLanguageSelector$uxLanguageSelector" onchange="javascript:setTimeout('__doPostBack(\'ctl00$uxLanguageSelector$uxLanguageSelector\',\'\')', 0)" id="ctl00_uxLanguageSelector_uxLanguageSelector" class="countrySelect">

Page 10: 01 basics of mvc and moving parts

• Unit testing helps you change code with confidence

• ASP.NET MVC is designed to make unit testing easy

Testability

Page 11: 01 basics of mvc and moving parts

DEMOHello ASP.NET MVCDownload the source code from:https://www.dropbox.com/sh/itv6gkifa1j1050/AADh-UsFXd8OkC1IwekoS913a?dl=0

Advanced Developers