@manhng

Welcome to my blog!

Top secure & performance in .NET

September 16, 2020 14:24

Top secure & performance in .NET (edit)

https://www.danylkoweb.com/Blog/10-ways-to-speed-up-your-aspnet-mvc-application-EL

Source code samples

https://github.com/chaliy/inline_scheduler

https://github.com/NuGet/WebBackgrounder

Web Background Tasks with WebBackgrounder

https://haacked.com/archive/2011/10/16/the-dangers-of-implementing-recurring-background-tasks-in-asp-net.aspx/

https://www.dotnetcurry.com/aspnet-mvc/975/new-features-aspnet-mvc-5

What's new fundamental features of MVC 5:

  • Scaffolding
  • ASP.NET Identity
  • One ASP.NET
  • Bootstrap
  • Attribute Routing
  • Filter Overrides

This technique can make your background tasks within ASP.NET much more robust.

Performance Tuning - 15 Simple ASP.NET Performance Tuning Tips

https://stackify.com/asp-net-performance-tuning/

  1. Measure everything
  2. Pick the low-hanging fruit first
  3. Enable compression
  4. Reduce HTTP requests
  5. HTTP/2 over SSL
  6. Minify your files
  7. Load CSS first
  8. Load JavaScript last
  9. Shrink images
  10. Check your queries
  11. Cache your pages
  12. Cache parts of your pages
  13. Content delivery network (CDN)
  14. Shrink your libraries
  15. Avoid client-side redirects

https://www.codeproject.com/articles/41930/how-to-improve-the-performance-of-asp-net-mvc-web

Here are a few useful links to read more:

https://www.c-sharpcorner.com/UploadFile/8a67c0/8-steps-make-your-Asp-Net-mvc-website-faster/

https://devblogs.microsoft.com/aspnet/queuebackgroundworkitem-to-reliably-schedule-and-run-background-processes-in-asp-net/

https://anthonygiretti.com/2014/05/18/exploring-queuebackgroundworkitem-in-asp-net-and-framework-4-5-2/

https://mariusschulz.com/articles/using-queuebackgroundworkitem-to-schedule-background-jobs-from-an-asp-net-application-in-net-4-5-2

https://codingcanvas.com/using-hostingenvironment-queuebackgroundworkitem-to-run-background-tasks-in-asp-net/

http://www.davidwhitney.co.uk/Blog/2014/05/09/exploring-the-queuebackgroundworkitem-in-asp-net-framework-4-5-2/

Life Cycle

  • ASP.NET Application Life Cycle Overview for IIS 7.0
  • ASP.NET Application Life Cycle
  • ASP.NET Page Life Cycle
  • HTTP Request Lifecycle Events in IIS Pipeline

https://dotnettekki.com/aspnet-mvc-page-life-cycle/

https://www.c-sharpcorner.com/article/asp-net-request-life-cycle/

https://www.codeproject.com/Articles/1168712/How-to-quickly-configure-your-MVC-website-in-IIS

https://www.dotnetcurry.com/aspnet/1263/aspnet-application-page-life-cycle-interview-question

https://codewithshadman.com/aspnet-mvc-request-life-cycle-and-application-events/ (HTTP Module)

https://www.dotnetcurry.com/aspnet/1263/aspnet-application-page-life-cycle-interview-question (First Request)

https://docs.microsoft.com/en-us/previous-versions/aspnet/swe97x0b(v=vs.100) (Application, Request, Server, Session, Response, Context, Trace)

MVC Life Cycles

Route Handler

ASP.NET

 

Hangfire

https://docs.hangfire.io/en/latest/tutorials/send-email.html

https://www.codeproject.com/tips/1030288/asp-net-mvc-hangfire-execute-jobs-in-background-us

https://github.com/RawSanj/Hangfire-MVC-5-Web

https://code.4noobz.net/hangfire-quickstart-simple-tutorial/

https://www.c-sharpcorner.com/article/schedule-background-jobs-using-hangfire-in-asp-net-core/

Precompile Razor Views

https://stackoverflow.com/questions/49028212/precompile-asp-net-views-with-ms-build

Precompile with MSBuild

https://help.veracode.com/reader/4EKhlLSMHm5jC8P8j3XccQ/AM8PAkQKwsHbNYXy2VeX5Q

https://help.veracode.com/reader/4EKhlLSMHm5jC8P8j3XccQ/eP7B7mh55YlLmKLo~mWEgA

Console App (Global Exception Handling in c#)

https://forums.asp.net/t/2162225.aspx?Asp+net+core+console+application+Connect+database+and+add+dbContext+and+models

Console App call Web Services (ASMX)

https://www.c-sharpcorner.com/UploadFile/a20beb/how-to-access-a-web-service-in-console-application/

https://www.aspsnippets.com/Articles/Call-Consume-Web-Service-ASMX-in-Console-application-using-C-and-VBNet.aspx

Recurring Tasks - Schedule Tasks - Background Tasks - Multi threading with Cancellation Token (Using the cancellation token)

https://codereview.stackexchange.com/questions/119956/recurring-tasks-in-asp-net-mvc (Review code)

https://www.codeproject.com/articles/1067678/practical-multithreading-in-asp-net

Measure Performance with Profiling Tools

August 21, 2020 10:09

Measure Performance with Profiling Tools (edit)

https://docs.microsoft.com/en-us/visualstudio/profiling/beginners-guide-to-performance-profiling?view=vs-2019

https://docs.microsoft.com/en-us/visualstudio/profiling/profiling-feature-tour?view=vs-2019

https://devblogs.microsoft.com/visualstudio/how-to-debug-and-profile-any-exe-with-visual-studio/

https://devblogs.microsoft.com/devops/diagnosing-memory-issues-with-the-new-memory-usage-tool-in-visual-studio/ (Samples)

https://devblogs.microsoft.com/devops/understanding-symbol-files-and-visual-studios-symbol-settings/

https://docs.microsoft.com/en-us/visualstudio/profiling/perftips?view=vs-2019

https://docs.microsoft.com/en-us/visualstudio/profiling/running-profiling-tools-with-or-without-the-debugger?view=vs-2019

https://docs.microsoft.com/en-us/visualstudio/profiling/profile-apps-from-command-line?view=vs-2019

https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh750313(v=win.10)

https://github.com/dotnet/sourcelink

https://github.com/0xd4d/dnSpy

https://github.com/icsharpcode/ILSpy

Front-end Performance Checklist

December 14, 2018 10:34

Front-end Performance Checklist (edit)

 

https://frontendchecklist.io/

https://css-tricks.com/front-end-checklist-just-tool-everything-depends/

https://codeburst.io/the-front-end-performance-checklist-speeds-up-your-web-developments-b68e1c7a0276

https://www.ilabquality.com/the-ultimate-mobile-performance-testing-checklist/

https://www.imt-soft.com/Blogs/Microsoft-Net/Front-End-Performance-Optimization-Checklist-For-Web-Applications

https://github.com/thedaviddias/Front-End-Performance-Checklist

https://www.smashingmagazine.com/2008/01/10-principles-of-effective-web-design/

https://www.smashingmagazine.com/2013/09/responsive-images-performance-problem-case-study/

 

https://www.smashingmagazine.com/2018/01/front-end-performance-checklist-2018-pdf-pages/

Table of Contents

  1. HTML
  2. CSS
  3. Fonts
  4. Images
  5. JavaScript
  6. Server (in progress)
  7. JS Frameworks (in progress)

Google Keywords

front-end-performance-checklist-2018-pdf

pagination-best-practices

NerdDinner MVC site:github.com

alternative to northwind database

https://github.com/cwoodruff/ChinookDatabase

Chinook Database (Sql Server Script)

Chinook Database Schema

Why the name Chinook?

The name of this sample database was based on the Northwind database. Chinooks are winds in the interior West of North America, where the Canadian Prairies and Great Plains meet various mountain ranges. Chinooks are most prevalent over southern Alberta in Canada. Chinook is a good name choice for a database that intents to be an alternative to Northwind.

Pagination

https://www.smashingmagazine.com/2007/11/pagination-gallery-examples-and-good-practices/

https://agentestudio.com/blog/pagination-design-examples-and-best-practices

https://blog.resellerclub.com/pagination-7-best-practices-with-examples/

https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/nerddinner/implement-efficient-data-paging

Front-end Websites

http://ress.io/

http://www.csszengarden.com/

Backend Performance Checklist

https://github.com/futurice/backend-best-practices

Software Testing

https://www.softwaretestinghelp.com/how-to-perform-backend-testing/

High Performance Web Pages

https://www.slideshare.net/stoyan/high-performance-web-pages-20-new-best-practices/

Complete Web Application Testing checklist

https://www.guru99.com/complete-web-application-testing-checklist.html

  • HTTP Requests
    • Reduce number of HTTP Requests
    • Caching
    • Avoid Overusing HTTPS
  • Content
    • CSS & Script Minification
    • Text Response Compression
  • CSS
    • Use External CSS
    • Put CSS in HEAD
    • Use CSS Sprites
    • Use CSS Shorthand Properties
    • Avoid CSS Expressions
  • Script
    • Use External Script Files
    • Put Script At the Bottom of Page
    • Eliminate Duplicate Scripts
  • Images
    • Avoid scaling images in HTML
    • Avoid using images to display text
  • Cookie
    • Reduce Cookie Size

Cloud computing

All the layers of cloud computing:

  • SaaS (Software as a service), e.g. Google Docs
  • IaaS (Infrastructure as a service), e.g. Amazon
  • PaaS (Platform as a service) e.g. Google App Engine
  • BPaaS (Business Process as a service) e.g. advertisements, payments

Performance

January 18, 2018 01:20

Dynamic LINQ to SQL

https://codereview.stackexchange.com/questions/3560/dynamic-filtering-and-sorting-with-entity-framework

https://weblogs.asp.net/scottgu/linq-to-sql-part-3-querying-our-database

https://stackoverflow.com/questions/2380413/paging-with-linq-for-objects

https://stackoverflow.com/questions/33153932/filter-search-using-multiple-fields-asp-net-mvc

Expression, Lambda & Func in C#

https://blogs.msdn.microsoft.com/alexj/2009/03/25/tip-8-how-to-write-where-in-style-queries-using-linq-to-entities/

IEnumerable<T> vs IQueryable<T>

https://stackoverflow.com/questions/2876616/returning-ienumerablet-vs-iqueryablet

https://www.red-gate.com/simple-talk/dotnet/net-tools/entity-framework-performance-and-what-you-can-do-about-it/

https://github.com/bcemmett/EntityFrameworkSchoolSystem

Entity Framework Pre-Generated Mapping Views

https://msdn.microsoft.com/en-us/data/dn469601

Performance Considerations for EF 4, 5, and 6

https://msdn.microsoft.com/en-us/data/hh949853

https://romiller.com/2014/06/10/reducing-code-first-database-chatter/

https://www.red-gate.com/simple-talk/dotnet/.net-framework/the-.net-4.5-asyncawait-feature-in-promise-and-practice/

Entity Framework Power Tools Beta 4

https://marketplace.visualstudio.com/items?itemName=EntityFrameworkTeam.EntityFrameworkPowerToolsBeta4

https://www.nuget.org/packages/EFInteractiveViews

ANTS Performance Profiler

https://www.red-gate.com/simple-talk/author/ben-emmett/

https://www.red-gate.com/products/dotnet-development/ants-performance-profiler/

Sorting, Filtering, Paging

https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application

https://github.com/aspnet/Docs/blob/master/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application.md

http://www.c-sharpcorner.com/UploadFile/4b0136/perform-paging-searching-sorting-in-Asp-Net-mvc-5/

http://www.c-sharpcorner.com/UploadFile/0c1bb2/sorting-paging-searching-in-Asp-Net-mvc-5/

http://www.c-sharpcorner.com/article/paging-and-sorting-in-Asp-Net-mvc/

http://www.jquery2dotnet.com/2013/06/mvc-4-paging-with-ajax-bootstrap.html

http://mvcpaging.apphb.com/

http://www.joe-stevens.com/tag/linq-to-sql/

Categories

Recent posts