Welcome to Mobile Tech Tracker. Our mission is to help technically-minded people to become better versions of themselves and to help ordinary people to use modern smart technologies to their own advantage.
We can provide consulting or programming training services, including authoring of courses and books. For enquiries, please contact email@example.com.
C# basics in practice - manipulating text files
If you have just started learning C# and .NET, you might be tired of simple demo apps that don't do anything other than output "Hello world!" text on the screen. The good news is that if you have mastered the basic syntax of C#, you are already equipped to build some useful apps with it.
This short tutorial will walk you through such an app. What we will look at is a simple console application that serves a very useful purpose - reading text from a text file and saving it into another text file as HTML.
This is a utility that I have built for my own purposes. The website that I have built for blogging, mobiletechtracker.co.uk, has initially started as a learning project. Therefore, instead of using any pre-existing blogging platform, such as WordPress, it was build from scratch.
Although the process of building every component of the website has taught me many useful skills and have improved my programming career, the disadvantage of this approach is that I have to write every article as HTML before I post it. As I type most of my articles on a mobile phone while I'm out and about, typing HTML is quite awkward. Therefore, I have built this tool that does HTML formatting for me, which I am now sharing with the world.
In this tutorial, you will be given access to the source code of this tool and you will be taught how it reads text files, processes the text and saves output into another text file. This will be enough for you to be able to adopt the concepts to your own goals.
This tutorial will be suitable for anyone who doesn't know much C# beyond its basic syntax. Or it will be a good refresher to those who have forgotten how to do file processing in C#.
Differences between mono and .NET Core
.NET Core is the newest and the hottest programming platform in Microsoft stack. And this is the platform that Microsoft says that developers should use, unless they have a compelling reason not to.
The biggest selling point of .NET Core over its predecessor, .NET Framework, is that, .NET Core can run on Windows, Linux and Mac, while .NET Framework could only run on Windows. However, the ability to run .NET code on multiple operating systems isn't new. We had it for years since the release of mono.
And, unlike .NET Core, which natively only allows you to build console apps and web applications, mono allows you to build many application types available in .NET Framework, including GUI-enabled desktop apps. So, if mono can do everything that .NET Core can while .NET Core can only do some of the things that mono can, why is .NET Core is being so heavily promoted, while mono isn't?
Well, in reality, each of these programming platforms has its place. There are scenarios where .NET Core is a way better choice than mono, despite its limitations. And those scenarios are very common these days.
Let's examine the differences between .NET Core and mono, so you can decide for yourself which platform to use in any given situation.
Applying clustering on OpenLayers map
With OpenLayers you can do many wonderful map-related things on your web page that you would normally use Google Map or Bing Map for. And, unlike Google or Bing, you won't have to pay a penny to do so.
In my previous article, I have showed you the simplest way of setting up a map with a clickable location marker. Although the example showed you many basic concepts behind OpenLayers, it was somewhat limited. It certainly wasn't suitable for a production-ready map.
In this article, we will expand on it further. In fact, you will learn enough to have a fully functioning map that you will be able to add to your public-facing website. You will just be able to take the code provided, modify the data to suit your needs and insert it directly into WordPress editor, or any other CMS you are using.
Why you absolutely need SignalR for ASP.NET development
If you are using ASP.NET Core for web application development, you should get yourself familiar with SignalR library. And once you have, you will be surprised how you used to manage without it.
If you open any modern day web application, from a social media web page to your in-browser email client, there will be a feature that everyone these days takes for granted - the ability to refresh any arbitrary parts of the web page in real time without having to reload the entire page. And this is just the most basic things you can do with SignalR.
Although you don't necessarily need SignalR to achieve an asynchronous real-time data transfer between clients and the servers, SignalR is by far the best way of implementing it in ASP.NET. Let's find out why is it so.
Pros and cons of Blazor for web development
Blazor is a hot framework from Microsoft that makes it possible to run .NET code directly in browser on top of WebAssembly. And it is no longer an experimental project it used to be. It has officially made its way into .NET Core 3.
And there are also different types of Blazor, which are suited to different scenarios. Therefore, whether or not to use Blazor in your web application, may not be a simple decision.
But not to worry. We will now examine pros and cons of Blazor compared to its alternatives. Likewise, we will have a look at different types of Blazor and will examine pros and cons of each compared to each other.
By the end of this article, you will be well equipped to decide whether Blazor is the right solution for you.
Web GIS: Making modal pop-up on an OpenLayers map
If you want to develop a website that has an interactive map on it, there are plenty of options you can choose from. Google and Bing maps are obvious choices, but both of them have a cost associated with them, which may be excessive, especially if you don't intend to use your website as a commercial product. However, there are several free alternatives that, for many use cases, just as good as the APIs provided by either Google or Bing. Once of such map APIs is OpenLayers.
All of these map providers fall under a software category known as GIS. GIS (which stands for Geographic Information System) is a type of software that provides geographic information, while also giving you the ability to associate non-spacial data with locational attributes. For example, a point on a map may hold a whole collection of attributes, akin to a row in a standard database table. Another example would be a public road, as represented by a multi-point line, having a whole set of traffic-related attributes, such as direction and speed limit. Connecting several of such roads into a network would allow you to calculate the route and estimated time from one point to another, as it is possible on Google and Bing maps.
This functionality, along with other spatial computation capabilities, can be performed by absolutely any types of GIS, so you don't really have to use the ones provided by the major tech companies. The problem with it is, however, that any specific functionality that you would want to implement may not yet be documented, so you will have to figure out how to do it yourself.
As great as OpenLayers is for displaying maps on your web page, it does lacks official documentation for some of the most common use cases. The developers behind it were very generous and have provided many examples, but there are some common use cases that are still missing (at least, at the time of writing). One of such use cases is the ability to display a clickable marker on the map that, when clicked, opens up a modal dialog with more information about the location. And this is precisely what we will talk about in this tutorial.
Using .NET Core SDK projects in .NET Framework
As a software-building platform, .NET Core has already reached a sufficient level of maturity and can do many of the things that its predecessor - .NET Framework, can. Microsoft has even recommended to use it instead of .NET Framework, unless it's absolutely necessary to do otherwise.
.NET Core has many advantages over .NET Framework. One of such advantages is the SDK-type project file. If the content of any project file needs to be edited, a new SDK-type project file doesn't have to be unloaded, unlike a project file that uses classic .NET Framework format. The latter are also way less verbose than the former, which makes it easier to read and edit.
Unfortunately, despite all of its advantages, there are still many real-life situations where .NET Core cannot be used. There are many .NET Framework features that simply don't exist on .NET Core. Some of these features, such as playing audio, can be implemented by using third party libraries, while others, such as the ability to build full feature native GUI apps, isn't available on .NET Core at all (or, at least, not fully available yet).
However, even if you are stuck with .NET Framework, you don't have to be stuck with its ugly and awkward project file format. Even though it's not obvious how to apply SDK projects to .NET Framework, it's not difficult at all. And this trick will significantly improve your productivity.
Learning .NET Core from scratch
.NET Core, which is pronounced as dot net core and is, sometimes, written as dotnet core, is a fairly fresh programming platform from Microsoft that is set to dominate Microsoft software development stack. Therefore, if you are enthusiastic about programming and planning to start career in the industry, .NET Core is one of the hottest specialities that will guarantee you employment with good salaries for years to come.
So, how do you get started learning .NET Core, especially if you never had any prior programming experience?
Learning from free online resources might be feasible. There are plenty of them out there. However, as a beginner, you are very likely to just get overwhelmed with the information. You don't know what you don't know, so it will be difficult to know where to start and it will be easy to get lost and completely discouraged.
I am a self-taught programmer and I know what struggles beginners go through. This is why I have put together a structured course tailored specifically for those who have very little programming experience or no programming experience at all.
Playing audio on .NET Core with NetCoreAudio
For well over a decade, .NET Framework was the main software development platform that Microsoft stack programmers were using. As great as it was, it had one significant disadvantage - it could only be ran on Windows. This limitation has prompted Microsoft to release another programming platform, .NET Core, which is intended to eventually replace .NET Framework.
Unlike .NET Framework, .NET Core can run on Linux and Mac as well as Windows. However, as the platform is still very young, it lacks some of the basic functionality that .NET Framework developers learned to take for granted. Until recently, one of these missing pieces of functionality was the ability to play audio.
However, with NetCoreAudio NuGet package, this is no longer an issue.
Building .NET Core sound application - part 3
This is the third and final part of the tutorial on building a platform-independent audio app on .NET Core. In the first part of this tutorial, we talked about setting up the general project structure and enabling audio playback capabilities on Windows. The second part of the tutorial spoke about adding the ability to play audio on Linux, while also enabling the library to pull the specific code, based on the operating system the software is running on. Today, we will talk about enabling audio capabilities on Mac.
As it has been mentioned before, .NET Core is a great platform-independent technology to build software with. However, due to its platform-independent nature, it lacks some of the most basic capabilities, which were too different in implementation on different operating systems. One of these is the ability to natively play audio.
Although there are reliable ways of enabling audio playback on .NET Core, those require a large number of dependencies.
The goal of this three-part tutorial is to build our own library that will enable us to use basic playback capabilities without any additional third-party dependencies whatsoever.
Tech Blog Articles
Anecdotal evidence is often the best evidence
Why I won't support anti-human Extinction Rebellion
Being toxically masculine to become a greater coder
All you need to know about Cisco router vulnerability email scam
Biggest misconceptions about full stack developers
It's not Capitalism that's the problem
The most important skill for 21st century
How to think like a hacker
One human trait that slows down humanity's progress
See everything that Facebook and Google know about you
© Mobile Tech Tracker. All rights reserved. Unauthorised copying of any of this website's content is prohibited under international law.
For any queries, comments or suggestions, please write to firstname.lastname@example.org.