Professional Documents
Culture Documents
NET MVC
Telerik Academy
http://academy.telerik.com
Table of Contents
2
The MVC Pattern
The MVC Pattern
4
Model
• Set of classes that describes the data we are working with as well as the
business
• Rules for how the data can be
changed and manipulated
• May contain data validation rules
• Often encapsulate data stored in a database as well as code used to
manipulate the data
• Most likely a Data Access Layer of some kind
• Apart from giving the data objects, it doesn't have significance in the
framework
5
View
6
Controller
7
MVC Steps
8
The MVC Pattern for Web
9
MVC Frameworks
• CakePHP (PHP)
• CodeIgniter (PHP)
• Spring (Java)
• Perl: Catalyst, Dancer
• Python: Django, Flask, Grok
• Ruby: Ruby on Rails, Camping, Nitro, Sinatra
• JavaScript: AngularJS, JavaScriptMVC, Spine
• NodeJS: Express
• ASP.NET MVC (.NET Framework)
10
ASP.NET MVC
ASP.NET Core
Presentation
ASP.NET
Caching .NET Globalization
12
ASP.NET Web Forms
13
ASP.NET MVC
14
ASP.NET MVC
15
Separation of Concerns
16
Extensible
17
Clean URLs
• REST-like
• /products/update
• /blog/posts/2013/01/28/mvc-is-cool
• Friendlier to humans
• /product.aspx?catId=123 or post.php?id=123
• Becomes /products/chocolate/
• Friendlier to web crawlers
• Search engine optimization (SEO)
18
Community-based
19
MVC Pattern in ASP.NET MVC
20
Creating ASP.NET MVC Project
The Tools
22
The Technologies
23
Visual Studio 2012: New Project
24
VS 2012: Default Layout
25
Visual Studio 2013: New Project
26
VS 2013: Default Layout
27
Internet App Project Files
Static files (CSS, Images, etc.)
View templates
31
Demo: NuGet
Server Information with Glimpse
Server Info with Glimpse
34
Install Glimpse
35
Demo: Glimpse
Summary
37