asp net mvc

40
by Bogdan Grynko SoftServe Inc. ASP.NET MVC

Upload: bgrynko

Post on 16-Apr-2017

803 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Asp net mvc

by Bogdan GrynkoSoftServe Inc.

ASP.NET MVC

Page 2: Asp net mvc

Thin clients: ASP.NET ASP.NET MVC

Select technology

Page 3: Asp net mvc

Launched in 2007 Code released under the Microsoft Public License Based on ASP.NET (integrated with existing

ASP.NET features) Composed from three

roles: Model, View and Controller Lightweight Highly testable

ASP.NET MVC

Page 4: Asp net mvc

Full control over html Enables TDD Easy integrate with JavaScript Following the design of stateless

nature of the web RESTful urls that enables SEO No ViewState and PostBack events

What under ASP.NET MVC? http://break.com/ http://townhall.com/ http://gamefly.com/ http://stackoverflow.com/ http://www.marketwatch.com/ http://dimecasts.net/ http://tfspreview.com/ http://webcrawler.com/

Advantages

Page 5: Asp net mvc

Be successful

Page 6: Asp net mvc

Visual Studio up 2008(if 2008 addition package needs to be installed )

MS SQL Server (if it is planned to use MS storage for data)

Get the tools

Page 7: Asp net mvc

Create solution

Page 8: Asp net mvc

Setup UT

Page 9: Asp net mvc

Review solution

Page 10: Asp net mvc

Review solution structure

Page 11: Asp net mvc

Create DB

Page 12: Asp net mvc

Add new table

Page 13: Asp net mvc

Create columns

Page 14: Asp net mvc

Add ORM Step1

Page 15: Asp net mvc

Add ORM Step2:

Page 16: Asp net mvc

Adding ORM Step3:

Page 17: Asp net mvc

Web.config:

Page 18: Asp net mvc

Create Posts Data Models

Page 19: Asp net mvc

CreateMessage

Repository Service

Part1

Page 20: Asp net mvc

CreateMessage

Repository Service

Part2

Page 21: Asp net mvc

Create Blog Controller

Step1

Page 22: Asp net mvc

Create Blog Controller

Step2

Page 23: Asp net mvc

Review created controller

Page 24: Asp net mvc

Create Index Blog View

Step1

Page 25: Asp net mvc

Create Index Blog View

Step2

Page 26: Asp net mvc

Review created view

Page 27: Asp net mvc

Fill Index Blog View

Step4

Page 28: Asp net mvc

Create Text Post

Template ViewStep1

Page 29: Asp net mvc

Create Text Post

Template ViewStep2

Page 30: Asp net mvc

Create Text Post

Template ViewStep3

Page 31: Asp net mvc

Create Text Post Partial

ViewStep4

Page 32: Asp net mvc

CreatePicture PostPartial View

Page 33: Asp net mvc

Add Text Partial View

Step1

Page 34: Asp net mvc

Add Text Partial View

Step2

Page 35: Asp net mvc

Add Text Partial View

Step3

Page 36: Asp net mvc

Add Picture Partial View

Page 37: Asp net mvc

Add selection change script to Blog Index view

Page 38: Asp net mvc

Fill Blog Controller

Part1

Page 39: Asp net mvc

Fill Blog Controller

Part2

Page 40: Asp net mvc

Deploy solution

1. In Visual Studio, open the project that you want to deploy.2. In Solution Explorer, expand the References node.3. Select the following assemblies:

1. System.Web.Mvc2. System.Web.Routing3. System.Web.Abstractions

4. In the Properties window, set Copy Local to True.5. In Solution Explorer, right-click the project and click Publish.6. The Publish Web dialog box is displayed.7. In Target location (http:, ftp:, or disk path), browse to a local folder and click Open.8. Select either Replace matching files with local copies or Delete all existing files prior to publish.9. Under Copy, select one of the following, depending on your needs: Only files needed to run this application, All project files, or All files in the source project folder.10. If your application contains files in the App_Data folder such as database files, select Include files from the App_Data folder.11. Click Publish.