C# 7 and .NET Core 2.0 High Performance
eBook - ePub

C# 7 and .NET Core 2.0 High Performance

Ovais Mehboob Ahmed Khan

Buch teilen
  1. 300 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

C# 7 and .NET Core 2.0 High Performance

Ovais Mehboob Ahmed Khan

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Improve the speed of your code and optimize the performance of your apps

Key Features

  • 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

Book Description

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.

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

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.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist C# 7 and .NET Core 2.0 High Performance als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu C# 7 and .NET Core 2.0 High Performance von Ovais Mehboob Ahmed Khan im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Ciencia de la computación & Programación en C++. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

What's New in .NET Core 2 and C# 7?

.NET Core is a development platform by Microsoft that runs cross-platform and is maintained by Microsoft and the community at GitHub. It is the most emergent and popular framework in development communities due to its performance and platform portability. It targets every developer that can develop any application for any platform that includes web, cloud, mobile, embedded, and IoT scenarios.
With .NET Core, we can develop applications using C#, F#, and now VB.NET as well. However, C# is the most widely used language among developers.
In this chapter, you will learn the following topics:
  • Performance improvements in .NET Core 2.0
  • Upgrading the path from .NET Core 1.x to 2.0
  • .NET Standard 2.0
  • What comes with ASP.NET Core 2.0
  • New features in C# 7.0

Evolution of .NET

In early 2002, when Microsoft first introduced the .NET Framework, it targeted developers who were working on classic ASP or VB 6 platforms since they didn't have any compelling framework for developing enterprise-level applications. With the release of the .NET Framework, developers had a platform to develop applications and could choose any of the languages from VB.NET, C#, and F#. Irrespective of the language chosen, the code is interoperable, and developers can create a project with VB.NET and reference it in their C# or F# project and vice versa.
The core component of .NET Framework includes Common Language Runtime (CLR), Framework Class Libraries (FCL), Base Class Libraries (BCL), and a set of application models. New features and patches have been introduced with the newer version of the .NET Framework, which comes with the new release of Windows, and developers have had to wait for a year or so to get those improvements. Every team at Microsoft worked on a different application model, and each team had to wait for the date when the new framework was released to port their fixes and improvements. Windows Forms and Web Forms were the primary application models at that time that were widely used by .NET developers.
When Web Forms was first introduced, it was a breakthrough which attracted both web developers who worked on Classic ASP and desktop application developers who worked on Visual Basic 6.0. The developer experience was appealing and provided a decent set of controls that could easily be dragged and dropped to the screen, followed to their events and properties that could be set either through the view file (.aspx) or code-behind files. Later on, Microsoft introduced the Model View Controller (MVC) application model that implemented the separation of concerns design principle, so that View, Model, and Controller are separate entities. The View is the user interface that renders the Model, where the Model represents the business entity and holds the data, and the Controller that handles the request and updates the model and injects it into the View. MVC was a breakthrough that let developers write cleaner code and bind their model with the HTML controls using model binding. With the passage of time, more features were added and the core .NET web assembly System.Web became quite big and bloated, and contained lots of packages and APIs that were not always useful in every type of application. However, with .NET, several groundbreaking changes were introduced and System.Web got split into NuGet packages that can be referenced and added individually based on requirements.
.NET Core (codename .NET vNext) was first introduced in 2014, and the following are the core benefits of using .NET Core:
Benefit
Description
Cross Platform
.NET Core can run on Windows, Linux, and macOS
Host Agnostic
.NET Core on the server side is not dependent on IIS and, with two lightweight servers, Kestrel and WebListener, it can be self-hosted as a Console application and can be also gelled with mature servers such as IIS, Apache, and others through a reverse proxy option
Modular
Ships as NuGet packages
Open Source
The entire source code is released as open source via the .NET Foundation
CLI tooling
Command line tools to create, build, and run projects from the command line
.NET Core is a cross-platform, open-source framework that implements .NET Standard. It provides a runtime known as .NET Core CLR, framework class libraries, which are primitive libraries known as CoreFX, and APIs that are similar to what .NET Framework has, but have a smaller footprint (lesser dependencies on other assemblies):
.NET Core provides flexible deployment options as follows:
  • Framework-Dependent Deployment (FDD): needs .NET Core SDK to be installed on the machine
  • Self-Contained Deployment (SCD): No machine-wide installation of .NET Core SDK is needed on the machine and .NET Core CLR and framework class libraries are part of the application package
To install .NET Core 2.0, you can navigate to the following link https://www.microsoft.com/net/core and go through the options for installing it on Windows, Linux, MAC, and Docker.

New improvements in .NET Core 2.0

The most recent version of .NET Core, 2.0, comes with a number of improvements. .NET Core 2.0 is the fastest version of all times and can run on multiple platforms including various Linux distros, macOS (operating system), and Windows.
Distros stands for Linux distribution (often abbreviated as distro), and it is an operating system made from a software collection, which is based upon the Linux kernel and, often, a package management system.

Performance improvements

.NET Core is more robust and performance efficient and, since it's open source, the Microsoft team with other community members are bringing more improvements.
The following are the imp...

Inhaltsverzeichnis