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:
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.
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!
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.
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.
So where do we begin? All the way at the beginning of time! 13.8 billion years ago, the universe was created in what is known as The Big Bang.
Well, maybe we don’t have to go that far back. Let’s just start with where this HTML thing came from.
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 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.
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.