Creating Custom Types in TypeScript

JavaScript is a weakly typed language, which means we don't usually think about types. Typescript is strongly typed, which means everything has a type.

Occasionally we want to make an object or the return of a function conform to a certain format. This is where we use custom types. Typescript allows us to define our own custom types, which we can then use in our code.

Enabling High-Quality Code in .NET

Introduction to Code Quality

When we talk about code quality, we can think of different aspects of it. We mainly refer to the attributes and characteristics of code. While there is no widely adopted definition of high-quality code, we know some of the characteristics of good code:

  • It is clean.
  • Absence of code smells
  • Consistent
  • Functional: it does what we say it does.
  • Easy to understand
  • Efficient
  • Testable
  • Easy to maintain
  • Well documented

There are probably additional characteristics of good code, but these are the core of the high-quality code.

Building a Kotlin Mobile App With the Salesforce SDK: Editing and Creating Data

Here in Part Two of our three-part series, we continue to build on the fundamentals of Android development with the Salesforce Mobile SDK. In Part One, we covered project setup and creating a layout that fetches data from Salesforce, using Kotlin as our programming language of choice.

Before we continue towards developing a complete mobile synchronization strategy, we’ll first build out our mobile app to allow editing and creating data on our Salesforce org.

6 Easy Ways to Start Coding Accessibly

Why Does Accessible Development Feel So Intimidating?

I’ve found accessible development to be one of the places where it’s easiest to fall into analysis paralysis: there’s always something that you feel like you need to double-check first, something that you heard someone else is doing, or just a vague feeling that you don’t really know enough yet to start tackling accessible coding yourself. Just one more blog, one more conference talk, one more video, and then you’ll be ready to start writing accessible code.

Meanwhile, our applications – and more importantly, our users – are stuck with the same old inaccessible code that we just keep writing. The best thing we can do is to start writing accessible code to the best of our ability, with the acknowledgment that we might make a mistake! After all, isn’t that just how development works all the time? We code things using the skillset we have, adhering to the best practices that we’re aware of and the current web standards. Sometimes we make mistakes, whether those are bugs or architecture approaches we would have done differently in hindsight, but we still ship an application that’s (hopefully) mostly functional. Accessibility is the same way: it functions on a sliding scale, not an on/off switch. We code accessible features as we’re able, based on what we know right now and the current accessibility-related guidance. It might not be perfect 100% of the time, but anything is better than ignoring accessibility entirely. And hey, code isn’t carved into stone, right? You can always go back and update something once you’ve learned how to do it better.

Putting JavaScript in CSS

Putting CSS in JavaScript is pretty much the norm these days - but what if we could do the opposite? Recently, I've been reading quite a bit about Houdini, which gives developers the ability to directly interact with the CSS Object Model.

One of the coolest things about it is that it lets us put JavaScript in our CSS. In the example below, I've created a background effect where the JavaScript is inside the CSS. Every time you refresh, the background is randomized. Check the CSS tab below to see JavaScript inside the CSS.

Add Secure HarperDB APIs Using SuperTokens in React

Adding authorization and authentication to an app is a common task for developers. When you're launching a new product, a startup, or a side project, it can feel like a mission. This tutorial will teach us how to make a music player app that uses SuperTokens for authentication and HarperDB for the backend.

Some of the App's Most Essential Features 

On Backend Side:
1. Secure your API with almost significantly less and zero configurations.
2. Secure your third-party API on the server side using SuperTokens.
3. Session management is simple.

On the Front-end side:
1. For login, use SuperTokens' library component, which is available as an npm package.
2. There's no need to develop any extra code for authentication.
3. There's no need to maintain tokens on the UI side.
4. You won't have to worry about managing token refresh calls on the UI side because SuperTokens will take care of it for you.

The Most Comprehensive Guide on WebRTC

WebRTC or Web Real-Time Communications, though a relatively new web technology, has taken web-based communication at an entirely new level with the promise of heralding into a brave new world of communication on the horizon. The free, open-source WebRTC project makes use of a set of JavaScript APIs to facilitate peer-to-peer communication between web browsers and different devices. The question remains what makes it so popular.

A big draw with WebRTC is it eliminates the use of plugins or third-party software to facilitate real-time communication, helping achieve the ultimate goal of moving in a plugin-free world.

How v-if and v-else Work in Vue

Vue templating comes with all sorts of easy shortcuts to implement advanced functionality. One set of these is v-for and v-if. These statements can be added to HTML tags to make your page more dynamic. Let's look at how they work.

How v-if Works in Vue

v-if is essentially an if statement for your Vue. If the statement within it is true, then the HTML tag will display. Otherwise, it won't. For example, let's say we had the following Vue file:

JavaScript Reserved Keywords Cheatsheet

When writing code, a reserved keyword is one you can't use as the name of a variable or identifier. As of 2022, this is the full list of valid reserved keywords in JavaScript.

All JavaScript Reserved Keywords

The below list cannot be used as variable names, as they are reserved keywords. Most of them have current functionality in JavaScript. Some do not, but they are words that may have some sort of functionality in the future. Avoid using these words in variable names.

Everything You Need To Know About JavaScript Variables

One of the most important concepts in JavaScript, as with most programming languages, is the ability to define variables. A variable is a container of a value or data. Some types of variables can later be changed, based on the logic we use in our code. Let's take a look at how variables work in Javascript.

Defining Variables

There are two main types:

ASP.NET Web Forms Modernization Series (Part 1): Data Access Layer Considerations

This is part 1 in a series of blog posts dedicated to ASP.NET Web Forms modernization. The series expands on the topics discussed in the  Migration Guide: ASP.NET Web Forms to Modern ASP.NET  – a compilation of technical considerations for modernizing legacy .NET web applications, gathered from our experience doing many .NET modernization projects.

Here is a list of all articles in the ASP.NET Web Forms modernization series:

Creating Your First Vue App

In this tutorial, we'll be looking at everything you need to build your first app in Vue. We'll be covering what you need to get started in making your first Vue application.

Creating Your First Vue App

To get started with Vue, you're first going to need to install the Vue CLI tools. Make sure you have npm installed on your computer (or you can do this in yarn if you prefer), and run the following command: 

CSS Transitions Generator

CSS transitions give us the ability to smoothly transition from one set of styles to another. Without them, your hover, click and transform effects can look janky and sudden. 

To illustrate a CSS transition, below are two emojis. Click on them to see the difference:

Get Started With Bloomreach Headless Experience Manager (Part 1)

Bloomreach Headless Experience Manager is a headless content management system with the APIs and flexibility to power any front end while retaining powerful personalization and authoring capabilities.

This guide helps new developers get started with the platform. With a step-by-step series of milestones, you’ll learn the first steps of developing websites using Headless Experience Manager:

BEMIT: ITCSS + BEM

Introduction

In my previous article, I discussed the advantages of using ITCSS to organize our styles, mainly for large projects where several people work. Its use will make our structure much more orderly and make the styles of our application more maintainable.

Having solved the problem of hierarchy and organization of our project, it remains to work on a nomenclature that will help us to have a self-documented code that is better understood. For this task, it can help us to include the BEM nomenclature together with the ITCSS nomenclature. In this article, we are going to approach BEMIT and what advantages it can offer us.

How I Built My Own Rewards Card

Before Amazon caught my eye, I found enjoyment in visiting brick-and-mortar technology retailers to check out new and exciting products. One retailer I visited more than others was Best Buy. Around that time, I was asked if I would be interested in signing up for a Best Buy rewards card during the checkout process. Hearing that every single purchase I made at Best Buy would go towards points that led to financial rewards got my attention, and I signed up immediately. 

I was excited.

CRUD with DynamoDB Using Serverless and NodeJS

Introduction

In this post, we are going to see how to make a CRUD application using DynamoDB, AWS Serverless, and NodeJS, we will cover all CRUD operations like DynamoDB GetItem, PutItem, UpdateItem, DeleteItem, and list all the items in a table. Everything will be done using the AWS Serverless framework and on NodeJS, this is part 1 of this series, in part 2 we are going to add authentication to this application, for now, let’s get started.

Project Setup

Our project folder structure will look like this

How to Choose a Container Registry: The Top 9 Picks

The invention of the open-source Docker Engine in 2013 resulted in containerization being one of the first steps towards modernizing the process of developing cloud applications. Before the invention of the Docker Engine, you had to configure applications for a specific computer/hardware. The downside of this approach was that it could be time-consuming to move an application from one server to another if the need arose.

But, with the launch of the Docker Registry,  the longstanding challenge of managing and organizing container registries was solved.  In fact, the Docker Registry rapidly became the software industry standard. Today, container registries help firms to collect, store, and deliver container images for different phases through their software development process within a central location.