This class will introduce you to the key technologies available on the .NET platform to design and build end to end solutions. The course will open your eyes to a variety of different technologies to solve your architectural needs, while discussing the pros and cons for each. This is not intended to be a recipe but a critical look at various technologies and how you may construct your own recipe for your next project.
Key Learning Areas
- Design Patterns
- Distributed Components
- Modern UI Development
ASP.NET Core 6.0 Web API
This module introduces Web API, the de facto framework for building HTTP-based RESTful services. It covers the motivation for HTTP oriented services as an alternative to SOAP-based services. The architecture of an ASP.NET Core 6.0 Web API application is examined, including convention and attribute-based routing.
- REST Basics
- Web API controllers
- Web API routing
- CRUD operations
Tightly coupled systems are less flexible because they make it difficult to swap out components should they become outdated or need to be replaced. In addition, the code becomes less testable, because unit tests are unable to replace dependencies with fakes, turning unit tests into integration tests, which are slower and prone to breakage. This module addresses these issues through the ASP.NET Core 6.0 built-in dependency injection container.
- Dependency Injection in ASP.NET Core 6.0
- Constructor and method injection
- Lifetime models: singleton vs. transient vs. scoped
- Creating services and injecting them into a web application
Testing is a critical aspect of the software development process, and xUnit is the de facto testing framework for .NET 6.0. This module starts with the definition, best practices, naming conventions, and techniques for unit tests. It then covers the basics of xUnit, highlighting the differences between Fact vs. Theory. The module concludes with a demonstration of how to unit test the methods of an ASP.NET Core 6.0 controller using manually mocked data.
- Unit testing fundamentals
- Using xUnit with Visual Studio
- Testing code that generates exceptions
- Testing an ASP.NET Core 6.0 Controller with manual mocking
Mocking with Moq
Test doubles and mocking frameworks make it easier to stub out external dependencies. Moq has emerged as the de facto standard mocking framework for .NET 6.0, and this module covers the details of how to use it to mock interfaces, objects, classes, methods, and properties.
- State vs Behavior verification
- The different forms of Test Doubles
- Moq as an example of a mocking framework
- Stubs: Properties and Methods
- Mocks: Strict, Loose and Partial
Unit Testing a Web API Controller using xUnit and Moq
This section represents the culmination of all the material covered in this course. It shows how to use the techniques previously presented to complete the production of a scalable Web API server that is unit testable and follows modern best practices. It looks at how to use Dependency Injection and the Repository Pattern for writing controllers that are easier to test, as well as how to use Moq to make it easier to stub out external dependencies.
- Unit test the methods of an ASP.NET Core 6.0 Web API Controller using xUnit and Moq
Essential Design Patterns
This module covers some of the essential software design patterns.
- Learning the key design patterns you can't live with out
- Understand the full benefits of Design Patterns
- Learn the essential design patterns
- Learn how to use design patterns to simplify your architecture
- Learn how to use patterns to make your architecture testable
How to use threads effectively to build responsive client apps, scalable server apps, and how to improve the performance of these apps by effectively leveraging the computer's CPUs.
- How to create units of work to in run in parallel
- Efficient use of threads with asynchronous IO
- Using threads with UI technology to maintain a fluid user experience
- Safe concurrency
- Scaling compute
Client-Side Development with React
React has emerged as one of the de facto standards for client-side development. This section demonstrates how to use React to create interactive UIs.
- Introduction to React
- React Routing
- NET Core programming experience
- C# programming experience