introduction asp.net mvc5 |mvc5 tutorial for beginners & advanced

24
Introduction to ASP.NET MVC Shailendra Chauhan Microsoft MVP, Technical Consultant and Corporate Trainer

Upload: pro.dotnettricks

Post on 09-Dec-2020

24 views

Category:

Education


0 download

DESCRIPTION

MVC Development training program is primarily designed for .NET Beginner(s)/Professional(s) who want to learn and join MVC Classes. In this course, you will learn how to create web pages, custom validation etc... for more details- https://www.dotnettricks.com/training/masters-program/mvc-webapi

TRANSCRIPT

Page 1: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

Introduction to ASP.NET MVC

Shailendra Chauhan

Microsoft MVP, Technical Consultant and Corporate Trainer

Page 2: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• Introduction to ASP.NET MVC

• ASP.NET MVC Evolution History

• ASP.NET Webforms vs ASP.NET MVC

• Advantages of ASP.NET MVC

• MVC Pattern

• MVC vs. 3-Tiers

• Routing

• ASP.NET MVC Pipeline

Agenda

Page 3: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

.NET Framework

ASP.NET Framework

WebForms MVC

• A new web development style on the

top of ASP.NET framework.

• Based on MVC pattern and an

alternative to WebForms.

• Doesn’t support pages and code

behind, server-controls, drag and drop,

postback, view state and event life

cycle.

ASP.NET MVC

WebFormsWebForms

Page 4: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

ASP.NET MVC Evolution History

ASP.NET MVC 5.2.6

2018

ASP.NET MVC 5.2.3, WebAPI 2.2

2015

ASP.NET MVC 5,

WebAPI 2

2013

ASP.NET MVC 4, WebAPI

2012

ASP.NET 4.5, MVC 3

2011

ASP.NET 4.0, MVC 2

2010

ASP.NET MVC 1

2009

Page 5: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• Released on Mar 13, 2009

• Runs on .NET 3.5 and with Visual Studio 2008

• MVC Pattern architecture with WebForm Engine

• Html Helpers

• Ajax helpers

• Routing

• Unit Testing

ASP.NET MVC1

Page 6: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• Released on Mar 10, 2010

• Runs on .NET 3.5, 4.0 and with Visual Studio 2008 & 2010

• Strongly typed HTML helpers with lambda expression

• Support for Data Annotations Attribute

• Client-side validation

• UI helpers

• Areas for partitioning a large applications into modules

• Asynchronous controllers

ASP.NET MVC2

Page 7: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• Released on Jan 13, 2011

• Runs on .NET 4.0 and with Visual Studio 2010

• Razor view engine

• Unobtrusive JavaScript validation

• Remote validation

• Compare Attribute

• ViewBag

• Sessionless Controller

ASP.NET MVC3

Page 8: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• Global filters

• Child Action Output Caching

• Dependency resolver for IoC

• Use of NuGet to deliver software and manage dependencies throughout the platform

ASP.NET MVC3 Contd.

Page 9: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• Released on Aug 15, 2012

• Runs on .NET 4.0,4.5 and with Visual Studio 2010SP1 & 2012

• ASP.NET Web API

• Mobile project template using jQuery Mobile

• Display Modes

• Task support for Asynchronous Controllers

• Bundling and minification

• Support for the Windows Azure SDK

ASP.NET MVC4

Page 10: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• Released on 17 October 2013

• Runs on .NET 4.5 and with Visual Studio 2013

• One ASP.NET

• ASP.NET Identity

• ASP.NET Scaffolding

• Authentication filters

• Bootstrap in the MVC template

• ASP.NET Web API2

• Attribute Routing

ASP.NET MVC5

Page 11: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• Event Driven development model

• Server Controls

• Follows Web Forms Syntax

• ViewState

• Session

• File-based Url Mapping

• User Controls

• Not Open Source

ASP.NET WebForms vs. ASP.NET MVC

• MVC Pattern development model

• Html Helpers

• Follows WebForms & Razor Syntax

• ViewData, ViewBag

• Session, TempData

• Route-based Url Mapping

• Partial Views

• Open Source

Page 12: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• Separation of concern

• Extensible and pluggable

• Light Weight

• TDD (Test Driven Development)

• URL Routing

• Better support for open source

• Supports ASP.NET features

Advantages of ASP.NET MVC

Page 13: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

Data

UI

Logic

Web Application Components

Object

Class

DOM

Page 14: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

Object

DOM

Class

MVC Pattern

Model

Controller

View

Page 15: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

Data Model

Business Model

Presentation Model

Model

Page 16: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

Standard View

Strongly Typed View

Partial View

Layout

View

Page 17: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

C#, VB Class

Action Methods

Regular Methods

Controller

Page 18: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

Model

View ControllerInteraction Interaction

Notification

Presentation

PresentationNotification

Changes

Eg. www.domain.com/Product/Edit/1

Model-View-Controller Communication (Contd.)

Page 19: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

Model

View Controller

DAL

PL

BAL

MVC vs. 3-Tier

Page 20: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

Model

View Controller

Presentation Tier

MVC vs. 3-Tier

Page 21: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

• A pattern matching system that monitor the incomingrequest and figure out what to do with that request

• Typically, a way to serve user request

Routing

Routing

Controller

View

Model

Request

Response

Page 22: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

Types of Routing

Page 23: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502

ASP.NET MVC Pipeline

Page 24: Introduction Asp.Net MVC5 |MVC5 Tutorial for Beginners & Advanced

For ASP.NET Core Online Training : +91-999 123 502