Today, I wanted to add MiniProfiler to an ASP.NET MVC web application (not .NET Core), but unfortunately, the NuGet package doesn’t set up things correctly. The documentation is a bit lacking, and their sample project doesn’t work. So what was supposedly a simple task, took almost a full day of research to finally complete.
This article is dedicated to how nopCommerce, the most popular e-commerce platform on .Net Core, has switched to using the DataTables library on jQuery. With the help of a wrapper template for DataTablese, we tried to simplify for ourselves and third-party developers such a painstaking and tedious task as declaring the tables used in a project.
Why We Decided to Move Away From Kendo UI to DataTables
In nopCommerce up to the last 4.20 version we used quite popular UI framework by Telerik – Kendo UI. This client framework, based on jQuery, allows users to render visual controls such as tables, input fields, drop-down lists, etc.
A lot of times when writing unit tests we end up with a lot test methods that look the same and actually do the same thing. Also, there are special cases where we want to have high test coverage and in-depth test access for our crucial and very important core functionality methods.
For example, when creating a framework or a library, usually we want to write many tests and cover all possible aspects and outcomes, which may lead to a large amount of certain behavior test methods.
Support of Visual Studio 2019 in PVS-Studio affected a number of components: the plugin itself, the command-line analyzer, the cores of the C++ and C# analyzers, and a few utilities. In this article, I will explain what problems we encountered when implementing support of the IDE and how we addressed them.
Before we start, I’d like to take a look back at the history of supporting the previous versions of Visual Studio in PVS-Studio so you better understand our vision of the task and solutions that we came up with in every single situation.
.NET is getting bigger and gaining more and more traction. With the next release it is going to bring C# to more platforms.
Microsoft is going to ship Windows with a full Linux kernel in the WSL 2 which makes Windows the go-to platform for various web developers. And it gives us powerful tools to make our jobs easier.
This blog post describes the steps for packaging a C# .NET Core API service into a Docker image; focusing on how to run a container using the various options that Docker offers, especially interacting with external resources.
I won’t dwell on Docker technology and its benefits, there are some great blog posts for that, here is one of them. I’ll start from the very beginning: a plain Linux-based EC2 instance.
I am often asked by some people/colleagues, “which loop is faster?" "Which loop has higher performance?" Etc. I have heard that the For loop is faster than the For…each loop but I have never tried it before. So, I decided to see how big the difference is among all the loops and which one is faster at looping through an array and a list in terms of speed and performance.
Let’s start our journey to fin the best C# loop. For this exercise, I’ll be creating a console application in Visual Studio 2017.
Developers are often in a dilemma when trying to choose between technologies for their projects. Comparing two or more is quite daunting and confusing at times. In this article, we will focus on comparing .NET and Java.
The two are quite different in structure but are predisposed to comparison because of their demand when there is a call for complex and large-scale applications.
I work almost exclusively with ASP.NET Core and .NET Standard, and I attempt to make everything as modular as possible. This creates a problem for me, since every now and then I need the ability to have one module invoke functionality, or retrieve data from another module. In a truly modular design, though, the handled info and its handler should not know anything about each other, and they should not be dependent upon any aspect of the other. Super signals to the rescue!
For instance, in my own library, Magic, I have a user domain type in its auth module. Other modules might be interested in being notified whenever a user is deleted for some reason. I could, of course, expose a classic event on my user service or something, but this would create a dependency between these two different projects. Which again would result in my inability to easily exchange any of these two projects with alternative implementations. So we want a mechanism that allows for cross module communication, without dependencies, preferably without the signaled and the signaling entities knowing anything about each other’s existence. Below is how I chose to implement this:
Optimizing web applications is important because more economic web applications consume fewer CPU cycles and need less bandwidth — resources we have to pay for. It’s easy to turn on response compression on ASP.NET Core, but serving pre-compressed files needs more work. This blog post shows how to do it.
Why Pre-compressed Files?
Although it’s possible to compress files dynamically, when files are requested from a server it means additional work for the web server. Files to be compressed are changed only when a new deployment of the application is made. And the better compression we want the more work has CPU to do.