Category: Other Tutorials

Other Tutorials

JPA @Embeddable and @Embedded

Introduction: As an object-oriented developer, we want to avoid having larger classes with tons of unrelatable fields. And so, we might often feel the need to represent a JPA Entity using multiple objects. In this quick tutorial, we’ll learn how to achieve it using @Embedded and @Embeddable annotations in JPA or Hibernate. Context Buildup: Let’s […]

3 comments Read More
Other Tutorials

Working with kubectl in Kubernetes

Introduction: Kubectl is a command-line tool that helps us interact with our Kubernetes API server. In turn, it helps us manage our K8s cluster. In this quick tutorial, we’ll learn and explore some commonly used kubectl commands. Working with kubectl: Let’s look at kubectl‘s general syntax: kubectl [operation] [resource-type] [resource-name] [flags] When we don’t specify […]

Be the First to comment. Read More
Other Tutorials

Kubernetes: An Introduction

Introduction: In this tutorial, we’ll introduce you to Kubernetes and will discuss its architecture. As a prerequisite, it’s good to have some basic knowledge of the container world. Kubernetes & its Architecture: Kubernetes, popularly known as K8s, is an open-source container orchestration engine for microservices-based containerized applications. A K8s cluster comprises of a master and […]

Be the First to comment. Read More
Other Tutorials

Identifying Code Smells In Java

Introduction: As a software developer, it’s our responsibility to not only write code that works but rather write code that’s maintainable. Martin Fowler in his book Refactoring: Improving the design of existing code defines a code smell as: A surface indication that usually corresponds to a deeper problem in the system Refactoring is a process […]

3 comments Read More
Other Tutorials

SOLID Design Principles

Introduction: Robert C. Martin defined five object-oriented design principles: Single-Responsibility Principle Open-Closed Principle Liskov’s Substitution Principle Interface Segregation Principle, and Dependency Inversion Principle These together are popularly known as the SOLID principles. When designing an object-oriented system, we should try to stick to these principles wherever possible. These principles help us design a system that’s […]

Be the First to comment. Read More
Other Tutorials

Strategy Design Pattern In Java

Introduction: The strategy design pattern is a behavioral pattern in which we have multiple algorithms/strategies for achieving a task and which algorithm/strategy to use is left for the client to choose. The various algorithm options are encapsulated in individual classes. In this tutorial, we’ll learn to implement the strategy design pattern in Java. UML Representation: […]

Be the First to comment. Read More
Other Tutorials

Mediator Design Pattern In Java

Introduction: In this tutorial, we’ll learn about a behavioral pattern that promotes loose coupling between several objects communicating with one another. The idea behind the Mediator design pattern is to have a central object that encapsulates how a set of objects interact. In the mediator pattern, we extract all the relationships between different classes in […]

Be the First to comment. Read More
Other Tutorials

Chain Of Responsibility Design Pattern In Java

Introduction: In this tutorial, we’ll learn how to implement the Chain Of Responsibility Pattern in Java. The Chain Of Responsibility design pattern involves having a chain of objects that are together responsible for handling a request. When a client sends a request, the first handler will try to process it. If it can process it, […]

One comment Read More
Other Tutorials

Command Design Pattern In Java

Introduction: In this tutorial, we’ll learn about the command pattern which is an important behavioral design pattern. It has some important applications like implementing undo/redo functionality in text editors. In the command design pattern, there’s a command object that sits between the sender and the receiver objects. The sender object can create a command object. […]

Be the First to comment. Read More
Other Tutorials

Observer Design Pattern In Java

Introduction: In this tutorial, we’ll talk about the Observer design pattern. There are two main aspects to the observer pattern – a Subject and the Observers. We use this pattern when our system has multiple objects, known as the observers, relying on the state of one particular object – the subject. All the observers register […]

Be the First to comment. Read More