Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial -01. Objective In this session we will discuss about : 1.What is MVC? 2.Why MVC? 3.Advantages of MVC over ASP.NET 4.ASP.NET development models.

Similar presentations


Presentation on theme: "Tutorial -01. Objective In this session we will discuss about : 1.What is MVC? 2.Why MVC? 3.Advantages of MVC over ASP.NET 4.ASP.NET development models."— Presentation transcript:

1 Tutorial -01

2 Objective In this session we will discuss about : 1.What is MVC? 2.Why MVC? 3.Advantages of MVC over ASP.NET 4.ASP.NET development models 5.How to Install MVC? 6.MVC Release History 7.Creating First Asp.Net MVC Application

3 What is MVC?

4 MVC ? MVC is successor of ASP.NET So Before going to discuss about MVC lets little bit talk about Asp.Net. It is a part of.NET framework developed by Microsoft. It is used to Create Web Application(Internet Application).So that every one can access this application from anywhere. This application will be access thru Web Browser( Firefox, Chrome. Internet Explorer etc) by passing URL in url bar. This application will be stored & execute on server. Like: www.google.com, www.prognoztech.com, www.amazon.com are internet application we are accessing thru url.www.google.comwww.prognoztech.comwww.amazon.com

5 MVC (Continue…) There are a lot of other programming language( a language that machine understand) used to create Internet application, 1.Java 2.PHP 3.CGI 4.ASP

6 Disadvantage of ASP.NET There are a lot of code required to create Web(Internet) Application using ASP.NET, MVC make it simple by categorize the structure of Asp.Net in 3 parts. Lets talk about ASP.NET internet development model in details:

7 ASP.NET supports three different development models

8 Differences between these development models are:

9 MVC Programming Model MVC is one of three ASP.NET programming models. MVC is a framework for building web applications using a MVC (Model View Controller) design: 1)The Model represents the application core (for instance a list of database records). 2)The View displays the data (the database records). 3)The Controller handles the input (to the database records).

10 Why MVC? ASP.NET MVC helps to reduce the complexity of the web application by dividing an application into three layers, Model, View and Controller. This separation (loose coupling) helps in some long term benefits like isolation of components while development and also this separation provides better support for test-driven development (TDD). ASP.NET MVC web site are good in performance and also easy to maintain.

11 How to Install MVC? Before going to install mvc first check what version of MVC already installed in Your computer. To check what MVC version already installed in My Machine open control panel then open add or remove programs dialogue box.

12 How to Install MVC? (Continue…)

13 MVC Release History

14 How to Download MVC 3 & MVC 4?

15 EX

16 Introduction of ASP.NET MVC 4 ASP.NET MVC 4 is a framework for building scalable, standards-based web applications using well-established design patterns and the power of ASP.NET and the.NET Framework. Currently ASP.NET MVC 4 is supported in Visual Studio 2010 and Visual Studio 2012, previous versions of Visual Studio does not support ASP.NET MVC 4 as of now. If you don’t have ASP.NET MVC 4 in your box then install MVC 4 for Visual Studio 2010 or else use Visual Studio 2012 to get started with this.

17 Creating First Asp.Net MVC Application

18 Step-1 If you choose.NET Framework 3.5 you are not able to see MVC 3 & 4 option in new Project Box.

19 Step-2 If you choose.NET Framework 4.0 Then

20 Step-3 If you choose.NET Framework 4.0 Then

21 Step-4

22 Step-5

23 Step-6

24 Step-7

25 Step-8

26 Step-9

27 Advantage of MVC over Asp.Net WebForms in details ?

28 MVC vs. WebForms

29 In WebForms whenever I want to execute any event say Button_Click() before that page life cycle will execute first (you like or not doesn’t keep matter). Page Life Cycle execute First Then event

30 MVC vs. WebForms

31 In MVC direct hit come to action(method you want to be run)

32 Example

33 Continue…Namespace

34 Assembly & Controller used in mvc application

35 Running First MVC Application

36 How to determine what version of mvc is being used by an existing mvc web application ?

37 MVC Version info in existing Application There are two ways : 1.At design time 2.At runtime Asp.net mvc namespace:

38 Version Info:

39 At runtime

40 Compare Asp.Net MVC & Web Application 1.Asp.Net MVC Application: 2.Web Application:

41 MVC URL http://localhost:1927/Home/Index Server Functions in Controller are generally called as Controller Action Methods. In MVC’s URL are mapped to Controller Action Methods.

42 Web Form URL http://localhost:1928/WebForm1.aspx Server In WebForm’s URL are mapped to physical Files.

43 How to deploy application on IIS 1.Open IIS(start->run->type inetmgr)

44 How to deploy application on IIS 2.Deploy application on IIS.

45 How to deploy application on IIS 2.Deploy application on IIS.

46 Summary!!


Download ppt "Tutorial -01. Objective In this session we will discuss about : 1.What is MVC? 2.Why MVC? 3.Advantages of MVC over ASP.NET 4.ASP.NET development models."

Similar presentations


Ads by Google