My Account Log in

3 options

C# 7 and .NET Core 2.0 high performance : build highly performant, multi-threaded, and concurrent applications using C# 7 and .NET Core 2.0 / Ovais Mehboob Ahmed Khan.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central Academic Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Mehboob Ahmed Khan, Ovais, author.
Language:
English
Subjects (All):
Microsoft Visual studio.
Microsoft .NET Framework.
C# (Computer program language).
Application software--Development.
Application software.
Physical Description:
1 online resource (300 pages)
Edition:
First edition
Other Title:
C sharp seven and .NET Core two point zero high performance
Place of Publication:
Birmingham ; Mumbai : Packt Publishing, 2018.
System Details:
text file
Summary:
Improve the speed of your code and optimize the performance of your apps About This Book Understand the common performance pitfalls and improve your application's performance Get to grips with multi-threaded and asynchronous programming in C# Develop highly performant applications on .NET Core using microservice architecture Who This Book Is For This book is for .NET developers looking at improving the speed of their code or simply wanting to take their skills to the next level. Basic C# knowledge is assumed. What You Will Learn Measure application performance using BenchmarkDotNet Explore the techniques to write multithreaded applications Leverage TPL and PLinq libraries to perform asynchronous operations Get familiar with data structures to write optimized code Understand design techniques to increase your application's performance Learn about memory management techniques in .NET Core Develop a containerized application based on microservices architecture Learn tools and techniques to monitor application performance In Detail While writing an application, performance is paramount. Performance tuning for realworld applications often involves activities geared toward fnding bottlenecks; however, this cannot solve the dreaded problem of slower code. If you want to improve the speed of your code and optimize an application's performance, then this book is for you. C# 7 and .NET Core 2.0 High Performance begins with an introduction to the new features of what?explaining how they help in improving an application's performance. Learn to identify the bottlenecks in writing programs and highlight common performance pitfalls, and learn strategies to detect and resolve these issues early. You will explore multithreading and asynchronous programming with .NET Core and learn the importance and effcient use of data structures. This is followed with memory management techniques and design guidelines to increase an application's performance. Gradually, the book will show you the importance of microservices architecture for building highly performant applications and implementing resiliency and security in .NET Core. After reading this book, you will learn how to structure and build scalable, optimized, and robust applications in C#7 and .NET. Style and approach This book will be a step by step easy to follow guide with focused examples to increase performance of applications and provide optimization techniques. Downloading the example code for this book You...
Contents:
Intro
Title Page
Copyright and Credits
Packt Upsell
Contributors
Table of Contents
Preface
What's New in .NET Core 2 and C# 7?
Evolution of .NET
New improvements in .NET Core 2.0
Performance improvements
RyuJIT compiler in .NET Core
Profile guided optimization
Simplified packaging
Upgrading path from .NET Core 1.x to 2.0
1. Install .NET Core 2.0
2. Upgrade TargetFramework
3. Update .NET Core SDK version
4. Update .NET Core CLI
Changes in ASP.NET Core Identity
Exploring .NET Core CLI and New Project Templates
Understanding .NET Standard
Versioning of .NET Standard
New improvements in .NET Standard 2.0
More APIs in .NET Standard 2.0
Compatibility mode
Creating a .NET Standard library
What comes with ASP.NET Core 2.0
ASP.NET Core Razor Pages
Automatic Page and View compilation on publishing
Razor support for C# 7.1
Simplified configuration for Application Insights
Pooling connections in Entity Framework Core 2.0
New features in C# 7.0
Tuples
Patterns
Constant pattern
Type pattern
Var pattern
Reference returns
Expression bodied member extended
Creating Local Functions
Out variables
Async Main
Writing quality code
Summary
Understanding .NET Core Internals and Measuring Performance
.NET Core internals
CoreFX
CoreCLR
Understanding MSIL, CLI, CTS, and CLS
How the CLR works
From compilation to execution - Under the hood
Garbage collection
Generations in GC
.NET Native and JIT compilation
Utilizing multiple cores of the CPU for high performance
How releasing builds increases performance
Benchmarking .NET Core 2.0 applications
Exploring BenchmarkDotNet
How it works
Setting parameters
Memory diagnostics using BenchmarkDotnet
Adding configurations
Summary.
Multithreading and Asynchronous Programming in .NET Core
Multithreading versus asynchronous programming
Multithreading in .NET Core
Multithreading caveats
Threads in .NET Core
Creating threads in .NET Core
Thread lifetime
The thread pool in .NET
Thread synchronization
Monitors
Task parallel library (TPL)
Creating a task using TPL
Task-based asynchronous pattern (TAP)
Naming convention
Return type
Parameters
Exceptions
Task status
Task cancellation
Task progress reporting
Implementing TAP using compilers
Implementing TAP with greater control over Task
Design patterns for parallel programming
Pipeline pattern
Dataflow pattern
Producer/consumer pattern
Parallel.ForEach
Parallel LINQ (PLINQ)
Data Structures and Writing Optimized Code in C#
What are data structures?
Understanding the use of Big O notation to measure the performance and complexity of an algorithm
Logarithms
Choosing the right data structure for performance optimization
Arrays
Lists
Stacks
Queue
Linked lists
Singly linked lists
Doubly linked lists
Circular linked lists
Dictionaries, hashtables, and hashsets
Generic lists
Best practices in writing optimized code in C#
Boxing and unboxing overhead
String concatenation
Exception handling
For and foreach
Delegates
Designing Guidelines for .NET Core Application Performance
Coding principles
Code comments
One class per file
One logic per method
Design principles
KISS (Keep It Simple, Stupid)
YAGNI (You Aren't Gonna Need It)
DRY (Don't Repeat Yourself)
Separation of Concerns (SoC)
SOLID principles
Single Responsibility Principle
Open Closed principle
Inheritance
Composition
Liskov principle.
The Interface Segregation principle
The Dependency Inversion principle
Caching
Data structures
Communication
Using lighter interfaces
Minimizing message size
Queuing communication
Resource management
Avoiding improper use of threads
Disposing objects in a timely fashion
Acquiring resources when they are required
Concurrency
Memory Management Techniques in .NET Core
Memory allocation process overview
Analysing CLR internals through the SOS debugger in .NET Core
Memory fragmentation
Avoiding finalizers
Best practices for disposing of objects in .NET Core
Introduction to the IDisposable interface
What are unmanaged resources?
Using IDisposable
When to implement the IDisposable interface
Finalizer and Dispose
Securing and Implementing Resilience in .NET Core Applications
Introduction to resilient applications
Resilient policies
Reactive policies
Implementing the retry pattern
Implementing circuit breaker
Wrapping the circuit breaker with retry
Fallback policy with circuit breaker and retry
Proactive policies
Implementing timeout
Implementing caching
Implementing health checks
Storing sensitive information using Application Secrets
Protecting ASP.NET Core APIs
SSL (Secure Socket Layer)
Enabling SSL in an ASP.NET Core application
Preventing CSRF (Cross-Site Request Forgery) attacks
Reinforcing security headers
Adding the HTTP strict transport security header
Adding the X-Content-Type-Options header
Adding the X-Frame-Options header
Adding the X-Xss-Protection header
Adding the Content-Security-Policy header
Adding the referrer-policy header
Enabling CORS in the ASP.NET Core application
Authentication and authorization
Using ASP.NET Core Identity for authentication and authorization.
Authentication
Authorization
Implementing authentication and authorization using the ASP.NET Core Identity framework
Adding more properties in the user table
Microservices Architecture
Microservices architecture
Benefits of microservices architecture
Standard practice when developing microservices
Types of microservices
Stateless microservices
Stateful microservices
DDD
Data manipulation with microservices
Wrapping microservices behind an API gateway
Denormalizing data into a flat schema for read/query purposes
Consistency across business scenarios
Communication with microservices
Database architecture in microservices
Tables per service
Database per service
Challenges in segregating tables or databases per service
What is API composition?
CQRS
Developing microservices architecture with .NET Core
Creating a sample app in .NET Core using microservices architecture
Solution structure
Logical architecture
Developing a Core infrastructure project
Creating the BaseEntity class
The UnitOfWork pattern
Creating a repository interface
Logging
Creating the APIComponents infrastructure project
Developing an identity service for user authorization
OpenIddict connect flows
Creating the identity service project
Implementing the vendor service
Creating a vendor domain
Creating the vendor infrastructure
Creating the vendor service
Implementing the mediator pattern in the vendor service
Deploying microservices on Docker containers
What is Docker?
Using Docker with .NET Core
Running Docker images
Monitoring Application Performance Using Tools
Application performance key metrics
Average response time
Apdex scores
Percentage of errors
Request rate
Throughput/endpoints
CPU and memory usage.
Tools and techniques to measure performance
Introducing App Metrics
Setting up App Metrics with ASP.NET Core
Tracking middleware
Adding tracking middleware
Setting up configuration
Adding visual reports
Setting up InfluxDB
Setting up the Windows subsystem for Linux
Installing InfluxDB
Installing Grafana
Adding the InfluxDB dashboard
Configuring InfluxDB
Modifying the Configure and ConfigureServices methods in Startup
Testing the ASP.NET Core App and reporting on the Grafana dashboard
Other Books You May Enjoy
Index.
Notes:
Description based on print version record.
OCLC:
1034622567

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account