Beginning ASP.NET MVC 5 with Test Driven Development
Denna kurs ger din ASP.NET MVC 5 utveckling en god start i rätt riktning! Den plockar ut och förklarar vad du behöver känna till för att använda ramverket effektivt och utveckla testbara lösningar. Medan kursen har fokus på praktiska färdigheter, tas också tid att förklara viktiga begrepp, inklusive hur HTTP fungerar, MVC-designmönstret, TDD-arbetsflödet och dependency inversion.
Utbildningsformer
Classroom
Längd
3 dagar
Pris
26950 kr
Målgrupp
- You are already reasonably comfortable with programming in C# and on the .Net platform.
- You have some awareness of HTML and CSS, and maybe a little JavaScript exposure too.
- However, you have little or no experience with ASP.NET MVC, and want to dive in and learn the things you need to know to use it effectively. Experience with NUnit or TDD is not required; the basic techniques will be introduced during the course.
Förkunskaper
You are already reasonably comfortable with programming in C# and on the .Net platform.
Kursinnehåll
Dag 1
Web and MVC Fundamentals
- How the web works: HTTP, servers, clients, statelessness
- A little history: ASP Classic, ASP.NET WebForms, other approaches
- The MVC pattern: models, views and controllers
Hello World
- Creating an ASP.NET MVC web application
- Our first controller and view
- Adding a basic model
- Convention over configuration
Testing Fundementals
- What is Test Driven Development?
- Introduction to NUnit
- Writing our first controller test
Routes
- The relationship between routes and controllers
- Adding more routes
- Routes and linking
- Examining the request lifecycle
Better Testing with Dependency Inversion
- What is DI, and why does it matter?
- Refactoring towards DI
- Testing using hand-crafted stub objects
- Introduction to StructureMap
- Integrating StructureMap with ASP.NET MVC
Dag 2
The Razor View Engine
- The Razor approach
- Loops and conditionals
- Built-in helpers
- Creating your own helpers
- Layouts
- Partial views
- What NOT to do in a view
Introducing Forms
- Adding a form and posting to a controller
- FormCollection - often a last resort
- Parameter binding
- Model binding
- Forms and testing
Linking to a Database
- A short introduction to Entity Framework
- Entities as the model
- Testable approaches to data access
- MVC with CQRS architectures
- Scaffolding
Validation
- Client-side vs. server-side validation
- Validation annotations
- Custom validation
- Validation and testing
Dag 3
JavaScript and Ajax Basics
- What is Ajax?
- Introducing jQuery
- The Ajax helper for partial page updates
- Unobtrusive JavaScript
Web API
- Introduction to JSON
- What is a RESTful service?
- Writing API controllers
- Understanding HTTP verb to method conventions
- Calling services from JavaScript
- Testing Web APIs
Security
- The web is a dangerous place
- XSS
- Direct Object References
- CSRF
- Authentication
- Authorization