C C T B H P N

Lecture #7 - Asp.Net MVC with Razor Pages

Controllers, models, views

Web Resources
Asp.Net Core
Definition
Asp.Net is a platform for delivering web content. Asp.Net applications respond to requests by dynamically assembling web pages from control models and data, often from a database. Asp.Net was originally a Windows only platform. Asp.Net Core extends that to Linux and Mac platforms as well.
The Model-View-Controller (MVC) architecture has three major part types:
Views display information to the user and transmit user actions back to a controller. Controller instances are created for each request. They coordinate responses to the request by collecting data from the model and assembling it into a view for the response. Models manage data and often provide application logic to simplify controller operations.
Books Asp.Net Core Book - gitbooks
Tutorials Introduction to Asp.Net Core - MSDN, Razor Pages Tutorial - MSDN
Asp.Net Core - Dependency Injection - tutorialsteacher.com
References .Net Core Guide, Asp.Net Core Documentation - MSDN
Using .Net Core in Visual Studio Code
Razor syntax reference - MSDN, Create Razor Pages application
App startup, Static files in Asp.Net Core
File Uploads in Asp.Net Core
Understanding Asp.Net Core demystified, Asp.Net Core Demystified - Razor Pages
Asp.Net Core MVC Pipeline, View Layout
Configure Asp.Net Core services, Configure to use static files
Use Dependency Injection in Asp.Net Core, Dependency Injection Demystified, Dependency injection in Asp.Net Core
Dependency Injection Best Practices,
Building things Build a CRUD App with Web API and Angular
Asp.Net Core Arch, Asp.Net Core Hidden Gems - Scott Hanselman
HttpContext, HttpRequest Class, HttpResponse Class
REST Client, HttpClient Class
file upload and download, File Uploads in Asp.Net Core

Content

This lecture focuses on building views with Razor pages.
  1. Syllabus describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Projects: Final Project #1, Final Project #2, Final Project #3
    You will do one of these - the choice of which is yours to make - and present on the last day of classes.
    Additional Requirements
    You are expressly requested to refrain from using site editors like Wix, web.com, or other web designers. You may use any of the facilities of Visual Studio or any other text editor of your choice. This same rule applies to your lab submissions as well. For your Final Project demos you will be required to use only page links for navigation. You may host and demonstrate your labs in the built-in Visual Studio web server.
    All projects must use:
    • Asp.net core MVC - main site
    • Asp.net Web API - web service
    • Web API Client
    • SQL db storage
    • At least one static page that uses new features of HTML5, CSS3, and JavaScript6.
  3. Recommended Texts: Asp.Net Core 2.0 MVC & Razor Pages
    C# 7.0 in a Nutshell: The Definitive Reference
  4. Asp.Net Core
    Definition
    Asp.Net is a platform for delivering web content. Asp.Net applications respond to requests by dynamically assembling web pages from control models and data, often from a database. Asp.Net was originally a Windows only platform. Asp.Net Core extends that to Linux and Mac platforms as well.
    The Model-View-Controller (MVC) architecture has three major part types:
    Views display information to the user and transmit user actions back to a controller. Controller instances are created for each request. They coordinate responses to the request by collecting data from the model and assembling it into a view for the response. Models manage data and often provide application logic to simplify controller operations.
    Books Asp.Net Core Book - gitbooks
    Tutorials Introduction to Asp.Net Core - MSDN, Razor Pages Tutorial - MSDN
    Asp.Net Core - Dependency Injection - tutorialsteacher.com
    References .Net Core Guide, Asp.Net Core Documentation - MSDN
    Using .Net Core in Visual Studio Code
    Razor syntax reference - MSDN, Create Razor Pages application
    App startup, Static files in Asp.Net Core
    File Uploads in Asp.Net Core
    Understanding Asp.Net Core demystified, Asp.Net Core Demystified - Razor Pages
    Asp.Net Core MVC Pipeline, View Layout
    Configure Asp.Net Core services, Configure to use static files
    Use Dependency Injection in Asp.Net Core, Dependency Injection Demystified, Dependency injection in Asp.Net Core
    Dependency Injection Best Practices,
    Building things Build a CRUD App with Web API and Angular
    Asp.Net Core Arch, Asp.Net Core Hidden Gems - Scott Hanselman
    HttpContext, HttpRequest Class, HttpResponse Class
    REST Client, HttpClient Class
    file upload and download, File Uploads in Asp.Net Core
  5. Asp.Net Core MVC Presentation, pptx
  6. Asp.Net MVC Conventions, pptx
  7. Code Examples: Web to Mvc Mvc Skeleton with CRUD Mvc Skeleton with Entity Framework CRUD
  8. Asp.Net MVC 5 Tutorials: Scott Guthrie's First Tutorial, Scott Guthrie's Nerd Dinner Tutorial
    Quick explaination of MVC architecture
    Fairly brief, but good example application
  9. More Advanced Asp.Net MVC 5 Tutorials: MSDN Asp.Net Tutorials, File Upload in MVC, Some Best MVC Practices, jquery Grid, Model Binding - Good tutorial
  10. Lab #7