Feature toggle management in .NET Core

There are several techniques for implementing feature toggles, such as storing configurations in a file or database, or using an external service with a GUI for management. In this article, we will focus on Microsoft’s official open-source package called Microsoft.FeatureManagement(along with its companion package Microsoft.FeatureManagement.AspNetCoredesigned for use with ASP.NET) for managing features.
blog.kbegiedza.eu/feature-management-in-dotnet-core

New: Better search in Visual Studio – Visual Studio Blog

Image All in one search

To enable the new search experience, go to Tools > Options > Environment > Preview Features > New Visual Studio Search Experience. After doing that, and restarting Visual Studio, you’ll now see the new search button appear in the title bar, as shown in the screenshot below.

Image All in one search split button

Ctrl + T for code search and Ctrl + Q for feature search stay the same, so your muscle memory remains intact.

Source: New: Better search in Visual Studio – Visual Studio Blog

Unitverse C# Unit Test Generator (VS2022) – Visual Studio Marketplace

The Unitverse extension generates tests for classes written in C#. The extension covers basic tests automatically (for example, checking for correct property initialization), and creates placeholder tests for methods. Unitverse aims to produce tests that compile
marketplace.visualstudio.com/items?itemName=MattWhitfield.UnitverseVS2022

Structure Your React Apps Like It’s 2030

Every React Developer meets one issue during his or her journey. This is how you construct an amazing app architecture. This blog post will teach you how to structure your directories correctly and avoid some common mistakes that most of us make when architecting react applications.
blog.devgenius.io/structure-your-react-apps-like-its-2030-aef02097cb3

Common Design Patterns in C#

Design patterns are reusable solutions to common problems that arise in software design. They are templates for solving design problems that have proven to be effective in various situations. They provide a common vocabulary and a shared understanding of best practices for developers, making it easier for them to communicate and collaborate on complex design problems.
maherz.medium.com/10-essential-patterns-for-c-and-net-development-e9b881b9a6ba

Meld – Visual diff and merge tool (free/open-source)

Meld  Visual diff and merge tool Meld helps you compare files, directories, and version controlled projects. It provides two- and three-way comparison of both files and directories, and has support for many popular version control systems. Meld helps you review code changes and understand patches. It might even help you to figure out what’s going on in that merge you keep avoiding.

Source: Meld

.NET Core API endpoint model validation

Example of simple method in an API controller for showing invalid posted model state.

[HttpPost("create")]
public ActionResult<MyModel> Create([FromBody] MyModel model)
{
    ValidateIncomingModel();
    return myBusiness.Create(model);
}

private void ValidateIncomingModel()
{
    if (!ControllerContext.ModelState.IsValid)
    {
        var errors = ControllerContext.ModelState.Keys
              .SelectMany(key => ControllerContext.ModelState[key].Errors
              .Select(x => key + ": " + x.ErrorMessage));
        var message = string.Join("\n", errors);
        throw new Exception($"Not valid incoming model\n {message}");
    }
}

 

What is NgRx and why is it used in Angular apps?

Good intro to NgRx:

NgRx implements the Flux-Pattern. At a high level, it helps you unify all events and derive a common state in your Angular app. With NgRx, you store a single state and use actions to express state changes. It is ideal for apps with many user interactions and multiple data sources.

What problems does NgRx solve?

At a high-level, it mainly solves mainly the two main scenarios:

  • Sharing data between different components
  • A global state for the reuse of data

Sharing Data between different components

In a complex web application, you have different sections. Imagine the following scenario: In a web shop, you have an item list and your shopping cart. These two sections of the web shop are different component trees, probably in different Angular modules. In the item list, the user clicks on a particular item “Add to my cart”. After the click, the item appears in the shopping cart.

Read more:
https://www.workingsoftware.dev/what-is-ngrx-and-why-is-it-used-in-angular/