Reader small image

You're reading from  C# 7 and .NET Core 2.0 High Performance

Product typeBook
Published inApr 2018
Reading LevelBeginner
Publisher
ISBN-139781788470049
Edition1st Edition
Languages
Right arrow
Author (1)
Ovais Mehboob Ahmed Khan
Ovais Mehboob Ahmed Khan
author image
Ovais Mehboob Ahmed Khan

Ovais Mehboob Ahmed Khan is a seasoned programmer and solution architect with nearly 20 years of experience in software development, consultancy, and solution architecture. He has worked with various clients across the world and is currently working as a senior customer engineer at Microsoft. He specializes mainly in application development using .NET and OSS technologies, Microsoft Azure, and DevOps. He is a prolific writer who has written several books and articles on various technologies. He really enjoys talking about technology and has given a number of technical sessions around the world.
Read more about Ovais Mehboob Ahmed Khan

Right arrow

What this book covers

Chapter 1, What's New in .NET Core 2 and C# 7?, discusses the .NET Core Framework and covers some improvements that were introduced with .NET Core 2.0. We will also look into the new features of C# 7 and see how we can write cleaner code and simplify syntactic expressions. Lastly, we cover the topic of writing quality code. We'll see how we can leverage the Code analysis feature of Visual Studio 2017 to add analyzers to our project and improve code quality.

Chapter 2, Understanding .NET Core Internals and Measuring Performance, discusses the core concepts of .NET Core, including the compilation process, garbage collection, building highly-performant .NET Core applications utilizing multiple cores of the CPU, and publishing an application using a release build. We will also explore the benchmarking tool that is highly used for code optimization and provides results specific to in-memory objects.

Chapter 3, Multithreading and Asynchronous Programming in .NET Core, explores the core fundamentals of multithreaded and asynchronous programming. The chapter starts with the basic differences between multithreaded and asynchronous programming and walks you through the core concepts. It explores APIs and how to use them when writing a multithreaded application. We will learn how the Task Programming Library can be used to serve asynchronous operations, and how to implement the Task Asynchronous pattern. Lastly, we will explore parallel programming techniques and some of the best design patterns being used.

Chapter 4, Data Structures and Writing Optimized Code in C#, outlines the core concepts of data structures, the types of data structure, and their advantages and disadvantages, followed by the best possible scenarios to which each data structure is suited. We also learn about the Big O notation, which is one of the core topics to consider when writing code and helps developers check the quality of the code and performance. Lastly, we will look into some best practices and cover topics such as boxing and unboxing, string concatenation, exception handling, for and foreach, and delegates.

Chapter 5, Designing Guidelines for .NET Core Application Performance, showcases some coding principles that make application code look clean and easy to understand. If the code is clean, it offers other developers a way to understand it completely and helps in many other ways. We will learn some basic design principles that are considered to be part of the core principles when designing applications. Principles such as KISS, YAGNI, DRY, Separation of Concerns, and SOLID are highly essential in software design, and caching and choosing the right data structure have a significant impact on performance, and can improve performance if they are properly used. Lastly, we will learn some best practices that should be considered when handling communication, resource management, and concurrency.

Chapter 6, Memory Management Techniques in .NET Core, outlines the underlying process of how memory management is done in .NET. We will explore the debugging tool, which can be used by developers to investigate the object's memory allocation on the heap. We will also learn about memory fragmentation, finalizers, and how to implement a dispose pattern to clean up resources by implementing the IDisposable interface.

Chapter 7, Securing and Implementing Resilience in .NET Core Applications, takes you through resiliency, which is a very important factor when developing highly-performant applications in .NET Core. We will learn different policies and use the Polly framework to use those policies in .NET Core. We will also learn about safe storage mechanisms and how to use them in the development environment in order to keep sensitive information separate from the project repository. At the end of this chapter, we will learn some security fundamentals, which include SSL, CSRF, CORS, security headers, and the ASP.NET Core Identity framework, in order to protect ASP.NET Core applications.

Chapter 8, Microservices Architecture, looks at the most quickly evolving software architecture for developing highly performant and scalable applications for the cloud based on microservices. We will learn some of the core fundamentals of the microservices architecture, its benefits, and patterns and practices used when designing the architecture. We will discuss certain challenges faced when decomposing enterprise applications into the microservices architecture style and learn patterns such as API composition and CQRS in order to address them. Later in the chapter, we will develop a basic application in .NET Core and discuss the solution's structure and the components of microservices. Then we will develop identity and vendor services.

Chapter 9, Monitoring Application Performance Using Tools, dives into key performance metrics that are essential for monitoring an application's performance. We will explore and set up App Metrics, which is a free tool that is cross-platform and provides various extensions that can be used to achieve extensive reporting. We will go through a step-by-step guide on how to configure and set up App Metrics and related components, such as InfluxDb and Grafana, which is used to store and view telemetry in the Grafana web-based tool and integrate it with ASP.NET Core application.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
C# 7 and .NET Core 2.0 High Performance
Published in: Apr 2018Publisher: ISBN-13: 9781788470049

Author (1)

author image
Ovais Mehboob Ahmed Khan

Ovais Mehboob Ahmed Khan is a seasoned programmer and solution architect with nearly 20 years of experience in software development, consultancy, and solution architecture. He has worked with various clients across the world and is currently working as a senior customer engineer at Microsoft. He specializes mainly in application development using .NET and OSS technologies, Microsoft Azure, and DevOps. He is a prolific writer who has written several books and articles on various technologies. He really enjoys talking about technology and has given a number of technical sessions around the world.
Read more about Ovais Mehboob Ahmed Khan