jon galloway | technical evangelist christopher harrison | content developer

25
Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer Introduction to ASP.NET MVC Jump Start

Upload: martin-hart

Post on 22-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Jon Galloway | Technical EvangelistChristopher Harrison | Content Developer

Introduction to ASP.NET MVCJump Start

Page 2: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Azure Technical Evangelist Focused on ASP.NET MVChttp://weblogs.asp.net/jongalloway Web development on Microsoft platform since late '90sEx-submariner; Showcase Showdown winner “Price is Right”

Popular Author and Conference SpeakerWrox Professional MVC 5; MVC Music Store tutorialVirtual ASP.NET MVC Conference (mvcConf)World wide Web Camps speakerHerding Code podcast (http://herdingcode.com)

Meet Jon Galloway | @jongalloway

Page 3: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Meet Christopher Harrison | @geektrainer

Content DeveloperSpecializes in ASP.NET, SharePoint and SQL ServerMicrosoft Certified Trainer

Over 14 Years ExperienceRegular presenter at TechEdPeriodic bloggerCertification advocateMarathoner, husband, father of one four legged child

Page 4: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Course Topics

Introduction to ASP.NET MVC

01 | Basics of MVC and the Moving Parts

05 | Customizing Views

02 | Creating and Configuring Models

06 | Introduction to Bootstrap

03 | The Power of Visual Studio 07 | Introduction to Authentication

04 | Customizing Controllers 08 | Next Steps

Page 5: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Setting Expectations

• Target Audience– .NET Developer who is new to web development–Web developer who is new to .NET–Web Forms developer who wants to learn ASP.NET MVC

• Suggested Prerequisites/Supporting Material– Visual Studio 2013 Express for Web–MVA:

Developing ASP.NET MVC 4 Web Applications Jump Start

Page 6: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

• Microsoft Virtual Academy– Free online learning tailored for IT Pros and Developers – Over 1M registered users– Up-to-date, relevant training on variety of Microsoft

products

• “Earn while you learn!” – Get 50 MVA Points for this event!– Visit http://aka.ms/MVA-Voucher – Enter this code: IntroASPNetMVC (expires 7/24/2014)

Join the MVA Community!

Page 7: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Click to edit Master subtitle style01 | Basics of MVC and the Moving

Parts

Jon Galloway | Technical EvangelistChristopher Harrison | Content Developer

Page 8: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

• ASP.NET overview

• What is MVC?

• What’s the point?

Module Overview

Page 9: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Click to edit Master subtitle style

ASP.NET Overview

Page 10: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

ASP.NET

WebForm

s

Sites

WebPages

Single Page Apps

MVC Web API

SignalR

Services

ASP.NET Overview

Page 11: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Click to edit Master subtitle style

What is MVC?

Page 12: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Models, Views, and ControllersWhat does MVC look like?

ControllerControllerRetrieves Model“Does Stuff”

ViewViewVisually representsthe model

Request

Response

Model

Page 13: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Click to edit Master subtitle style

What’s the Point

Page 14: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

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 15: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Some comparisons to ASP.NET Web Forms

Page 16: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

• Productive way to build web applications• Control and event-based programming model• Controls that abstract HTML, JS and CSS• Rich UI controls – datagrids, charts, Ajax• Browser differences are handled for you

Summary: Web Forms handles a lot of things for you.

ASP.NET Web Forms Values

Page 17: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer
Page 18: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Default.aspx

Page 19: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Site.master Products.aspx Cart.ascx

Page 20: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Default.aspx Products.aspx About.aspx

Page 21: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

Viewstate

Page 22: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

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

Page 23: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

• Unit testing helps you change code with confidence

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

Testability

Page 24: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

DEMOHello ASP.NET MVC

Page 25: Jon Galloway | Technical Evangelist Christopher Harrison | Content Developer

©2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.