Home » #learning » Page 4

#learning

Microservices Design Principle: Domain-driven Cohesion

The aim of Domain-driven Cohesion in Microservices is to help us tightly scope our microservices so that they represent a specific business domain within our organization in terms of the data and the functionality they provide. The cohesion part of this principle is just there to emphasize the fact that each individual microservice must be

Microservices Design Principle: Domain-driven Cohesion Read More »

Microservices Design Principle: Autonomy

Autonomy in microservices refers to the degree of independence and self-sufficiency that each individual microservice possesses within a microservices architecture. This enhances the performance and reliability of the service and gives consumers more guarantees about the quality of service they can expect from it. Coupled with statelessness, autonomy also contributes to the overall availability and scalability

Microservices Design Principle: Autonomy Read More »

Pseudo-Random Number Generators

Java 17 introduced enhancements to the Pseudo-Random Number Generators (PRNGs) to make working with random numbers in Java more versatile and user-friendly. These improvements provide better support for using multiple PRNG algorithms and properly handling stream-based operations. Here’s an overview of the enhancements: 1. PRNG Enhancements: Java 17 introduces a new interface type called RandomGenerator

Pseudo-Random Number Generators Read More »

Java 17: A Brief Overview of Features and Enhancements

Java 17 LTS is the latest release providing long-term support for the Java SE platform. According to the Oracle No-Fee Terms and Conditions License, JDK 17 binaries are permissible for use in production and can be redistributed without any associated costs. The abbreviation “LTS” denotes “long-term support,” and this release is slated for availability on

Java 17: A Brief Overview of Features and Enhancements Read More »

Visitor Pattern

In the Visitor pattern, we employ a visitor class to alter the execution algorithm of an element class. This flexibility allows the element’s execution algorithm to adapt as the visitor changes. This pattern falls under the behavior pattern category. In accordance with this pattern, an element object must accept the visitor object, enabling the visitor

Visitor Pattern Read More »

Template Method

The Template Method is a behavioral design pattern that defines a blueprint for an algorithm in a superclass but allows specific steps of the algorithm to be overridden by subclasses without changing its core structure. Consider developing a data mining application that analyzes corporate documents in various formats (PDF, DOC, CSV) to extract meaningful data.

Template Method Read More »

Strategy Pattern

The Strategy pattern, also known as Policy is a design pattern that allows you to define a range of methods for achieving a specific task and place each method in its own class. These classes, known as strategies, are interchangeable, providing flexibility in algorithm selection without altering the core code. Imagine you’re developing a navigation

Strategy Pattern Read More »

State Pattern

The State Pattern is a behavioral design pattern that allows an object to alter its behavior when its internal state changes. The pattern encapsulates states as separate classes and delegates the state-specific behavior to these classes. This makes it easy to add new states and modify the behavior of an object without altering its structure.

State Pattern Read More »

Scroll to Top