Getting Started with Marble Testing

Todd Leininger Testing, Tutorial Leave a Comment

When working with RxJS observables, it can get a little tricky to unit test. Sometimes it can be hard to get insight into what is going on with the observable in the test. I’ve personally been frustrated numerous times by trying to test my observables with the subscribe and assert method. This is where marble testing can make testing observables easier.

The main advantage of using marble testing is the marble diagrams. With the diagrams, we have a visual representation of our observables and subscriptions so we can see the interactions between the two. Once the basics are understood, you should be able to get observable tests running in no time.

In this post, I will show you how to get started using Marble testing with an example. By the end, you should have enough information to get started on your journey testing observables. My examples are based on an Angular application using Jasmine, but these can also be applied to different testing frameworks for React and other applications.

JSON Web Token .NET Core Demo

Lou Mauget .NET Core, C#, Development Technology, Programming 1 Comment

In this post, I present a tiny .NET Core C# JWT API demo that creates and parses a JSON Web Token (JWT). A self-contained Swagger UI dashboard exercises the API. 

We can’t dead-drop a JWT demo without wrapping it in words about JWT background. I’ll set the scene by introducing tokens, JWTs, and surveying session state residency tradeoffs. We’ll then migrate to, high-level JWT JWT use cases, and arguments about if or when to use JWTs. 

I seek to give equal coverage to JWT upsides and downsides. Let’s get started.

Maps and Entities and JPA, OH MY!

Ryan McCullough Development Technology, Programming Leave a Comment

A client I’m working with has an email templating system that needs an upgrade! The current design utilizes a denormalized table that needed to grow a column every time a new unique token is needed. After a review of the offerings through JPA, I was happy to see that JPA had some support for java.util.Map through joins through a variety of the @MapKey annotation.

In this post, I’ll demonstrate the less frequently used methodology of applying and populating a Map of entities using a single table and a composite key.

More on Accessibility-First Programming

Todd Horn Development Technology, Opinion, Programming Leave a Comment

A few months back, Aaron wrote about the high-level aspects of Accessibility-First Programming, its importance, and specific strategies and tools for applying it within your software development process. It included insights and suggestions for Color and Contrast, Focus Management, the use of ARIA tags and attributes, and testing strategies and tools – all of which are important things to consider. 

In this post, we’re going to dig in a little deeper on three of those topics that I used on my last project: ARIA, the WCAG and what is needed for compliance, and some design principles of accessible design. We’ll include insights and further reading on relevant topics to help you better understand how to implement accessibility-first programming in your own development.

Go To SQL

Gabe Schmidt Databases, Go, Programming, Tutorial Leave a Comment

In between projects here at Keyhole, I’ve been tasked with applying a relational database access and mapping framework in the Go language.

In this post, I go step by step to create a Postgres relational database, then perform CRUD operations against it in the Go language.

I won’t get into the specifics of configuring Go in this blog, but you can check it out yourself here – https://golang.org/. Additionally, Keyhole’s very own David Pitt wrote an excellent primer on the subject here – https://keyholesoftware.com/2019/09/26/go-on-the-fly/.