Initially, I thought that my next step would be to write the code to handle more than a single connection at a time, but I decided that this isn’t the natural next step. It would be better to build the API and abstractions that are required to use this network protocol before committing to an actual implementation. I took a peek at what is available, and it looks like we have the following options:
Thread per connection – obviously out.
select() /pool() – allow to have a single thread manage multiple connections, but require a lot of state management.
libuv – or similar, that handle all of those details for me.
Regardless of what I’ll end up in the end, I think that the externally facing API is always going to be the same, so I’m going to focus on that. Right now we have:
In this article, we will learn how to publish a reusable Blazor component to the NuGet gallery. We will use Visual Studio 2017 to build and create the NuGet package.
Install the .NET Core 2.1 or above SDK from here.
Install Visual Studio 2017 v15.7 or above from here.
Install ASP.NET Core Blazor Language Services extension from here.
Create a NuGet account. Create your free account on nuget.org here.
Please refer to my previous article BlazorGrid – A Reusable Grid Component For Blazor to create the BlazorGrid component, which we will publish in this tutorial.
State machines are everywhere but I don’t think they get enough air time. To remedy the situation I’m going to present an implementation in TypeScript and use it to model a very simple elevator.
I could point you to the definition of what a state machine is on Wikipedia but the name gives it away. State machines consist of states and a description of how to go from one state to the next. So let’s start spelling things out.
In another article, I decribed how I rebuilt my site with Laravel in a day. Though the website took shape within a day’s work, I still had many essential features to include, such as RSS feeds, blog post comments, and structured data, to name a few. I wanted to explain my solution for implementing an RSS feed. This may be a simple solution but the point is that it works like a charm. So let’s get started building an RSS feed for your site.
Crafter CMS is a headless CMS that provides all of it’s services and capabilities to consumers via RESTful APIs. This enables developers to easily build content support (externalized management of content, strings, media, etc) into any application written in any programming language.
As part of my usual routine, I’m trying out writing some code in C, to get a feeling for a different environment. I wanted to build something that is both small enough to complete in a reasonable amount of time and complex enough that it would allow me to really explore how to use things. I decided to use C (not C++) because it is both familiar and drastically different from what I usually do. The project in question? Implementing the network protocol I wrote about here. Another part of the challenge that I set out for myself was to make this code as production quality as I could, which means paying all the usual taxes you would expect.
The first thing that I had to do was to figure out how to actually perform networking and work with SLL in C. Something that would take me 5 minutes in C# took me a several hours of exploring and figuring things out. Eventually, I settled down on the obvious choice for SSL with OpenSSL. It is portable, reasonably well documented, and seems fairly easy to get started with.
Do you remember this famous scene from the Matrix? Well, this tutorial is similar to the same situation where Neo has to make a choice. But, now, instead of Neo, it is you who havs to make the choice, between two methods: .forEach()and jQuery’s .each().
HTTP 1.1 is a well-known hypertext protocol for data transfer. HTTP messages are encoded with ISO-8859-1 (which can be nominally considered as an enhanced ASCII version, containing umlauts, diacritic and other characters of West European languages). At the same time, the message body can use another encoding assigned in “Content-Type" header. But what shall we do if we need to assign non-ASCII characters not in the message bodies, but in the header? Probably the most well-known case is setting a filename in the "Content-Disposition" header. It seems like a common task, but its implementation isn’t obviou
TL;DR: Use the encoding described in RFC 6266 for "Content-Disposition" and transliterate it to Latin in other cases.
For quite a while we have been noticing a huge interest in Progressive Web Applications (PWAs) in the front-end world.
More and more companies develop applications using the concept. Users creat catalogs (PWA Stats), where we may find the information about use cases and positives (improving conversion, increasing the number of subpages visited during the session or time spent on the page). Market giants, such as Microsoft also promote the technology by allowing developers to add PWA applications to the Windows Store.
Last chapter of this series. If you have followed along with these blog posts you are now fully capable of creating projects using the Object Oriented paradigm.
In this part, we will learn how to use abstract classes and several other less common features of PHP such as reflection APIs and the singleton design pattern.