Photo by JOSHUA COLEMAN on Unsplash

In my first post of Zero to Service, we went over how to build an API using Spring Boot. All of the actions of adding items in this first post were done in memory. In this second post, we’ll be going over how to configure your service so that you can now add and retrieve records from a MySQL database.

For this task, we will be using a popular framework called Hibernate. Hibernate is an ORM (Object-Relational Mapping) framework that allows you to interact with your database in an Object-Oriented fashion while providing many more tools at your disposal.


Photo by Mark Tegethoff on Unsplash

In this post, we’ll go through all the steps required to get a Java Spring Boot service up and running. At a pretty high level, Spring Boot is an open-source framework that simplifies tasks such as dependency injection and assists with building APIs.

The Goal

We will be implementing a service that will take care of creating, updating, and retrieving cars from an inventory. In this example, if we follow HTTP and REST standards, we can implement this using two API requests.

  1. For the request to retrieve all cars in the inventory, we will use a method of GET. …

Photo by Paul Hanaoka on Unsplash

The Problem

Automated testing is a crucial part of high-quality software development. There are several dos and don’ts and pros and cons with every level of automated testing.

If you are not familiar with the different levels of automation, you can go from testing a unit of code (ex. a class), to test the integration of these units (ex. multiple classes), to the whole system. Testing is all about the risks and picking the right compromises. …

Photo by Florian Krumm on Unsplash

While it is true that there are some clear benefits to deploying your applications using containers over virtual machines, in some cases due to costs or other requirements you might prefer to deploy to a virtual machine.

In this post, we’ll go through the steps required for you to be able to deploy a Java Spring service to a virtual machine using GitHub Actions.

Let’s begin with a few assumptions we’ll be making before we begin:

  1. The virtual machine that we’ll be using has already been created
  2. The virtual machine already has some version of the OpenJDK installed
  3. You are…

Learn how to not have to implement getters, setters, and other methods for your Java applications by only using a few annotations.

Photo by razvanux on Unsplash

Developing in Java can sometimes feel a little bit verbose. As programmers, we are always eager to write more code but wanting to do less at the same time.

Coming from a C# background, when I started programming in Java, I’ve always asked myself: How can I avoid having to write all these setters and getters? One day I was introduced to Project Lombok.

Project Lombok is an open-source library that helps you write less code in a…

Photo by Micah Williams on Unsplash

Reactive forms are an alternative to creating forms in Angular. Most of the heavy lifting for creating reactive forms happens in the component class instead of the template (HTML file).

One of the big benefits of using reactive forms is that it makes testing easier. The reason for this is that all the code related to your form lives in the component class. Given this, you don’t need to access the template on your tests to test your form. Instead, you can simply write a unit test.

Module setup

The first step to implement a reactive form will be to…

Photo by Icons8 Team


The decorator design pattern is a software design pattern that helps you add responsibilities to an object at runtime. This pattern is considered to be a structural design pattern. This type of pattern focuses on the relationships between classes and how they can help solve specific problems.

The Gang of Four, in their book Design Patterns: Elements of Reusable Object-Oriented Software, defined the intent of decorator pattern like this:

Intent: Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.

One of the key characteristics of this design pattern is that it follows…

Photo by Taylor Vick

Server-side rendering and Client-side rendering

Angular applications by default rely on the browser to compile all the code. Even though this is the behavior, there is a way to change this. You can change your application to compile on a server instead of the client’s browser.

This discussion comes down to client-side rendering (CSR) vs server-side rendering (SSR). In this article, I’ll be going over what SSR and CSR are, their pros and cons, and how to convert your application to do SSR.

In simple terms, CSR relies on the client’s browser to compile the code. On the other hand, SSR relies on a server…

Photo by James Pond

What is it? And why would you need it?

You might be familiar with CI tools such as TeamCity, Jenkins, Concourse, Travis CI to mention a few. Well, this time we’ve got a new neighbor in town.

This new neighbor offers new capabilities to automating your workflows: GitHub Actions.

GitHub Actions provides different ways to automate development tasks. Some of the things you could do are:

  • Build your applications and run tests on every code check-in
  • Deploy your application to your production servers
  • Perform different types of automated tasks when a pull request is created
  • Monitor the health of your application at a defined time interval

These are just…

Photo by Wyron A

You might have heard before about the Singleton Design Pattern. It could have been in a book, online course, or in school. Back in the day when I first heard about it, I thought, why would I need to use this pattern? What I wish my professor could have told me was a real-world example of why it is needed.

Several years after that course, I had a good lesson on when to use it and why it is important. Let’s go over why this pattern is so important based on that time where everything went bad for me.

When everything started going bad…



Passionate about coding. Engineering software one keystroke at a time… ⌨️

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store