The ASP.NET Core React Project

In the last post I wrote, I had a first look at a plain, clean, and lightweight React setup. I’m still impressed how easy the setup is and how fast the loading of a React app really is. Before trying to push this setup into an ASP.NET Core application, it would make sense to have a look at the ASP.NET Core React project.
Create the React Project
You can either use the “File New Project …" dialog in Visual Studio 2017 or the .NET CLI to create a new ASP.NET Core React project:


Trying React the First Time

The last two years, I have worked a lot with Angular. I learned a lot and I also wrote some blog posts about it. While I worked with Angular, I always had React in mind and wanted to learn about that. But I never head the time or a real reason to look at it. I still have no reason to try it, but a little bit of time. So why not?  This post is just a small overview of what I learned during the setup and in the very first attempts at using React.


Anatomy of Sails.js API With GraphQL

If you’re having troubles with organizing your API for a Node.js app, using the Sails.js framework with GraphQL, know that you’re not the only one – we’ve been there too.
Since this is not an every-day combination of technologies, it was challenging to define the anatomy of such an app and its tests, but we did it!


A Generic Logger Factory Facade for Classic ASP.NET

ASP.NET Core already has this feature. There is a ILoggerFactory to create a logger. You are able to inject the ILoggerFactory to your component (Controller, Service, etc.) and to create a named logger out of it. During testing you are able to replace this factory with a mock, to not test the logger as well, and to not have an additional dependency to setup.
Recently, we had the same requirement in a classic ASP.NET project, where we used Ninject to enable dependency injection and log4net to log all the stuff we did and all the exceptions. One important requirement was creating a named logger per component.


JavaScript and Underscore.js Type Methods in PHP

I’ve been working with PHP since 2000 and with JavaScript even longer. Over the last decade, JavaScript has evolved drastically. It had a promising design from the very beginning and gained its current incredible shape with the shift to ES2015 (Harmony). PHP, though, didn’t change that much. Apparently, it’s doomed always to suffer from its own legacy. It arrived in the mid-90s as a simple CGI app to maintain Rasmus Lerdorf’s home page and have been more like spontaneously developing ever since. That resulted in syntax inconsistency, a mix of functional and OOP-based assets, and absence of a decent language specification. So every time I switch to PHP I miss the rationality, predictability, and flexibility of JavaScript. This made me consider a library which would bring a JavaScript-like development experience to PHP. Eventually, I came up with Extras, which extends PHP types with JavaScript (other than Underscore) methods, unlocks chaining, and introduces the PlainObject type representing an object-literal.
JavaScript Meets PHP
The library enriches with JavaScript and Underscore.js methods the following PHP types: array (both sequential and associative), string, number (integer, float, NaN), function (callable), collection (Iterable, ArrayObject, Iterator) and boolean. Every added method is a static method of the class representing the type. So we can access any directly, without the creation of a chain like Arrays::map.


Declarative D3 Transitions With React 16.3 [Video]

The new React 16.3 brings some changes to the ecosystem that change how we go about integrating React and D3 to build data visualizations.
componentWillReceiveProps, componentWillUpdate and compnentWillMount are on their way out. They were great for making React and D3 happy together, but they cause issues with the async rendering that the React team is planning for React 17.


ASP.NET Core: CRUD Using Blazor and Entity Framework Core

Microsoft has recently announced the release of a new .NET web framework – Blazor. In this article, we are going to create a web application using Blazor with the help of Entity Framework Core. We will be creating a sample Employee Record Management System and perform CRUD operations on it.

Install .NET Core 2.1 Preview 1 SDK from here.
Install preview of Visual Studio 2017 v15.7 from here.
Install ASP.NET Core Blazor Language Services extension from here.
SQL Server 2012 or above.

The Blazor framework is not supported by versions below Visual Studio 2017 v15.7. Before proceeding further, I suggest you read my previous article on getting started with Blazor.


Hyperlambda – Do More With Less

Hyperlambda is kind of like YAML. YAML is a markup language, and it means “Yet Another Markup Language." YAML has many interesting traits, it’s most important being the ease of declaring tree structures. However, it is also unnecessarily complex, and contains too many syntactic elements – at least for my taste – so I created Hyperlambda. At its core, there are only two syntactic basic elements in Hyperlambda.

A colon separates the name of a tree node from its value.


Creating a Web Operating System in C#

Maybe you’re wondering what a “web operating system" is? In order to explain that, we must take a look at a traditional operating system’s primary functions. The main task of an operating system is to provide a uniform way to access the underlying hardware, with the goal of simplifying the creation of applications. Hence, the "kernel" in an operating system, becomes an API which the developer can consume, to transparently access the underlying hardware of the machine. This is often referred to as "HAL," implying "Hardware Abstraction Layer."
An operating system also contains other functions – but the primary goal is to simplify the creation of apps for the end application developer, by abstracting away the "boring stuff," and making everything easier to use from an application development point of view.