MVC 4.0, Part 03 of 11: Views and Models
Interactive

MVC 4.0, Part 03 of 11: Views and Models

LearnNow Online
Updated Aug 22, 2018

Course description

You don't have to be an artist to know that the way an application looks to a user is one of the most important things you can deliver. An application that is easy to use, performs quickly, and is easy to change can make or break you in the market or mean thousands of dollars of productivity gained or lost.This course will cover how Views can affect your application, and then you will see how Typed Views can bind to Models. Next you will be introduced to a view engine called Razor. To close the course you will see how to use Layouts to take advantage of the MVC framework’s features that allows you to reuse views and parts of views.

Each LearnNowOnline training course is made up of Modules (typically an hour in length). Within each module there are Topics (typically 15-30 minutes each) and Subtopics (typically 2-5 minutes each). There is a Post Exam for each Module that must be passed with a score of 70% or higher to successfully and fully complete the course.


Prerequisites

This course assumes that you are familiar and experienced with Microsoft’s .NET Framework and ASP.NET development tools. You should be familiar with Web development and understand how HTTP and HTML work to produce Web pages for the user. You should have strong experience with .NET Framework 4.0 or later programming. You should have experience with Visual Studio 2012. Experience with building database applications using these tools will be helpful, although not strictly necessary.


Meet the expert

Phil Ledgerwood

Philip Ledgerwood has been a software developer for fifteen years. He currently works primarily in .NET technologies producing custom software for organizations of all sizes. He has also done extensive training for those same organizations in both technical and business process topics. Philip is a strong advocate of Lean and agile software development and spends most of his time helping companies interested in the value those practices can bring to their development efforts. He does this through a combination of training and working "in the trenches" as a developer on these teams, keeping a hand in the academic side of emerging technology and practices while also directly applying it in real projects to bring real business value.

Video Runtime

111 Minutes

Time to complete

428 Minutes

Course Outline

Views

Views (13:37)

  • Introduction (00:22)
  • What a View Is (01:14)
  • Demo: Views (02:17)
  • Finding the Right View (01:37)
  • Demo: Assigning Views (02:56)
  • ViewData and ViewBag (01:43)
  • Demo: ViewData and ViewBag (03:11)
  • Summary (00:14)

Typed Views (20:58)

  • Introduction (00:22)
  • Typed Views (01:17)
  • Demo: Typed Views (04:19)
  • ViewModels (01:55)
  • Demo: Creating a ViewModel (01:54)
  • Demo: Using a ViewModel (04:27)
  • Scaffolding (01:12)
  • Demo: Adding a Scaffolded View (03:20)
  • Demo: Other Scaffolded Views (01:58)
  • Summary (00:11)

View Engines (18:06)

  • Introduction (00:22)
  • View Engines (03:20)
  • Code Nuggets (02:48)
  • Demo: Code Nuggets (02:34)
  • HTML Encoding (02:38)
  • Demo: HTML Encoding (02:30)
  • Code Blocks (01:38)
  • Demo: Code Blocks (01:58)
  • Summary (00:14)

Layouts (13:24)

  • Introduction (00:21)
  • Shared Layouts (01:57)
  • Demo: Shared Layouts (03:10)
  • Sections (01:44)
  • Demo: Sections (01:39)
  • Partial Views (02:17)
  • Demo: Partial Views (01:55)
  • Summary (00:17)
Models

What are Models (15:11)

  • Introduction (00:22)
  • What is a Model (02:34)
  • Demo: Models (02:27)
  • Demo: Model a Bookstore (01:20)
  • Demo: Model Class (03:39)
  • Demo: New Class (04:30)
  • Summary (00:16)

Scaffolding (11:14)

  • Introduction (00:23)
  • Crud (01:21)
  • Scaffolding (01:44)
  • Demo: Scaffolding (04:18)
  • Demo: Run Application (00:27)
  • Demo: Add Controller (02:04)
  • Demo: Rerun Application (00:39)
  • Summary (00:13)

Model Data (19:02)

  • Introduction (00:22)
  • Model Data (04:04)
  • Entity Framework (02:12)
  • Demo: Entity Framework (01:52)
  • Demo: Add Controller (00:55)
  • Demo: Data Context (03:57)
  • Demo: Run Application (01:19)
  • Demo: Adding More Controllers (01:20)
  • Demo: Build Application (02:37)
  • Summary (00:20)