Real-World Web Development with .NET 9: Build websites and services using mature and proven ASP.NET Core MVC, Web API, and Umbraco CMS

Real-World Web Development with .NET 9: Build websites and services using mature and proven ASP.NET Core MVC, Web API, and Umbraco CMS

Real-World Web Development with .NET 9: Build websites and services using mature and proven ASP.NET Core MVC, Web API, and Umbraco CMS
Автор: Price Mark J.
Дата выхода: 2024
Издательство: Packt Publishing Limited
Количество страниц: 579
Размер файла: 5.6 MB
Тип файла: PDF
Добавил: Федоров_АИ
 Проверить на вирусы

Contents

Introduction

Section 1: Auditing

What's Covered?

Planning Your Auditing Strategy

Getting Into the Right Mindset

Recording Your Findings

Automated Tooling

PHP Insights

Enlightn

Larastan

Style CI

Code Coverage

Manual Auditing

Investigating "raw" Database Queries

Finding Incorrect Authorisation

Checking Validation

Finding "Fake Facades"

Finding Business Logic in Helpers

Finding N+1 Queries

Finding Controllers That Use Other Controllers

Finding Logic and Queries in Blade Views

Finding Hard-Coded Credentials

Check Open Package Routes

Reviewing Project Documentation

Section 2: Testing

What's Covered?

Planning Your Testing Strategy

The Benefits of Writing Tests

Spotting Bugs Early

Making Future Work and Refactoring Easier

Changing the Way You Approach Writing Code

Tests-As-Documentation

Prove That Bugs Exist

Structuring Your Tests

Directory Structure

Choosing What To Test

Test Structure

Data Providers

Writing the Tests

Prioritising Mission-Critical Tests First

Writing the Rest of the Tests

Benefits of Writing the Easy Tests First

Preventing Test Fatigue

Testing Your UI with Laravel Dusk

Installation

Testing a Simple Form

Dusk Pages and Selectors

Running Failed Tests and Groups

Creating a CI Workflow Using GitHub Actions

Using an .env.ci File

Running the Test Suite

Larastan

Laravel Dusk

Output

Section 3: Fixing

What's Covered?

Planning Your Fixing Strategy

Using an Error Reporting System

Types of Errors

The Benefits of an Automated Error Reporting System

Error Reporting Using Flare

Uptime Checking, Queue Monitoring, and Scheduler Monitoring

Uptime Monitoring with Oh Dear

Scheduler Monitoring with Oh Dear

Queue Monitoring with Oh Dear

Updating PHP, Laravel, and Packages

Upgrading in Small Increments

Automating the Upgrade Using Laravel Shift

Planning Upgrades Early

Using a Suitable Local Development Environment

Using Tests to Fix Bugs

What is Test-Driven Development?

The Advantages of Test-Driven Development

The Disadvantages of Test-Driven Development

Fixing a Real Bug Using Test-Driven Development

Safely Removing Dead Code

Checking the Version Control History

Scream Test

Logging or Reporting the Usage

Removing the Code with an Atomic Commit

Section 4: Improving

What's Covered?

Planning Your Improvement Strategy

Making the Most of PHP's Type System

Using Type Hints and Return Types

Union Types

Type Hints and Return Types in Closures

DRYing Up Your Code

Advantages of DRYing Up Your Code

When to DRY Up Your Code

Refactoring Conditions

Reducing Indented Code

Replacing if and elseif with match

Using the Nullsafe Operator

Using Database Transactions

Adding the Database Transactions

Manually Using Database Transactions

Tips for Interacting with Third-Party Services

Using Automatic or Manual Transactions

Dispatching Queued Jobs inside Database Transactions

Improving the Testability of Your Code

Using Objects Over Arrays

Final Words

Discount Codes

Flare

Oh Dear

StyleCI

Laravel Security In Depth

Key Features

  • Master ASP.NET Core MVC, Web API, and OData for building robust web services.
  • Get hands-on experience with web testing, security, and containerization techniques.
  • Learn how to implement Umbraco CMS for content management websites.

Book Description

Real-World Web Development with .NET 9 equips you to build professional websites and services using proven technologies like ASP.NET Core MVC, Web API, and OData—trusted by organizations for delivering robust web applications.
You’ll learn to design and build efficient web applications with ASP.NET Core MVC, creating well-structured, maintainable code that follows industry best practices. From there, you’ll focus on Web API, building RESTful services that are both secure and scalable. Along the way, you’ll also explore testing, authentication, and containerization for deployment, ensuring that your solutions are fully production ready.
In the final part of the book, you will be introduced to Umbraco CMS, a popular content management system for .NET. By mastering this tool, you’ll learn how to empower users to manage website content independently.
By the end of this book, you'll not only have a solid grasp of controller-based development but also the practical know-how to build dynamic, content-driven websites using a popular .NET CMS.

What you will learn

  • Build web applications using ASP.NET Core MVC with well-structured, maintainable code
  • Develop secure and scalable RESTful services using Web API and OData
  • Implement authentication and authorization for your applications
  • Test and containerize your .NET projects for smooth deployment
  • Optimize application performance with caching and other techniques
  • Learn how to use and implement Umbraco CMS

Who this book is for

This book is aimed at intermediate .NET developers with a good understanding of C# and .NET fundamentals. It is ideal for developers looking to expand their skills in building professional, controller-based web applications.


Похожее:

Список отзывов:

Нет отзывов к книге.