There are a lot of control types that can be considered as popup controls, e.g. Select, Date-Time picker, Modal dialog etc. All these controls have parts that break out of the layout flow and overlap other UI elements. There are well-known methods for achieving the overlap behavior in HTML, but when developing your own component library in Angular, using these methods can be problematic. Next, we’ll take a look at potential problems with pop-up controls and some tricks to avoid them.
The most simple and efficient way to create a local-pop is using relative position for a host element and…
In the previous article(“Angular Components with Extracted Immutable State”), I explained why changing component fields without any restrictions is not always good, and also presented a library that allows you to streamline a component state changes.
Since then, I’ve slightly modified its concept and made it easier to use. This time I’ll focus on a simple (at first glance) example of how it can be used in scenarios where rxJs usually would be needed.
There is an immutable object that represents all field values of some component:
I noticed that when it becomes necessary to work with SQL databases in .Net applications, developers often chose some ORM library (.Net Entity Framework in most cases) without even considering other alternatives. This is a reasonable decision at first sight, since for popular ORM libraries there are many tutorials, great toolkit, and a lot of experienced developers. However, it is not always a good choice — I would at least consider other options if your application:
If your application mainly implements use cases similar to these…
Recently, when I was reviewing the new features that are going to be included in .Net 5, I came across an interesting one — C# Source Generators. This feature especially interested me since I have been using a similar approach for the last… 5 years and what Microsoft proposes is simply a deeper integration of this approach into the build process.
Further I’ll share my experience using Roslyn in code generation and I think this will help you better understand what exactly Microsoft offers and when you can use it.
First, let’s look at a typical code generation scenario. You…
It was a legacy enterprise project and I was asked to improve its “advanced” filtering capabilities.
Before they had something like this:
Almost 100% of asynchronous tasks that you deal with in your C# code are running or already completed regardless of whether you “await” them or not. This can be shown with the following example:
static async Task Main()
var task = GetValueAsync();
Console.WriteLine("Awating..."); Console.WriteLine("Result is: " + await task);
}static async Task<int> GetValueAsync()
Result is: 42
As you see GetValueAsync finished before await but what if the behavior is not desired and you do not want a task to start…
One of the Angular core concepts is the update of a component’s DOM in case the framework detects changes in its fields used in the template binding expressions. This is very convenient since it allows changing the component’s view just by updating the corresponding fields without any direct manipulations with DOM. At the same time, Angular leaves the way of how the component’s fields are updated to a developer and that works well in some simple scenarios since developers can quickly create components which meet all necessary requirements without the need to introduce any additional abstractions. …