Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Title Page
Copyright and Credits
Hands-On Software Architecture with C# 8 and .NET Core 3
About Packt
Why subscribe?
Contributors
About the authors
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Code in Action
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Transforming Customer Needs in Real-World Applications
Understanding the Importance of Software Architecture
Technical requirements
What is software architecture?
Creating an Azure account
Software development process models
Reviewing traditional software development process models
Understanding the waterfall model principles
Analyzing the incremental model
Understanding agile software development process models
Getting into the Scrum model
Enabling aspects to be gathered to design high-quality software
Understanding the requirements gathering process
Practicing the elicitation of user needs
Analyzing requirements
Writing the specifications
Reviewing the specification
Using design thinking as a helpful tool
Understanding the principles of scalability, robustness, security, and performance
Some cases where the requirements gathering process impacted system results
Case 1 – my website is too slow to open that page!
Understanding caching
Applying asynchronous programming
Dealing with object allocation
Getting better database access
Case 2 – the user's needs are not properly implemented
Case 3 – the usability of the system does not meet user needs
Case study – detecting user needs
Book case study – introducing World Wild Travel Club
Book case study – understanding user needs and system requirements
Summary
Questions
Further reading
Functional and Nonfunctional Requirements
Technical requirements
How does scalability interact with Azure and .NET Core?
Creating a scalable web app in Azure
Vertical scaling (Scale up)
Horizontal scaling (Scale out)
Creating a scalable web app with .NET Core
Performance issues that need to be considered when programming in C#
String concatenation
Exceptions
Multithreading environments for better results – do's and don'ts
Usability – why inserting data takes too much time
Designing fast selection logic
Selecting from a huge amount of items
The fantastic world of interoperability with .NET Core
Creating a service in Linux
Book use case – understanding the main types of .NET Core projects
Summary
Questions
Further reading
Documenting Requirements with Azure DevOps
Technical requirements
Introducing Azure DevOps
Organizing your work using Azure DevOps
Azure DevOps repository
Package feeds
Test plans
Pipelines
Managing system requirements in Azure DevOps
Epics work items
Features work items
Product Backlog items/User Story work items
Book use case – presenting use cases in Azure DevOps
Summary
Questions
Further reading
Section 2: Architecting Software Solutions in a Cloud-Based Environment
Deciding the Best Cloud-Based Solution
Technical requirements
Different software deployment models
Infrastructure as a service and Azure opportunities
Security responsibility in IaaS
PaaS – a world of opportunities for developers
Web apps
Azure SQL Server
Azure Cognitive Services
SaaS – just sign in and get started!
Understanding what serverless means
Why are hybrid applications so useful in many cases?
Use case – a hybrid application
Book use case – which is the best cloud platform for this use case?
Summary
Questions
Further reading
Applying a Microservice Architecture to Your Enterprise Application
Technical requirements
What are microservices?
Microservices and the evolution of the concept of modules
Microservice design principles
Containers and Docker
When do microservices help?
Layered architectures and microservices
When is it worth considering microservice architectures?
How does .NET Core deal with microservices?
.NET Core communication facilities
Resilient task execution
Using generic hosts
Visual Studio support for Docker
Azure and Visual Studio support for microservice orchestration
Which tools are needed to manage microservices?
Defining your private Docker registry in Azure
Azure Service Fabric
Step 1: Basic information
Step 2: Cluster configuration
Step 3: Security configuration
Azure Kubernetes Service (AKS)
Use case – logging microservices
Ensuring message idempotency
The Interaction library
Implementing the receiving side of communication
Implementing service logic
Defining the microservice's host
Communicating with the service
Testing the application
Summary
Questions
Further reading
Interacting with Data in C# - Entity Framework Core
Technical requirements
Understanding ORM basics
Configuring Entity Framework Core
Defining DB entities
Defining the mapped collections
Completing the mapping configuration
Entity Framework Core migrations
Understanding stored procedures and direct SQL commands
Querying and updating data with Entity Framework Core
Returning data to the presentation layer
Issuing direct SQL commands
Handling transactions
Deploying your data layer
Understanding Entity Framework Core advanced feature – global filters
Summary
Questions
Further reading
How to Choose Your Data Storage in the Cloud
Technical requirements
Understanding the different repositories for different purposes
Relational databases
NoSQL databases
Redis
Disk memory
Choosing between structured or NoSQL storage
Azure Cosmos DB – an opportunity to manage a multi-continental database
Cosmos DB client
Cosmos DB Entity Framework Core provider
Use case – storing data
Implementing the destinations/packages database with Cosmos DB
Summary
Questions
Further reading
Working with Azure Functions
Technical requirements
Understanding the Azure Functions App
Consumption Plan
App Service Plan
Programming Azure Functions using C#
Listing Azure Functions templates
Maintaining Azure Functions
Use case – implementing Azure Functions to send emails
First Step – creating Azure Queue Storage
Summary
Questions
Further reading
Section 3: Applying Design Principles for Software Delivered in the 21st Century
Design Patterns and .NET Core Implementation
Technical requirements
Understanding design patterns and their purpose
Builder pattern
Factory pattern
Singleton pattern
Proxy pattern
Command pattern
Publisher/Subscriber pattern
Dependency Injection pattern
Understanding the available design patterns in .NET Core
Summary
Questions
Further reading
Understanding the Different Domains in Software Solutions
Technical requirements
What are software domains?
Understanding domain-driven design
Entities and value objects
Using SOLID principles to map your domains
Aggregates
The repository and Unit of Work patterns
DDD entities and Entity Framework Core
Command Query Responsibility Segregation (CQRS) pattern
Command handlers and domain events
Event sourcing
Use case – understanding the domains of the use case
Summary
Questions
Further reading
Implementing Code Reusability in C# 8
Technical requirements
Understanding the principles of code reusability
What is not code reuse?
What is code reuse?
Inserting reusability into your development cycle
Using .NET Standard for code reuse
Creating a .NET Standard library
How does C# deal with code reuse?
Object-oriented analysis
Generics
Use case – reusing code as a fast track to deliver good and safe software
Summary
Questions
Further reading
Applying Service-Oriented Architectures with .NET Core
Technical requirements
Understanding the principles of the SOA approach
SOAP web services
REST web services
The OpenAPI standard
REST services authorization and authentication
How does .NET Core deal with SOA?
A short introduction to ASP.NET Core
Implementing REST services with ASP.NET Core
ASP.NET Core service authorization
ASP.NET Core support for OpenAPI
.Net Core HTTP clients
Use case – exposing WWTravelClub packages
Summary
Questions
Further reading
Presenting ASP.NET Core MVC
Technical requirements
Understanding the presentation layers of web applications
Understanding the ASP.NET Core MVC structure
How ASP.NET Core pipeline works
Loading configuration data and using it with the options framework
Defining the ASP.NET Core MVC pipeline
Defining controllers and ViewModels
Understanding Razor Views
Learning Razor flow of control statements
Understanding Razor View properties
Using Razor tag helpers
Reusing view code
What is new in .NET Core 3.0 for ASP.NET Core?
Understanding the connection between ASP.NET Core MVC and design principles
Advantages of the ASP.NET Core pipeline
Server-side and client-side validation
ASP.NET Core globalization
The MVC pattern
Use case – implementing a web app in ASP.NET Core MVC
Defining application specifications
Defining the application architecture
Defining the domain layer
Defining the data layer
Defining the application layer
Controllers and views
Summary
Questions
Further reading
Section 4: Programming Solutions for an Unavoidable Future Evolution
Best Practices in Coding C# 8
Technical requirements
The more complex your code is, the worse a programmer you are
Maintainability index
Cyclomatic complexity
Depth of inheritance
Class coupling
Lines of code
Using a version control system
Dealing with version control systems in teams
Writing safe code in C#
try-catch
try-finally and using
The IDisposable interface
.NET Core tips and tricks for coding
WWTravelClub – dos and don'ts in writing code
Summary
Questions
Further reading
Testing Your Code with Unit Test Cases and TDD
Technical requirements
Understanding automated tests
Writing automated (unit and integration) tests
Writing acceptance and performance tests
Understanding test-driven development (TDD)
Defining C# test projects
Using the xUnit test framework
Advanced test preparation and tear-down scenarios
Mocking interfaces with Moq
Use case – automating unit tests in DevOps Azure
Summary
Questions
Further reading
Using Tools to Write Better Code
Technical requirements
Identifying a well-written code
Understanding and applying tools that can evaluate C# code
Applying extension tools to analyze code
Using Microsoft Code Analysis 2019
Applying SonarLint for Visual Studio 2019
Getting Code Cracker for Visual Studio 2017 as a helper to write better code
Checking the final code after analysis
Use case – evaluating the C# code before publishing the application
Summary
Questions
Further reading
Section 5: Delivering Software Continuously and at a High Quality Level
Deploying Your Application with Azure DevOps
Technical requirements
Understanding SaaS
Adapting your organization to a service scenario
Developing software in a service scenario
Technical implications of a service scenario
Adopting a SaaS solution
Preparing a solution for a service scenario
Use case – deploying our package-management application with Azure Pipelines
Creating the Azure Web App and the Azure database
Configuring your Visual Studio solution
Configuring Azure Pipelines
Adding a manual approval for the release
Creating a release
Summary
Questions
Further reading
Understanding DevOps Principles
Technical requirements
Describing DevOps
Understanding DevOps principles
Defining continuous integration
Understanding continuous delivery and multistage environment with Azure DevOps
Defining continuous feedback and the related DevOps tools
Monitoring you software with Application Insights
Using the Test and Feedback tool to enable feedback
The WWTravelClub project approach
Summary
Questions
Further Reading
Challenges of Applying CI Scenarios in DevOps
Technical requirements
Understanding CI
Understanding the risks and challenges when using CI
Disabling continuous production deployment
Incomplete features
Unstable solution for testing
Understanding the WWTravelClub project approach
Summary
Questions
Further reading
Automation for Software Testing
Technical requirements
Understanding the purpose of functional tests
Using unit testing tools to automate functional tests in C#
Testing the staging application
Testing a controlled application
Use case – automating functional tests
Summary
Questions
Further reading
Assessments
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Chapter 20
Other Books You May Enjoy
Leave a review - let other readers know what you think
← Prev
Back
Next →
← Prev
Back
Next →