Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


MVC Class


Jake Moening

on 21 March 2013

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of MVC Class

ASP.NET MVC Overview Jake Moening ASP.NET Web Forms Problems One code-behind per page makes reuse difficult
Server control support results in less control over HTML
Weak Routing
View State causes large page size
Low Extensibility (View Engines and such) ASP.NET MVC Solutions Reusable controller logic
No more server controls
Strong routing engine
No ViewState means better performance
Highly extensible What is MVC Again? Model – Contains all of an application’s logic (business logic, and data access logic. )
View – A view contains HTML markup and view logic.
Controller – A controller contains control-flow logic. Interacts with MVC Models and Views to control the flow of application execution. Routing System All URLs hit MVC Routing engine
(PHP, JSP, ASP.NET WebForms, etc), incoming URLs typically map to files stored on disk
ASP.NET MVC URLs map to classes directly
No need to follow folder structures The Controller and Actions Controller Actions take input from the user.
Controller sends input to the DAL to manipulate the model.
Model is passed back to the View via the call to View().
Application back end code can be written in any .NET language of choice (C#, VB, F#, IronPython, IronRuby, etc...) MVC App Folder Conventions ASP.NET MVC framework emphasizes convention over configuration.
Content – Contains static content such as images and Cascading Style Sheet files.
Controllers – Contains ASP.NET MVC controller classes.
Models – Contains ASP.NET MVC model classes.
Scripts – Contains JavaScript files including the ASP.NET AJAX Library and jQuery.
Views – Contains ASP.NET MVC views. Now Lets Render Some Output! HTML is generated by view files written in ASP.NET
Multiple Rendering Engines available (WebForm, Razor, Spark, NDjango, etc...) ASPX Syntax Razor Syntax Spark Syntax NDjango Syntax Razor with C# for the Win! @ symbol rules all
Current time is: @DateTime.Now (inline)
@{ var date = DateTime.Now } (blocks)
@* This class is used to... *@ (comments)
C# VB Layout Pages Reusable Boiler Plate Code SiteLayout.cshtml Categories.cshtml Output Request Types Multiple actions per URL Routing system can tell by the attribute that it's only for Gets or Posts etc... Security Authorize Attribute Forces Forms Authentication Other Controller Return Types Content / JSON / XML { 'success': true, 'value': 'Test', 'mode': 'Online' } Bundling and Minification bundling and minification built in
Use custom bundlers / compressors as well DEMO! Questions?
Full transcript