Category: Coding

Vue.js Development Add Friendly Element Ids

Generally most Vue.js developers don’t define an explicitly declared element id. It is not required by the Vue.js specification and most default linters do not include a friendly element id requirement. If you don’t declare an element id, then Vue.js will generate one for you, using a fairly unfriendly syntax, and this auto generated value

C# Replace Out Parameters with Tuples

One bit of background, in C# there are actually two different Tuple classes. This post is referring to the System.ValueTuple class which is mutable (changeable). There is also a System.Tuple class which is immutable (read only). See the references link if you are interested in additional details. Sometimes with C# methods you may set up

Git Info Exclude

If you’re familiar with the git source control tool, you have probably come across the .gitignore file. This file allows specified files, usually created as part of the build process to be ignored (untracked) by git. There is actually an additional way to exclude files, the git info exclude, which I’ll be covering in this

C# Simplify Validation With Guard Clauses

A guard clause is a coding approach for pulling out validation and edge case checks scattered throughout a method and putting them at the start of the method (to validate input parameters) and / or at the end of a method (to validate output after the main processing has taken place in a method). My

Getting Started with Vue Cli

A good resource for those doing Vue.js development is the Vue CLI development tools.  This is installed as an npm package and provides Vue.js project scaffolding and other tools.  There is also a web ui for this tool, which we’ll be taking a look at. One of the advantages of the Vue cli tool is

Chrome Debugging Tips

This post covers some useful tips for debugging JavaScript in Chrome. Tip1 – Output objects in console.log   The console.log statement is used inside of source code, usually as part of development to help debug a section of code such as console.log(‘hit this point’); or console.log(‘my variable is ‘ + x); One useful trick when working

Vue.js conditional display v-if and v-show

In working with the Vue.js JavaScript framework, one of the first topics you learn is conditional display – displaying or hiding an element.  Two ways to do this are the v-if directive and the v-show directive. Here is an example of the v-if directive:  It’s pretty straight forward, the statement inside the quotes needs to

Project Blazor – Run C#/Razor in the Browser

There was a recent project announcement at Microsoft that I would like to highlight for those interested in Microsoft web development – Project Blazor. This project is being developed by the ASP.NET team and will deliver the ability to have .NET code (C#/Razor) execute directly client side in browsers at native speed in place of