Skip to content

Latest commit

 

History

History
148 lines (92 loc) · 7.74 KB

File metadata and controls

148 lines (92 loc) · 7.74 KB

Get this product for $5

Packt is having its biggest sale of the year. Get this eBook or any other book, video, or course that you like just for $5 each

Buy now

Buy similar titles for just $5

An Atypical ASP.NET Core 6 Design Patterns Guide, Second Edition

An Atypical ASP.NET Core 5 Design Patterns Guide

This is the code repository for An Atypical ASP.NET Core 6 Design Patterns Guide, published by Packt.

A SOLID adventure into architectural principles and design patterns using .NET 6 and C# 10

What is this book about?

Thoroughly updated for ASP.NET Core 6, with further coverage of microservices, data contracts, and event-driven architecture, this book gives you the tools to build and glue reliable components together to improve your programmatic masterpiece.

This book covers the following exciting features:

  • Apply the SOLID principles for building flexible and maintainable software
  • Get to grasp .NET dependency Injection
  • Work with GoF design patterns such as strategy, decorator, façade, and composite
  • Explore the MVC patterns for designing web APIs and web applications using Razor
  • Discover layering techniques and tenets of clean architecture
  • Become familiar with CQRS and vertical slice architecture as an alternate to layering
  • Understand microservices and when they can benefit your applications
  • Build an ASP.NET user interfaces from server-side to client-side Blazor

If you feel this book is for you, get your copy today!

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

public class InlineDataTest
{
    [Theory]
    [InlineData(1, 1)]
    [InlineData(2, 2)]
    [InlineData(5, 5)]
    public void Should_be_equal(int value1, int value2)
    {
        Assert.Equal(value1, value2);
    }
}

Following is what you need for this book:

This design patterns book is for beginners as well as intermediate-level software and web developers with some knowledge of .NET who want to write flexible, maintainable, and robust code for building scalable web applications. Knowledge of C# programming and an understanding of web concepts like HTTP is necessary.

With the following software and hardware list you can run all code files present in the book (Chapter 1-18).

Software and Hardware List

Chapter Software required OS required
1-18 .NET 6 Windows, Mac OS X, and Linux (Any)
1-18 ASP.NET Core 6 Windows, Mac OS X, and Linux (Any)
1-18 C# 10 Windows, Mac OS X, and Linux (Any)
1-18 xUnit Windows, Mac OS X, and Linux (Any)
1-18 Multiple other .NET open source libraries Windows, Mac OS X, and Linux (Any)

Introduction

This repository contains the code of An Atypical ASP.NET Core 6 Design Patterns Guide. It also contains pointers to help you find your way around the repository. This repo is also there to rectify any mistake that could have been made in the book and missed during reviews.

Please open an issue if you find something missing from the instructions below or the book's instructions.

UML Diagrams

In the book, we have UML Class diagrams, UML Sequence Diagrams, and some non-UML diagrams. We assumed that most-developers would know about UML, so we decided not to add pages about it.

The author used diagrams.net (draw.io) to draw the diagrams (which is free and open-source).

The following two articles should help you get started if you don't know UML:

Getting Started

  1. You need a copy of An Atypical ASP.NET Core 6 Design Patterns Guide to make sense of the code projects as many projects start with bad code and get refactored into better ones.

  2. You need an IDE/Text Editor like Visual Studio or Visual Studio Code, but you could do without (not recommended).

  3. You need .NET 6 SDK. If you installed Visual Studio, you should be fine. Otherwise, here is the link:

With that in place, you should be good to go!

Build and Test

All projects and solutions can be built using the .NET CLI or Visual Studio. You can find the most useful commands in the introduction chapter, under Running and building your program or online.

The two commands that you will need are:

  • dotnet build to build a project or solution
  • dotnet test to run a test project or all tests of all test projects of a solution.

Content/Code

Throughout the book, there are many projects, and many are copies with a little update done to them, so they may look a lot alike. Here, we will build a list that maps harder to find code to its file or directory in the Git repository. If you find something missing, erroneous, or hard to find, please open an issue and let us know.

Contribute

Please open an issue if you find some missing docs, errors in the source code, or a divergence between the book and the source code.

For more information, check out the Code of conduct.

Related products

  • C# 10 and .NET 6 – Modern Cross-Platform Development, Sixth Edition [Packt] [Amazon]

  • Software Architecture with C# 10 and .NET 6, Third Edition [Packt] [Amazon]

Get to Know the Author

Carl-Hugo Marcotte has been developing, designing, and architecting web applications professionally since 2005, wrote his first line of code at about eight years old, and holds a bachelor's degree in computer science. After working at a firm for a few years, he became an independent consultant, where he developed projects of different sizes for SMEs and educational institutions. He is now a Senior Solutions Architect at Export Development Canada and is passionate about software architecture, C#, ASP.NET Core, and the Cloud. He loves to share his knowledge, which led him to teaching programming, blogging, and creating, maintaining and contributing to multiple open-source projects.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781803249841