Bundling and Minification in ASP.NET Core

It is the dream of every web developer to build blazing fast and high-performance web applications but this is not easy to accomplish unless we implement some performance optimizations. Web pages have evolved from static HTML pages to complex and responsive pages with a lot of dynamic contents and plugins which require a large number of CSS and JavaScript files to be downloaded to the clients. To improve the initial page request load time, we normally apply two performance techniques called bundling and minification.

Read more here…

Web Apps Performance Testing

Here are some of the tools that can be used to do web application performance testing;

WebLOAD
LoadNinja
HeadSpin
ReadyAPI Performance
LoadView
PFLB
Keysight’s Eggplant
Apache JMeter
LoadRunner
Rational Performance Tester
NeoLoad
LoadComplete
WAPT
Loadster
k6
Testing Anywhere
Appvance
StormForge

What about Databases?

SQL queries in SSMS runs faster but they are slower in .NET application. One of the reason could be ARTHIABORT setting, read article below;

https://blog.sqlauthority.com/2018/08/07/sql-server-setting-arithabort-on-for-all-connecting-net-applications/

References

https://liferay.dev/blogs/-/blogs/session-storage-is-evil

Arrow function in JavaScript

There’s an alternative way of writing anonymous functions, which we call an arrow function. An arrow function uses () => instead of function ():

function using function ();

document.querySelector("html").addEventListener("click", function () {
  alert("Ouch! Stop poking me!");
});

function using arrow function;

document.querySelector("html").addEventListener("click", () => {
  alert("Ouch! Stop poking me!");
});

Reference

https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics

DB Schema and Permissions

If application doesn’t run and complains about permissions e.g. Execute permission, we need to check schema permissions; One of the reason, this happens when we restore database.

Suppose our user name is FMUser and dataase name is FMStoreDev. Under Login Properties of FM User – Security;

UNDER DATABASE -> USER -> SECURITY -> FMUser, CHECK THIS (in case SPROC does not run);

On Securables tab, click Search;

Select first option and click ok;

Click on object types and select schema;

Click on Browse and select your schema;

Select FM schema and grant execute permission to FMUser;

Since this is schema bound, go to securityàschema. Schema name should be your custom schema and owner should be dbo;

Click on Permissions tab. Make sure execute permission is selected for FM user;

These changes will help to solve database execute permission problem.

This is an alternative of remapping the users (to restore permission) after restoring DB;

USE FMStoreDev;  
GO  
EXEC sp_change_users_login 'Update_One', 'FMUser', 'FMUser';  
GO