Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Software Architecture with C# 12 and .NET 8 - Fourth Edition

You're reading from  Software Architecture with C# 12 and .NET 8 - Fourth Edition

Product type Book
Published in Feb 2024
Publisher Packt
ISBN-13 9781805127659
Pages 756 pages
Edition 4th Edition
Languages
Authors (2):
Gabriel Baptista Gabriel Baptista
Profile icon Gabriel Baptista
Francesco Abbruzzese Francesco Abbruzzese
Profile icon Francesco Abbruzzese
View More author details

Table of Contents (26) Chapters

Preface 1. Understanding the Importance of Software Architecture 2. Non-Functional Requirements 3. Managing Requirements 4. Best Practices in Coding C# 12 5. Implementing Code Reusability in C# 12 6. Design Patterns and .NET 8 Implementation 7. Understanding the Different Domains in Software Solutions 8. Understanding DevOps Principles and CI/CD 9. Testing Your Enterprise Application 10. Deciding on the Best Cloud-Based Solution 11. Applying a Microservice Architecture to Your Enterprise Application 12. Choosing Your Data Storage in the Cloud 13. Interacting with Data in C# – Entity Framework Core 14. Implementing Microservices with .NET 15. Applying Service-Oriented Architectures with .NET 16. Working with Serverless – Azure Functions 17. Presenting ASP.NET Core 18. Implementing Frontend Microservices with ASP.NET Core 19. Client Frameworks: Blazor 20. Kubernetes 21. Case Study 22. Case Study Extension: Developing .NET Microservices for Kubernetes 23. Answers
24. Other Books You May Enjoy
25. Index

Understanding the Different Domains in Software Solutions

This chapter is dedicated to a modern software development technique called domain-driven design (DDD), which was first proposed by Eric Evans (see Domain-Driven Design: https://www.amazon.com/exec/obidos/ASIN/0321125215/domainlanguag-20). While DDD has existed for more than 15 years, it has achieved great success in the last few years because of its ability to cope with two important problems.

The main problem is modeling complex systems that involve several domains of knowledge. No single expert has in-depth knowledge of the whole domain; this knowledge is instead split among several people. The second problem is that each expert speaks a language that is specific to his domain of expertise, so for effective communication between the experts and the development team, objects, interfaces, and methods must mimic the language of the domain experts. This means that the different modules that compose an application must use...

Before you begin: join our book community on Discord

Give your feedback straight to the authors themselves and chat to other early readers on our Discord server (find the "software-architecture-csharp-12-dotnet-8" channel under EARLY ACCESS SUBSCRIPTION).

https://packt.link/EarlyAccess

Qr code Description automatically generated

Design patterns can be defined as ready-to-use architectural solutions for common problems you encounter during software development. They are essential for understanding the .NET architecture and useful for solving ordinary problems that we face when designing any piece of software. In this chapter, we will look at the implementation of some design patterns. It is worth mentioning that this book does not explain all the known patterns we can use. The focus here is to explain the importance of studying and applying them.In this chapter, we will cover the following topics:

  • Understanding design patterns and their purpose
  • Learning some design patterns that can be observed in .NET

By the end of...

Technical requirements

To complete this chapter, you will need the free Visual Studio 2022 Community Edition or better.You can find the sample code for this chapter at https://github.com/PacktPublishing/Software-Architecture-with-.NET-8-4E.

Understanding design patterns and their purpose

Deciding on the design of a system is challenging, and the responsibility associated with this task is enormous. As software architects, we must always keep in mind that features such as great reusability, good performance, and good maintainability are important for delivering a good solution. This is where design patterns help and accelerate the design process.As we mentioned previously, design patterns are solutions that have already been discussed and defined so that they can solve common software architectural problems. This approach grew in popularity after the release of the book Design Patterns – Elements of Reusable Object-Oriented Software, where the Gang of Four (GoF) divided these patterns into three types: creational, structural, and behavioral.A little bit later, Uncle Bob introduced the SOLID principles to the developer community, giving us the opportunity to efficaciously organize the functions...

6 Design Patterns and .NET 8 Implementation

Before you begin: join our book community on Discord

Give your feedback straight to the authors themselves and chat to other early readers on our Discord server (find the "software-architecture-csharp-12-dotnet-8" channel under EARLY ACCESS SUBSCRIPTION).

https://packt.link/EarlyAccess

Qr code Description automatically generated

Design patterns can be defined as ready-to-use architectural solutions for common problems you encounter during software development. They are essential for understanding the .NET architecture and useful for solving ordinary problems that we face when designing any piece of software. In this chapter, we will look at the implementation of some design patterns. It is worth mentioning that this book does not explain all the known patterns we can use. The focus here is to explain the importance of studying and applying them.In this chapter, we will cover the following topics:

  • Understanding design patterns and their purpose
  • Learning some design patterns...

Summary

In this chapter, we understood why design patterns help with the maintainability and reusability of the parts of the system you are building. We also looked at some typical use cases and code snippets that you can use in your projects. Finally, we presented .NET Generic Host, which is a good example of how .NET uses design patterns to enable code reusability and enforce best practices.All this content will help you while architecting new software or even maintaining an existing one, since design patterns are already-known solutions for some real-life problems in software development.In Chapter 7Understanding the Different Domains in Software Solutions, we will cover the domain-driven design approach. We will also learn how to use the SOLID design principles so that we can map different domains to our software solutions.

Questions

  1. What are design patterns?
  2. What is the difference between design patterns and design principles?
  3. When is it a good idea to implement the Builder pattern?
  4. When is it a good idea to implement the Factory pattern?
  5. When is it a good idea to implement the Singleton pattern?
  6. When is it a good idea to implement the Proxy pattern?
  7. When is it a good idea to implement the Command pattern?
  8. When is it a good idea to implement the Publisher/Subscriber pattern?
  9. When is it a good idea to implement the Dependency Injection pattern?

Further reading

The following are some books and websites where you can find out more regarding what was covered in this chapter:

lock icon The rest of the chapter is locked
You have been reading a chapter from
Software Architecture with C# 12 and .NET 8 - Fourth Edition
Published in: Feb 2024 Publisher: Packt ISBN-13: 9781805127659
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}