Software Architecture by Example: Using C# and .NET 1st Edition Paul Michaels 2024 scribd download
Software Architecture by Example: Using C# and .NET 1st Edition Paul Michaels 2024 scribd download
com
https://ebookmeta.com/product/software-architecture-by-
example-using-c-and-net-1st-edition-paul-michaels/
OR CLICK HERE
DOWLOAD NOW
Paul Michaels
Foreword by Mark Richards
Software Architecture by Example: Using C# and .NET
Paul Michaels
Derbyshire, UK
Introduction�����������������������������������������������������������������������������������������������������������xvii
Foreword����������������������������������������������������������������������������������������������������������������xxi
v
Table of Contents
Examples������������������������������������������������������������������������������������������������������������������������������������ 21
External APIs�������������������������������������������������������������������������������������������������������������������������� 21
Getting Ticket Availability������������������������������������������������������������������������������������������������������ 21
Ordering a Ticket������������������������������������������������������������������������������������������������������������������� 25
Summary������������������������������������������������������������������������������������������������������������������������������������ 29
vi
Table of Contents
Advanced Purchase��������������������������������������������������������������������������������������������������������������� 76
Business Decision����������������������������������������������������������������������������������������������������������������� 76
Target Architecture���������������������������������������������������������������������������������������������������������������������� 77
Stateful Service��������������������������������������������������������������������������������������������������������������������� 79
Distributed Service���������������������������������������������������������������������������������������������������������������� 79
Target Architecture Diagram�������������������������������������������������������������������������������������������������� 79
Examples������������������������������������������������������������������������������������������������������������������������������������ 80
Project Structure������������������������������������������������������������������������������������������������������������������� 80
Service Bus Configuration����������������������������������������������������������������������������������������������������� 82
Coordinator���������������������������������������������������������������������������������������������������������������������������� 85
Summary������������������������������������������������������������������������������������������������������������������������������������ 90
vii
Table of Contents
viii
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 205
ix
About the Author
Paul Michaels is the Head of Development at musicMagpie.
He started his career as a professional software engineer
in 1997. Paul is a regular speaker, published author, and
Microsoft MVP. He enjoys programming, playing with new
technology, and finding neat solutions to problems. When
he’s not working, you can find him cycling or walking around
the Peak District, playing table tennis, or trying to cook for
his wife and two children. You can follow him on Twitter at
@paul_michaels or find him on LinkedIn. He also writes a
blog at http://pmichaels.net.
xi
About the Technical Reviewer
Kasam Shaikh is an Azure AI enthusiast, published author,
global speaker, community MVP, and Microsoft Docs
contributor. He has more than 14 years of experience in
the IT industry and is a regular speaker at various meetups,
online communities, and international conferences on Azure
and AI. He is currently working as Senior Cloud Architect for
a multinational firm where he leads multiple programs in the
Practice for Microsoft Cloud Platform and Low Code. He is
also a founder of the community named Dear Azure-Azure
INDIA (az-India) and leads the community for learning
Microsoft Azure. He owns a YouTube channel and website
and shares his experiences over his website
(www.kasamshaikh.com).
xiii
Acknowledgments
For this book, I have an absolute phone book of people to thank for their help.
Firstly, I have to thank my daughter, Abi, for all the artwork in the book.
Special thanks to Ash Burgess and Kevin Smith for putting up with impromptu
requests for a discussion or a review of an idea, and for Kev’s painstaking and repeated
explanations of event sourcing.
Thanks to Ian Curtis for reviewing my architectural diagram, and to James Little for
making me think so hard about architecture that a book seemed a good idea.
The travel industry is very complex, and I don’t think I could have landed in a better
place, where I had the expertise and advice of both David Hilton and Jagdip Ajimal.
When it came to containers, I found that what I was trying to do kept throwing up
roadblocks until Rob Richardson generously offered his time and expertise.
The examples in this book are based on my time working across industries and trying
to solve problems. I’ve been fortunate in my career to work with a number of very clever
and talented people. There are probably too many of these to mention, and while they
may not have directly helped with this book, I’d like to acknowledge their contribution.
Finally, I’d like to thank the team at Apress – especially Shrikant for dealing with the
various twists and turns that the book, and my life, has taken during its creation, and
Smriti for bringing me onto Apress in the first place.
xv
Introduction
All the code in this book is available from the following GitHub repo:
https://github.com/Apress/software-architecture-by-example
Should you choose to follow along and create the solution for each chapter, it may be
helpful to have a clone of the code available for reference.
T echnology
Let’s quickly discuss the specific technologies that we’re going to choose and why.
Firstly, I will use Visual Studio to write all of the code samples in this book. You can
download the community edition of this here:
https://visualstudio.microsoft.com/vs/community/
You may also wish to use VS Code, which can be found here:
https://code.visualstudio.com/download
All of the applications that we create will be in .Net and written in C#. This choice
I made simply because it’s the language that I’m most familiar with; however, I don’t
believe there’s anything in here that couldn’t be translated to any other modern OO
development language; after all, architecture should be language agnostic. Most of the
principles are broader than a specific language and could apply to any language capable
of making HTTP calls.
xvii
Introduction
S
etup
In this section, we’ll cover the basic setup that you’ll need to follow along with the code
samples. However, since this is predominantly a book on architecture, you should be
able to translate the concepts to any language.
Let’s cover a basic setup for those readers that wish to follow along.
T erminal
If you choose to use VS Code, you have a terminal built in; however, there are other
options.
Since you’re likely to be using Git, you can easily use git bash for the terminal
commands; you can download git for windows here:
https://gitforwindows.org/
Another possibility if you’re on Windows is the new (at least at the time of writing)
Microsoft Terminal. This can be found here:
https://aka.ms/terminal
Note This is, in fact, an open source product; you can find the source code for
it here:
https://github.com/Microsoft/Terminal
E xamples
The title of this book is Software Architecture by Example, so it will not surprise you to
learn that there are examples in each chapter. The purpose is to propose a problem,
suggest one or more solutions, and provide an example of how that solution might work
in reality.
What this doesn’t mean is that contained within the pages of this book are full,
complete, solutions to each problem. To illustrate my point by example, for the first
chapter, we address the problem of a business that sells tickets for concerts and festivals.
xviii
Introduction
In that chapter, there are code samples that will compile and run, but those samples are
for illustration purposes; there’s no website there, but I’ve made sure that each element
of the system is there by proxy – so the website will be simulated by a console app.
https://github.com/Apress/software-architecture-by-example
You can choose to follow along and recreate the examples, or you can clone the
repo and simply view the code, or you may decide that you’re not interested in a specific
implementation, in which case, you can simply skip the examples altogether.
xix
Another Random Document on
Scribd Without Any Related Topics
THE KISS REFUSED.
FOOTNOTES:
[11] I.e. made with the two first fingers and thumb, the sign of
the Russian cross.
POPULAR SONG.
THE GIPSY MAID.
Chorus.
Chorus.
Chorus.
Chorus.
Who can tell! He still is far off;
Plunged in cloud the moonbeams sweep,
While afar on distant moorland
Little bells are lulled to sleep.
Chorus.
FOOTNOTES:
[12] Sledge or car with three horses harnessed abreast.
FROM LEBEDEF.
THEODORA.