MVC 4.0, Part 02 of 11: Controllers
Interactive

MVC 4.0, Part 02 of 11: Controllers

LearnNow Online
Updated Aug 22, 2018

Course description

The engine that drives powerful web applications is the Controller. This one object is responsible for creating the page that goes to the user and supplying it with all the data it needs. This course will show you how to create a controller and how they work. Then you will learn about Actions of the controller then the how Action Inputs do their job. To close this course you will see Action Results and how it can be used to interface with the end user.

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

76 Minutes

Time to complete

286 Minutes

Course Outline

Controllers

What is the Controller (16:08)

  • Introduction (00:18)
  • What is the Controller (00:43)
  • Using Controllers (01:11)
  • The IController Interface (00:32)
  • Demo: IController Interface (04:42)
  • The ControllerBase Class (00:57)
  • The Controller Class (00:49)
  • Demo: Controller Class (04:37)
  • Request Processing Pipeline (01:56)
  • Summary (00:18)

Actions (20:45)

  • Introduction (00:18)
  • Choosing the Right Actions (01:21)
  • ActionName Attribute (02:15)
  • Demo: ActionName Attribute (03:27)
  • Demo: Implementing ActionName (02:08)
  • ActionMethodSelector Attribute (01:10)
  • Demo: ActionMethodSelector (04:19)
  • The Final Selection (01:34)
  • Demo: HandleUnknownAction (03:57)
  • Summary (00:12)

Action Inputs (21:35)

  • Introduction (00:20)
  • Action Method Inputs (00:51)
  • Context Object Input (02:00)
  • Demo: Context Object Inputs (04:18)
  • Parameters (01:14)
  • Demo: Parameters (04:20)
  • Model Bindings (01:30)
  • Demo: Model Bindings (02:31)
  • Demo: Editing Model Data (04:14)
  • Summary (00:12)

Action Results (17:35)

  • Introduction (00:18)
  • Results (01:03)
  • ViewResult (01:45)
  • Demo: ViewResults (04:15)
  • ContentResult (00:30)
  • Demo: ContentResult (03:28)
  • Implicit Action Results (01:15)
  • HttpNotFoundResult (00:55)
  • HttpStatusCodeResult (01:24)
  • Demo: HttpStatusCodeResult (02:22)
  • Summary (00:16)