Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
ASP.NET Core 2 High Performance
ASP.NET Core 2 High Performance

ASP.NET Core 2 High Performance: Learn the secrets of developing high performance web applications using C# and ASP.NET Core 2 on Windows, Mac, and Linux , Second Edition

eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

ASP.NET Core 2 High Performance

Why Performance Is a Feature

This is an exciting time to be a C# developer. Microsoft is in the middle of one of the biggest changes in its history and it is embracing open source software. The ASP.NET and .NET Frameworks have been rebuilt from the ground up so they are componentized, cross platform, and fully open source. Many of the recent improvements have come from the community.

ASP.NET Core 2 and .NET Core 2 embrace other popular open source projects, including Linux. The ASP.NET Model View Controller (MVC) web application framework, which is part of ASP.NET Core, borrows heavily from Ruby on Rails, and Microsoft is keen on promoting tools, such as Node.js, Grunt, gulp, and Yeoman. Support for React, Redux, and Angular Single Page Apps (SPAs) is also inbuilt. You can write these in TypeScript, which is a statically typed version of JavaScript that is developed by Microsoft...

Performance as a feature

You may have previously heard about the practice of treating performance as a first-class feature. Traditionally, performance (along with things such as security, availability, and uptime) was only considered a non-functional requirement (NFR) and usually had some arbitrary made-up metrics that needed to be fulfilled. You may have heard the term performant before. This is the quality of performing well and is often captured in requirements without quantification, providing very little value. It is better to avoid this sort of corporate jargon when corresponding with clients or users.

Using the outdated waterfall method of development, these NFRs were inevitably left until the end and dropped from an over budget and late project in order to get the functional requirements completed. This resulted in a substandard product that was unreliable, slow, and often...

Common classes of performance problems

Let's take a look at some common areas of performance problems and see whether they matter or not. We will also learn why we often miss these issues during development. We will look at programming language choice, latency, bandwidth, computation, and when you should consider performance.

Language considerations

People often focus on the speed of the programming language that is used. However, this often misses the point. This is a very simplistic view that glosses over the nuances of technology choices. It is easy to write slow software in any language.

With the huge amounts of processing speed that is available today, relatively slow interpreted languages can often be fast enough...

Understanding hardware

Remember that there is a computer in computer science. It is important to understand what your code runs on and the effects that this has; this isn't magic.

Storage access speeds

Computers are so fast that it can be difficult to understand which operation is a quick operation and which one is slow. Everything appears instant. In fact, anything that happens in less than a few hundred milliseconds is imperceptible to humans. However, certain things are much faster than others are, and you only get performance issues at scale when millions of operations are performed in parallel.

There are various different resources that can be accessed by an application and a selection of these are listed as follows...

Tools and costs

Licensing of Microsoft products has historically been a minefield of complexity. You can even sit for an official exam on it and get a qualification. Microsoft's recent move toward open source practices is very encouraging, as the biggest benefit of open source is not the free monetary cost but that you don't have to think about licensing costs. You can also fix issues, and with a permissive license (such as MIT), you don't have to worry about much. The time costs and cognitive load of working out licensing implications now and in future can dwarf the financial sums involved (especially for a small company or startup).

Tools

Despite the new .NET Framework being open source, many of the tools...

The new .NET

The new ASP.NET and the .NET Framework that it relies upon were rewritten to be open source and cross-platform in Core version 1. The packages were also split up, which although done with admirable intentions has caused confusion. ASP.NET Core 2 is now included in the .NET Core 2 installation package along with Entity Framework Core. This means that you no longer need to ship the ASP.NET Core framework with your app when you deploy. The project known as .NET Native has been postponed (outside of UWP) and will hopefully arrive within the next year.

All these different names can be perplexing, but naming things is hard. A humorous variation of Phil Karlton's famous quote goes like this:

"There are only two hard things in Computer Science: cache invalidation, naming things, and off-by-one errors."

We've looked at naming here, and we'll get to...

Summary

Let's sum up what we covered in this chapter and what we will cover in the next chapter. We introduced the concept of treating performance as a feature, and we covered why this is important. We also briefly touched on some common performance problems and why we often miss them in the software development process. We'll cover these in more detail later on in this book.

We showed the performance differences between various types of storage hardware. We highlighted the importance of knowing what your code runs on and, crucially, what it will run on when your users see it. We talked about how the process of scaling systems has changed from what it used to be, how scaling is now performed horizontally instead of vertically, and how you can take advantage of this in the creation of your code and systems. We showed you the tools that you can use and the licensing implications...

Left arrow icon Right arrow icon

Key benefits

  • Master high-level web app performance improvement techniques using ASP.NET Core 2.0
  • Find the right balance between premature optimization and inefficient code
  • Design workflows that run asynchronously and are resilient to transient performance issues

Description

The ASP.NET Core 2 framework is used to develop high-performance and cross-platform web applications. It is built on .NET Core 2 and includes significantly more framework APIs than version 1. This book addresses high-level performance improvement techniques. It starts by showing you how to locate and measure problems and then shows you how to solve some of the most common ones. Next, it shows you how to get started with ASP.NET Core 2 on Windows, Mac, Linux, and with Docker containers. The book illustrates what problems can occur as latency increases when deploying to a cloud infrastructure. It also shows you how to optimize C# code and choose the best data structures for the job. It covers new features in C# 6 and 7, along with parallel programming and distributed architectures. By the end of this book, you will be fixing latency issues and optimizing performance problems, but you will also know how this affects the complexity and maintenance of your application. Finally, we will explore a few highly advanced techniques for further optimization.

Who is this book for?

This book is aimed for readers who can build a web application and have some experience with ASP.NET or some other web application framework (such as Ruby on Rails or Django). They can be people who are happy learning details independently but who struggle to discover the topics that they should be researching. The reader should be interested in improving the performance of their web app and in learning about ASP.NET Core and modern C#.

What you will learn

  • Understand ASP.NET Core 2 and how it differs from its predecessor
  • Address performance issues at the early stages of development
  • Set up development environments on Windows, Mac, and Linux
  • Measure, profile and find the most significant problems
  • Identify the differences between development workstations and production infrastructures, and how these can exacerbate problems
  • Boost the performance of your application but with an eye to how it affects complexity and maintenance
  • Explore a few cutting-edge techniques such as advanced hashing and custom transports

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 11, 2017
Length: 348 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788396028
Vendor :
Microsoft
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Oct 11, 2017
Length: 348 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788396028
Vendor :
Microsoft
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 138.97
Learning ASP.NET Core 2.0
€36.99
C# 7.1 and .NET Core 2.0 ??? Modern Cross-Platform Development
€59.99
ASP.NET Core 2 High Performance
€41.99
Total 138.97 Stars icon
Banner background image

Table of Contents

12 Chapters
What's New in ASP.NET Core 2? Chevron down icon Chevron up icon
Why Performance Is a Feature Chevron down icon Chevron up icon
Setting Up Your Environment Chevron down icon Chevron up icon
Measuring Performance Bottlenecks Chevron down icon Chevron up icon
Fixing Common Performance Problems Chevron down icon Chevron up icon
Addressing Network Performance Chevron down icon Chevron up icon
Optimizing I/O Performance Chevron down icon Chevron up icon
Understanding Code Execution and Asynchronous Operations Chevron down icon Chevron up icon
Learning Caching and Message Queuing Chevron down icon Chevron up icon
The Downsides of Performance-Enhancing Tools Chevron down icon Chevron up icon
Monitoring Performance Regressions Chevron down icon Chevron up icon
The Way Ahead Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Half star icon Empty star icon Empty star icon 2.3
(3 Ratings)
5 star 33.3%
4 star 0%
3 star 0%
2 star 0%
1 star 66.7%
Calum Ryan Jan 30, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The quality of this book is excellent with a superb approach to explaining highly technical concepts in a language those from a range of backgrounds in web and software development can grasp. Much effort has been made to explain more complex terminology in concise summaries of their capabilities and uses in working with ASP.NET Core. James talks about many aspects of the development stack which are considered throughout from a performance perspective. This is all essential for understanding how to build robust, resilient systems today and for the future. I highly recommend this given its relevance to developing for multiple platforms and general approach applicable to good practice over different disciplines.
Amazon Verified review Amazon
Blanken Jan 03, 2018
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
This book was a waste of my time and money.Any half decent developer, with just 1 or 2 years experience, should find this book very basic.The author spends less than half the book talking about something performance related. Instead, the page-count is increased by talking about:* What is new in C# 6 (3 pages)* What is new in C# 7 (4 pages)* How to install VS 2017 on Windows (3 pages)* How to install VS 2017 on Mac (4 pages)* Creating your first app using VS Windows (4 pages)* Creating your first app using VS Mac (4 pages)* Installing .NET Core on Linux and creating your first app (6 pages)* Using ASP.NET Core in Docker (6 pages)* Multiple lengthy discussions about images, hashing, encryption and certificates, but mostly not related to performance* How to use ping, tracert and nslookup (8 pages)* How to build your own ping (4 pages)And so on...I would recommend having a look at "Pro .NET Performance: Optimize Your C# Applications" or "Writing High-Performance .NET Code" instead.
Amazon Verified review Amazon
Shantanu Nov 23, 2017
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Cheap re-print.... Horrible print & paper quality. The figures/pictures aren't clear either. Not worth 899/- should be like a 250/- a copy.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.