An atypical ASP.NET core 6 design patterns guide : a solid adventure into architectural principles and design patterns using .NET 6 and C# 10 /
An Atypical ASP.NET Core 6 Design Patterns Guide, Second Edition approaches programming like playing with LEGO®: snapping small pieces together to create something beautiful. Thoroughly updated for ASP.NET Core 6, with further coverage of microservices patterns, data contracts, and event-driven arch...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Otros Autores: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham, [United Kingdom] :
Packt Publishing,
2022.
|
Edición: | Second edition. |
Colección: | Expert insight.
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Cover
- Copyright
- Contributors
- Table of Contents
- Preface
- Section 1: Principles and Methodologies
- Chapter 1: Introduction
- What is a design pattern?
- Anti-patterns and code smells
- Anti-patterns
- Anti-pattern
- God Class
- Code smells
- Code smell
- Control Freak
- Code smell
- Long Methods
- Understanding the web
- request/response
- Getting started with .NET
- .NET SDK versus runtime
- .NET 5+ versus .NET Standard
- Visual Studio Code versus Visual Studio versus the command-line interface
- An overview of project templates
- Running and building your program
- Technical requirements
- Summary
- Questions
- Further reading
- Chapter 2: Automated Testing
- An overview of automated testing
- Unit testing
- Integration testing
- End-to-end testing
- Other types of tests
- Picking the right test style
- Testing approaches
- Refactoring
- Technical debt
- Testing .NET applications
- Creating an xUnit test project
- Getting started with xUnit
- Facts
- Assertions
- Theories
- Closing words
- Arrange, Act, Assert
- Organizing your tests
- Unit tests
- Integration tests
- ASP.NET Core integration testing
- Classic web application
- Minimal hosting
- Important testing principles
- Summary
- Questions
- Further reading
- Chapter 3: Architectural Principles
- The SOLID principles
- Single responsibility principle (SRP)
- Project
- BookStore
- What is an interface?
- Open/Closed principle (OCP)
- Project
- IAttacker
- Liskov substitution principle (LSP)
- Project
- HallOfFame
- Conclusion
- Interface segregation principle (ISP)
- Project
- Ninja versus Pirate
- Project
- Bookstore update
- Conclusion
- Dependency inversion principle (DIP)
- Direct dependency
- Inverted dependency
- Inverting subsystems using DIP
- Project
- Dependency inversion
- Conclusion
- What's next?
- Other important principles
- Separation of concerns
- Don't repeat yourself (DRY)
- Keep it simple, stupid (KISS)
- Summary
- Questions
- Further reading
- Section 2: Designing for ASP.NET Core
- Chapter 4: The MVC Pattern Using Razor
- The Model View Controller design pattern
- Goal
- Design
- Anatomy of ASP.NET Core MVC
- Directory structure
- Controller
- Model
- View
- Default routing
- Conclusion
- The View Model design pattern
- Goal
- Design
- Project
- View models (a list of students)
- Conclusion
- Summary
- Questions
- Further reading
- Chapter 5: The MVC Pattern for Web APIs
- An overview of REST
- HTTP methods
- Status code
- HTTP headers
- Versioning
- Default versioning strategy
- Versioning strategy
- Wrapping up
- The Model View Controller design pattern
- Goal
- Design
- Anatomy of ASP.NET Core web APIs
- The entry point
- Directory structure
- Controller
- Returning values
- Attribute routing
- Conclusion
- The Data Transfer Object design pattern
- Goal
- Design
- Project
- DTO
- Conclusion